RasmusLindroth / i3av

Lists available bindings for i3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I recommend you check out my new program i3keys instead

You are still free to use i3av if you like, but I will prioritize i3keys.

i3av(ailable)

This Python3 script list keys that isn't being used by i3 as keybindings so you easier can find available keys. You can limit the listing to selected modifier keys and specify the path to the configuration file, see help.

Getting started

# Clone this repo and go to the directory
git clone https://github.com/RasmusLindroth/i3av.git
cd i3av/

# Run the program
./i3av.py

Change keys to list as available

If you would like to change which keys that get listed you can edit i3av.py and lib/keys.py.

In i3av.py you have a line like this:

keys = lib.keys.getKeys(
    ["0-9", "a-z", "nordic", "arrow", "common", "function"])

Current possible keys are 0-9, a-z, nordic, arrow, common, uncommon, function, numpad, numpad_other

If you want to add more keys, just add your keys in the dict keys = {...} located in lib/keys.py.

Change primary modifier key

This script defaults to $mod as the modifier key. You can change this with adding the argument --modvar '$m' or change modVariable in i3av.py.

Custom bindings

If the modifiers provided isn't enough you can add your own with --bindings, e.g. ./i3av.py --bindings '$mod+Mod2' '$mod+Mod4'. You can also change the code, take a look at the dict combinations in i3av.py.

Example

$ ./i3av.py -m
Reading from /home/rasmus/.i3/config

Available $mod:
g, i, o, p, x, oslash, ae, BackSpace, Tab, Pause, Scroll_Lock, Escape, Delete,
Prior, Next, End, Insert, Menu, Break, comma, period, slash, semicolon,
backslash, bracketleft, bracketright, plus, equal, less, greater, apostrophe,
asterisk, grave, section, F1, F4, F6, F7, F8, F9, F10, F11, F12

Help

./i3av.py --help
usage: i3av.py [-h] [--modvar MODVAR] [--config CONFIG] [-m] [-s] [-c] [-t]
               [-b BINDINGS [BINDINGS ...]]

Lists available bindings for i3.

optional arguments:
  -h, --help            show this help message and exit
  --modvar MODVAR       variable name of modkey, e.g. '$m', defaults to $mod
  --config CONFIG       path to configuration file. Otherwise it searches in
                        default locations.
  -m, --mod             available $mod bindings
  -s, --shift           available $mod+Shift bindings
  -c, --ctrl            available $mod+Ctrl bindings
  -t, --triplet         available $mod+Ctrl+Shift bindings
  -b BINDINGS [BINDINGS ...], --bindings BINDINGS [BINDINGS ...]
                        custom binding(s), e.g. '$mod+Mod2'

About

Lists available bindings for i3

License:MIT License


Languages

Language:Python 100.0%