Customising shortcuts
After this page you will be able to change any built-in shortcut, add shortcuts for commands that have none, and switch off the ones you do not want.
How a shortcut is written
Section titled “How a shortcut is written”A shortcut is one or more modifiers and one key, joined by dashes, in lower case:
option-shift-hThe modifiers are cmd, ctrl, option and shift. The order of the modifiers does not
matter. Every shortcut needs at least one modifier.
The key is a letter, a digit or a name such as minus, space or left. The full list is
on the Key names page.
Each shortcut runs one command, written exactly as you would type it
after iguana in a terminal.
Change shortcuts in the config file
Section titled “Change shortcuts in the config file”Shortcuts live in the [bindings] section of ~/.config/iguana/iguana.toml. If you do not
have a config file yet, iguana config init writes one with every built-in shortcut in it.
Your [bindings] section is laid over the built-in shortcuts one entry at a time. You only
need to write the ones you want to change.
Give a new key combination a command:
[bindings]option-q = "close"option-n = "space next"option-p = "space prev"Every built-in shortcut stays as it was.
Bind the new keys and switch off the old ones:
[bindings]option-m = "zoom"option-f = ""If you only add option-m, both option-m and option-f zoom.
Set the shortcut to an empty string, or to false:
[bindings]option-slash = ""option-shift-b = falseThe keys go back to doing whatever they do without Iguana.
Leave it out. A shortcut you do not mention keeps its built-in command.
The file is reloaded when you save it. You can also run iguana reload.
Change shortcuts in the settings window
Section titled “Change shortcuts in the settings window”Open the settings window from the menu bar item, or with iguana settings, and go to the
Shortcuts pane.
- Find the command. Directions, the focused window and desktops each have a table. Any other command goes under Other commands, where you type it first.
- Click its shortcut, or the empty slot if it has none, and type the new keys.
- To switch a shortcut off, click it and press delete. To cancel, press esc.
Right-click a shortcut to add a second one for the same command or to remove it. Restore built-in shortcuts removes your shortcut entries from the file, which brings the built-in set back.
The window writes the same [bindings] entries described above. If the keys you type were
already used by another command, they move to the new one and a notice says so.
The settings window has the details.
Recipes
Section titled “Recipes”Send a window away without following it
Section titled “Send a window away without following it”By default option+shift+1 to 9 take the window to a
desktop and take you with it. Add --stay to stay where you are:
[bindings]option-shift-1 = "move-to-space 1 --stay"option-shift-2 = "move-to-space 2 --stay"option-shift-3 = "move-to-space 3 --stay"Use the arrow keys
Section titled “Use the arrow keys”[bindings]option-left = "focus left"option-down = "focus down"option-up = "focus up"option-right = "focus right"The built-in option-h, option-j, option-k and option-l keep working beside these unless you
switch them off.
Resize in one direction
Section titled “Resize in one direction”The built-in resize shortcuts work on the nearest neighbour. To control width and height separately:
[bindings]option-ctrl-equal = "resize grow width"option-ctrl-minus = "resize shrink width"option-shift-equal = "resize grow height"option-shift-minus = "resize shrink height"Bind the minus key
Section titled “Bind the minus key”Write the key as minus. Because dashes separate the parts of a shortcut, Iguana also reads
a doubled dash at the end as the minus key: option-- is the same as option-minus.
Things to know
Section titled “Things to know”- A shortcut another app already owns may be refused. Iguana then reports
the system refused it (another app may own this shortcut). - A shortcut with a key name Iguana does not know is reported as
unknown key. - The same combination written twice, for example as
option-shift-handshift-option-h, is reported as defined twice, and one of the two is ignored. - A command that does not parse is reported with the reason, and that one shortcut is left as it was.
All of these are warnings. The rest of your shortcuts keep working. To see them:
iguana statusThe output shows how many shortcuts are active, lists any that failed, and shows the last shortcut Iguana received together with its answer. That last line is the quickest way to tell whether a key press reached Iguana at all.