Created
December 17, 2024 01:13
-
-
Save hidsh/efa7b266356bd8b64412653c4e779f3a to your computer and use it in GitHub Desktop.
sway: show keybinding via fuzzel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# somewhere like `~/.config/sway/config.d/default` | |
# | |
# add a following line to the end of sway config | |
bindsym $mod+k exec PATH/TO/sway-show-keybindings-fuzzel.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
s=$(rg '^ *bindsym +(.+)$' ~/.config/sway/config.d/default | sed -e 's/^ *bindsym *//' | sed 's/ \+/\t/ | |
' | sed 's/\+/ /g' | awk '{printf("%20s | %s\n", $1, $2)}' FS='\t') | |
echo ${s} | fuzzel --dmenu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment