i3 – show mapped hotkeys
2019-12-02
165 words
1 min read
Here is a simple script that can show you the hotkeys bound in ~/.config/i3/config :
#!/bin/bash - #=============================================================================== # # FILE: i3-showkeys.sh # # USAGE: ./i3-showkeys.sh # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Amit Agarwal (aka) # ORGANIZATION: Individual # CREATED: 11/26/2019 14:22 # Last modified: Tue Nov 26, 2019 02:43PM # REVISION: --- #=============================================================================== set -o nounset # Treat unset variables as an error > /tmp/keys cd ~/.config/i3 grep '^bindsym $mod' config|grep -v '^#'|grep -v 'move container to'|grep -v 'workspace $ws'|sed 's/bindsym //'|grep -v '='|while read key line do printf "%20s\t?\t%s\n" "$key" "$line" >> /tmp/keys done xterm -e "cat /tmp/keys; read -p 'press any key to continue'" rm -f /tmp/keys
And once this is done, you can bind the script in i3 config like this:
bindsym $mod+Shift+h exec ~/bin/i3-showkeys.sh
Restart i3. And then you can press “Mod key + Shift + h” at any time to see all the bindings in your config.
Related Articles:
- 2019/03/11 cool sed/grep magic to convert output to csv format
- 2011/01/14 bash 4.0 – new feature mapfile
- 2019/10/21 rofi menu with icons
- 2019/10/10 scan your network with bash IP scan script
- 2019/07/08 Add files to dropbox with single curl command
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.