Skip to content

Instantly share code, notes, and snippets.

@hidsh
Created December 17, 2024 01:13
Show Gist options
  • Save hidsh/efa7b266356bd8b64412653c4e779f3a to your computer and use it in GitHub Desktop.
Save hidsh/efa7b266356bd8b64412653c4e779f3a to your computer and use it in GitHub Desktop.
sway: show keybinding via fuzzel
# 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
#!/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