diff options
| author | Moritz Meißelbach <arbelzapf@gmail.com> | 2019-11-29 23:58:24 +0100 |
|---|---|---|
| committer | Moritz Meißelbach <arbelzapf@gmail.com> | 2019-11-29 23:58:24 +0100 |
| commit | 4e58f614e28cd23106101b303dccc526febf16b5 (patch) | |
| tree | 372165ac41ef5620546141dcbbd15cecc9f6eef2 | |
| parent | d3a3657a0f21e87acce072deaf1d30095b447b24 (diff) | |
| download | sway-launcher-desktop-4e58f614e28cd23106101b303dccc526febf16b5.tar.gz sway-launcher-desktop-4e58f614e28cd23106101b303dccc526febf16b5.zip | |
Implement template variable substitution in provider commands
| -rw-r--r-- | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -41,13 +41,13 @@ The structure looks like this: ``` [my-provider] -list_cmd=echo 'my-custom-entry\034 \034My custom provider' +list_cmd=echo 'my-custom-entry\034my-provider\034 \034My custom provider' preview_cmd=echo 'This is the preview of {1}' launch_cmd=notify-send 'I am now launching {1}' ``` The `list_cmd` generated the list of entries. For each entry, it has to print the following columns, separated by the `\034` field separator character: 1. The item to launch. This will get passed to `preview_cmd` and `launch_cmd` as `{1}` -2. A glyph or any kind of prefix to differentiate your provider from others. Feel free to use ANSI escape codes for coloring it -3. The text that appears in the `fzf` window +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 |
