diff options
| author | Moritz Meißelbach <arbelzapf@gmail.com> | 2021-01-21 21:59:27 +0100 |
|---|---|---|
| committer | Moritz Meißelbach <arbelzapf@gmail.com> | 2021-01-21 21:59:27 +0100 |
| commit | 0c6cc8103834f6ac3ec91cbec2e5eae69fd2a9e4 (patch) | |
| tree | a019cb4538290242cc4713edbb16aeb768b69ed9 /README.md | |
| parent | c741cb2dcd60b84e3f3ca8eeb7a9a64ad14b26d1 (diff) | |
| download | sway-launcher-desktop-0c6cc8103834f6ac3ec91cbec2e5eae69fd2a9e4.tar.gz sway-launcher-desktop-0c6cc8103834f6ac3ec91cbec2e5eae69fd2a9e4.zip | |
#33 Only print resulting command if the output is being redirected
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -35,6 +35,15 @@ You can override the default icons/glyphs by setting the appropriate GLYPH_ vari set $menu exec $term --class=launcher -e env GLYPH_COMMAND="" GLYPH_DESKTOP="" GLYPH_PROMPT="? " sway-launcher ``` +By default, the launcher will use a generic & WM-agnostic command to launch the selected program. +However, it will detect if its output is being piped to another program and merely print +the selected command in that case - instead of launching it by itself. You can use this to integrate the launcher with other tools. +For example, if you wish to launch your programs with `swaymsg exec`, you can do that like this: + +```shell + swaymsg exec "$(./sway-launcher-desktop.sh)" +``` + ### Setup a Terminal command Some of your desktop entries will probably be TUI programs that expect to be launched in a new terminal window. Those entries have the `Terminal=true` flag set and you need to tell the launcher which terminal emulator to use. Pass the `TERMINAL_COMMAND` environment variable with your terminal startup command to the script to use your preferred terminal emulator. The script will default to `$TERM -e` |
