i3-bindings
Simple tool that reads the i3 config files and shows a table with the bindings defined therein. See the Example below for an example of how the printed table looks like.
If you would like to add some new functionality, or help me make my code mode idiomatic, then issues and PRs are more than welcome
Functionality
- print the keybindings as a table
- optionally print them as a
csv
to stdout (so that can be easily piped to other software [eg. BurntSushi/xsv]) - sort bindings by different criteria
- only show keybindings in a given category
- optionally wait for input after printing (useful if you want to do something like
alacritty -e i3-bindings -b
to open a temporary terminal that shows your bindings)
Installation
For the moment you can install this in your PC by cloning the repo and running:
cargo install --path .
Or you can check the release page and see if there is any precompiled executable available for your system, which you can directly download and place it somewhere in your path.
Usage
See i3-bindings --help
for a help message about the available options. However, in most cases you'll be fine with just running i3-bindings
and leave everything with default values.
How to use format config file
If you want, you can specify categories in your config
file so that when printing the table bindings are logically grouped. However this is not required.
Categories: for categories to be printed as in the example below, you need to add comments in your i3 config that specify the category for a group of bindings. All bindings below the comment will have the specified category until a new one is specified. The default category is default
.
For example:
# Category: Layout
#Split in horizontal orientation
bindsym $mod+Mod1+h split h
#Split in vertical orientation
bindsym $mod+Mod1+v split v
# Category: Some other category
...etc...
Note that all comments in the file are completely ignored except for those about a Category:
(which are used to define categories) as well as the comments on the same line as a binding (which are shown as part of the command in the table).
Example
When executed, the tool will read your i3 config file and print something like this to the console:
โโโโโโโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โCategory โActual Binding โ
โโโโโโโโโโโโซโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โLayout โ Symbol $mod+Mod1+h split h โ
โ โ Symbol $mod+Mod1+v split v โ
โ โ Symbol $mod+e layout toggle split โ
โ โ Symbol $mod+f fullscreen toggle โ
โ โ Symbol $mod+m focus child โ
โ โ Symbol $mod+s layout stacking โ
โ โ Symbol $mod+space floating toggle โ
โ โ Symbol $mod+u focus parent โ
โ โ Symbol $mod+w layout tabbed โ
โโโโโโโโโโโโซโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โMain โ Symbol $mod+Return alacritty โ
โ โ Symbol $mod+d --no-startup-id rofi -show combi โ
โ โ Symbol $mod+n --no-startup-id systemsettings5 โ
โ โ Symbol Ctrl+Shift+q kill โ
โโโโโโโโโโโโซโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โMove Focusโ Symbol $mod+Down focus down โ
โ โ Symbol $mod+Left focus left โ
โ โ Symbol $mod+Right focus right โ
โ โ Symbol $mod+Shift+Down move down โ
โ โ Symbol $mod+Shift+Left move left โ
โ โ Symbol $mod+Shift+Right move right โ
โ โ Symbol $mod+Shift+Up move up โ
โ โ Symbol $mod+Shift+h move left โ
โ โ Symbol $mod+Shift+j move down โ
โ โ Symbol $mod+Shift+k move up โ
โ โ Symbol $mod+Shift+l move right โ
โ โ Symbol $mod+Up focus up โ
โ โ Symbol $mod+h focus left โ
โ โ Symbol $mod+j focus down โ
โ โ Symbol $mod+k focus up โ
โ โ Symbol $mod+l focus right โ
โโโโโโโโโโโโซโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โPersonal โ Symbol $mod+$alt+b alacritty -e i3-bindings โ
โ โ Symbol $mod+$alt+c $EDITOR ~/.config/i3/config โ
โ โ Symbol $mod+$alt+d dolphin โ
โ โ Symbol $mod+$alt+e $EDITOR โ
โ โ Symbol $mod+$alt+g chromium โ
โ โ Symbol $mod+$alt+q fish -c ask-and-run-command-in-new-term โ
โ โ Symbol $mod+$alt+r alacritty -e ranger โ
โ โ Symbol $mod+$alt+s spotify-wrapper โ
โ โ Code $mod+34 picom #34 - [ โ
โ โ Code $mod+35 killall picom #35 - ] โ
โ โ Code $mod+Shift+35 ~/.config/polybar/launch.sh โ
โ โ Symbol $mod+equal gaps inner all plus 5 โ
โ โ Symbol $mod+minus gaps inner all minus 5 โ
โ โ Symbol Ctrl+$alt+l ~/.shellscripts/lock-screen.fish โ
โ โ Symbol Ctrl+Print scrot '%Y%m%d_%H%M%S.png' -e 'mv $f ~/Pictures/Screenshots/' โ
โ โ Symbol XF86AudioLowerVolume pactl set-sink-volume 0 -2% โ
โ โ Symbol XF86AudioMicMute pactl set-source-mute 1 toggle โ
โ โ Symbol XF86AudioMute pactl set-sink-mute 0 toggle โ
โ โ Symbol XF86AudioRaiseVolume pactl set-sink-volume 0 +2% โ
โ โ Symbol XF86MonBrightnessDown fish -c "increase-display-backlight-by -30" โ
โ โ Symbol XF86MonBrightnessUp fish -c "increase-display-backlight-by 30" โ
โโโโโโโโโโโโซโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โResize โ Symbol $mod+r mode "resize" โ
โ โ Symbol $mod+r mode "default" โ
โ โ Symbol Down resize grow height 8 px or 2 ppt โ
โ โ Symbol Escape mode "default" โ
โ โ Symbol Left resize shrink width 8 px or 2 ppt โ
โ โ Symbol Right resize grow width 8 px or 2 ppt โ
โ โ Symbol Up resize shrink height 8 px or 2 ppt โ
โ โ Symbol h resize shrink width 8 px or 2 ppt โ
โ โ Symbol j resize grow height 8 px or 2 ppt โ
โ โ Symbol k resize shrink height 8 px or 2 ppt โ
โ โ Symbol l resize grow width 8 px or 2 ppt โ
โโโโโโโโโโโโซโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โRestart โ Symbol $mod+Shift+e "i3-nagbar -t warning -m 'Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'" โ
โ โ Symbol $mod+Shift+r restart โ
โโโโโโโโโโโโซโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โWorkspacesโ Symbol $mod+0 workspace 10 โ
โ โ Symbol $mod+1 workspace 1 โ
โ โ Symbol $mod+2 workspace 2 โ
โ โ Symbol $mod+3 workspace 3 โ
โ โ Symbol $mod+4 workspace 4 โ
โ โ Symbol $mod+5 workspace 5 โ
โ โ Symbol $mod+6 workspace 6 โ
โ โ Symbol $mod+7 workspace 7 โ
โ โ Symbol $mod+8 workspace 8 โ
โ โ Symbol $mod+9 workspace 9 โ
โ โ Symbol $mod+Shift+0 move container to workspace 10 โ
โ โ Symbol $mod+Shift+1 move container to workspace 1 โ
โ โ Symbol $mod+Shift+2 move container to workspace 2 โ
โ โ Symbol $mod+Shift+3 move container to workspace 3 โ
โ โ Symbol $mod+Shift+4 move container to workspace 4 โ
โ โ Symbol $mod+Shift+5 move container to workspace 5 โ
โ โ Symbol $mod+Shift+6 move container to workspace 6 โ
โ โ Symbol $mod+Shift+7 move container to workspace 7 โ
โ โ Symbol $mod+Shift+8 move container to workspace 8 โ
โ โ Symbol $mod+Shift+9 move container to workspace 9 โ
โ โ Symbol $mod+Shift+m move workspace to output left โ
โ โ Symbol $mod+Shift+n move workspace to output left โ
โ โ Symbol Ctrl+$mod+Left workspace prev โ
โ โ Symbol Ctrl+$mod+Right workspace next โ
โโโโโโโโโโโโฉโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Similar projects
These are some project with a similar functionality, in case you want to check them out
- regolith-linux/remontoire
- Reads config file and shows keybindings in a gtk window
- RasmusLindroth/i3keys
- Reads your config file and lets you know which combination of keys are still available to be mapped