diff options
| author | itspngu <34752364+itspngu@users.noreply.github.com> | 2020-12-22 13:17:17 +0100 |
|---|---|---|
| committer | itspngu <34752364+itspngu@users.noreply.github.com> | 2020-12-22 13:17:17 +0100 |
| commit | dfe17905246e6d2ecf4c1dfc4f860d13958a09f5 (patch) | |
| tree | 91388d55ae408b1647f3105d29cac03a7580411a | |
| parent | 0bfa512856821e69b5efcb5c9c191d748ff1a55e (diff) | |
| download | sway-launcher-desktop-dfe17905246e6d2ecf4c1dfc4f860d13958a09f5.tar.gz sway-launcher-desktop-dfe17905246e6d2ecf4c1dfc4f860d13958a09f5.zip | |
clean up UI, allow overriding fzf default prompt, update readme
| -rw-r--r-- | README.md | 9 | ||||
| -rwxr-xr-x | sway-launcher-desktop.sh | 9 |
2 files changed, 12 insertions, 6 deletions
@@ -25,12 +25,15 @@ Arch Linux users can also grab it from the AUR (thanks @turtlewit) Configure it in Sway like this: ``` -for_window [class="URxvt" instance="launcher"] floating enable, border pixel 10, sticky enable -set $menu exec urxvt -geometry 55x18 -name launcher -e env TERMINAL_COMMAND="urxvt -e" /path/to/repo/sway-launcher-desktop.sh +for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10 +set $menu exec $term --class=launcher -e /path/to/repo/sway-launcher-desktop.sh bindsym $mod+d exec $menu ``` - +You can override the default icons/glyphs by setting the appropriate GLYPH_ variable in your $menu command, e.g.: +``` +set $menu exec $term --class=launcher -e env GLYPH_COMMAND="" GLYPH_DESKTOP="" GLYPH_PROMPT="? " sway-launcher +``` ### 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` diff --git a/sway-launcher-desktop.sh b/sway-launcher-desktop.sh index d9e6b0b..859f25d 100755 --- a/sway-launcher-desktop.sh +++ b/sway-launcher-desktop.sh @@ -256,10 +256,13 @@ for PROVIDER_NAME in "${!PROVIDERS[@]}"; do done COMMAND_STR=$( - fzf +s -x -d '\034' --nth ..3 --with-nth 3 \ + fzf --ansi +s -x -d '\034' --nth ..3 --with-nth 3 \ --preview "$0 describe {2} {1}" \ - --preview-window=up:3:wrap --ansi \ - --no-info --margin="3%" --cycle \ + --preview-window=up:2:noborder \ + --no-mouse --no-multi --cycle \ + --prompt="${GLYPH_PROMPT-# }" \ + --header='' --no-info --margin='1,2' \ + --color='16,gutter:-1' \ <"$FZFPIPE" ) || exit 1 |
