You are not logged in.

#1 2026-08-19 19:20:44

zappathustra
Member
Registered: 2014-06-15
Posts: 32

A script to display i3 bindings with Pango markup.

I've wanted something to list my i3 bindings for a long time. Using grep was unsatisfactory, if only because it requires a terminal, and I was envious of AwesomeWM's hotkeys popup.

Then I found `pango-view` by accident. The rest was only a matter of Ruby fun. I got a little carried away, so there are a few options, perhaps unnecessary, but I quite like the result:

i3bindings example

The strong point, I think, is that you can use substitutions to make bindings more readable. For instance, you can turn

bindsym $mod+Shift+b exec --no-startup-id i3bindings

into the fifth line under the Misc header in the picture: "$mod+" (which I always use and is thus redundant information) is removed, "Shift+b" becomes "B", and "exec --no-startup-id" is also removed.

The code is available at https://github.com/zappathustra/i3bindings.

Ideas and criticisms welcome!

Offline

Board footer

Powered by FluxBB