Configuring keybindings - AxOS-project/Theom GitHub Wiki
You can configure how your system responds to key presses by editing the keybindings.conf
file in theom.
The keybindings are stored at ~/.config/.theom/keybindings.conf
. keybindings.conf
uses the same syntax as of the i3wm configuration file because keybindings.conf
is a part of i3wm.
Caution
keybindings.conf
is a part of the window manager, be careful when editing it.
The syntax of keybindings.conf
is identical to i3wm configuration file, so this config file contains variables, keybindings, actions etc.
Each keybinding starts with the bindsym
syntax followed by the key combo and the action that we want to perform.
bindsym <key combo> <action>
For example:
bindsym $mod+Return exec alacritty
- bindsym defines the keybinding
- $mod+Return is the keycombo, $mod is a variable because it starts with the
$
character. Mod is equivalent to the Super/Windows key and the Return is equivalent to the enter key. - alacritty is the command to run. The
alacritty
command opens the alacritty terminal.
Variables let you reuse values across the file. They are defined like this:
set $mod Mod4
-
$mod
becomes a shortcut for Mod4 (The Super/Windows key).
Mod is the only variable defined in the config by default. If you want to make your config more clean, you can add more variables here.
If you completed editing the keybindings, you reload them by restarting the window manager. You can restart the window manager by running i3-msg restart
in the terminal or by pressing Super+Shift+r
(default keybinding).
Theom is very strict about configuring and follows the unix principles, if you break something, nothing will save you.
So, if you break the keybindings, do these setps:
- Try opening a terminal. If you can't, press
Ctrl + Alt + F3
to enter a TTY. - Remove your current config or restore the default config:
# Option 1: Remove and let Theom auto-regenerate the default config on next login
rm ~/.config/.theom/keybindings.conf
# Option 2: Manually restore the default keybindings
cp /usr/share/theom/config/.theom/keybindings.conf ~/.config/.theom/
- Re-login