Created
December 16, 2024 02:27
-
-
Save hidsh/2fa52ff83d11ba7b3212123b04b18fd1 to your computer and use it in GitHub Desktop.
shell script: cheat sheet for keybindings of sway
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("%25s\t%s\n", $1, $2)}' FS='\t') | |
w=`expr "$COLUMNS" - 16` | |
s=$(echo ${s} | cut -c -${w}) | |
echo $s | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
result: