Configuring keybindings - AxOS-project/Theom GitHub Wiki

Configuring keybindings

You can configure how your system responds to key presses by editing the keybindings.conf file in theom.

Table of contents

Getting Started

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.

Editing Keybindings

Understanding the syntax

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

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.

Reloading Keybindings

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).

What if I Break it?

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:

  1. Try opening a terminal. If you can't, press Ctrl + Alt + F3 to enter a TTY.
  2. 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/
  1. Re-login

⚠️ **GitHub.com Fallback** ⚠️