From 3429a175db5eb6a9ca9ab93c808b6ed102ab7393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Mei=C3=9Felbach?= Date: Sat, 30 Nov 2019 00:38:56 +0100 Subject: Fix and improve usage of launch_cmd in providers --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 70fbac9..e92a677 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Some of your desktop entries will probably be TUI programs that expect to be lau ## Extending the launcher In addition to desktop application entries and binaries, you can extend `sway-launcher-desktop` with custom item providers. -If will read the configuration of custom item providers from `$HOME/.config/sway-launcher-desktop/providers.conf` +If will read the configuration of custom item providers from `$HOME/.config/sway-launcher-desktop/providers.conf`. The structure looks like this: ``` @@ -50,4 +50,8 @@ The `list_cmd` generated the list of entries. For each entry, it has to print th 1. The item to launch. This will get passed to `preview_cmd` and `launch_cmd` as `{1}` 2. The name of your provider (the same as what what you put inside the brackets, so `my-provider` in this example) 3. The text that appears in the `fzf` window. You might want to prepend it with a glyph and add some color via ANSI escape codes -4. (optional) Metadata that you can pass to `preview_cmd` and `launch_cmd` as `{2}`. For example, this is used to specify a specific Desktop Action inside a .desktop file \ No newline at end of file +4. (optional) Metadata that you can pass to `preview_cmd` and `launch_cmd` as `{2}`. For example, this is used to specify a specific Desktop Action inside a .desktop file + +The `preview_cmd` renders the contents of the `fzf` preview panel. You can use the template variable `{1}` in your command, which will be substituted with the value of the selected item. + +The `launch_cmd` is fired when the user has selected one of the provider's entries. \ No newline at end of file -- cgit v1.2.3