vionya / i3-keybinds-help

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

i3-keybinds-help

I originally wrote a script for this functionality in Python, but decided to rewrite it in Rust for the sake of learning the language.
I have no expectation of this really being useful to anyone, but in the off chance that it is, I may as well provide a bit of explanation.

What it is

The program parses an i3 config file (which it tries to auto-detect), and then spits out a list of any keybindings that have associated documentation. The list is formatted such that it can be piped to dmenu (that is, it's joined by newlines) - I use it with rofi.

A standard "documented keybinding" looks like:

# ## Documentation goes here ##
bindsym $mod+Shift+s *some exec call...*

The program will only extract keybinds with that exact format, so leave any "undocumented" bindings the way they are.

Installation

cargo install --git https://github.com/sardonicism-04/i3-keybinds-help --branch main i3-keybinds-help

Or, if you're feeling adventurous, you can build from source.

git clone https://github.com/sardonicism-04/i3-keybinds-help.git # via HTTPS
git clone git@github.com:sardonicism-04/i3-keybinds-help.git     # via SSH

cd i3-keybinds-help

cargo build

About

License:MIT License


Languages

Language:Rust 100.0%