You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SxhkdRofi is a program that parses your sxhkdrc file, used with bspwm to define keybindings, and displays them using Rofi.
I created this because there are a lot of keybindings to know when using bspwm, and having to open the sxhkdrc file everytime you want to find a keybinding can get annoying.
Installation
Prebuilt binaries
At the moment of writing this, prebuilt binaries are not available.
You can install these on Debian based systems with apt:
apt install rofi meson libglib2.0-dev
Compiling
git clone https://github.com/Discusser/SxhkdRofi.git &&cd SxhkdRofi
meson setup builddir &&cd builddir
meson compile
cp SxhkdRofi ~/.local/bin/ # You can copy this anywhere in your PATH and it'll work
Usage
SxhkdRofi outputs keybindings to the terminal to be used with Rofi. You can achieve this with the following command:
rofi -modi 'sxhkd:SxhkdRofi' -show sxhkd
I recommend the following command to make it a bit prettier. You can change the value of theme and theme-str to your liking, but that's just how I've configured it.
The command above creates a menu that looks something like this:
If your sxhkdrc file is not located in the directories SxhkdRofi searches in (see below), you can specify it by passing the -f or --file= flag to SxhkdRofi:
Usage:
SxhkdRofi [OPTION?]
Help Options:
-h, --help Show help options
Application Options:
-f, --file=/path/to/sxhkdrc The path to the sxhkdrc file containing the keybindings. Default: $HOME/.config/sxhkd/sxhkdrc or $XDG_CONFIG_HOME/sxhkd/sxhkdrc
-a, --align-entries=true Whether or not entries should be aligned on the semicolon (with right padding). Default: false