i3#

i3 is a manual tiling window manager for X11. It is the default choice in the tiling section because the config is plain text, the keybindings are explicit, the layout model is simple, and the documentation is good. The operator who learns i3 transfers directly to sway on Wayland; the config grammar is shared.

Manual means every window placement is the operator’s call. Horizontal split, vertical split, tabbed, stacked. The default layouts are not algorithms; the operator gets a predictable layout they author keystroke by keystroke. Good for screencasts, good for campaign portability.

Install#

$ sudo apt install i3 i3status i3lock dmenu                     # Debian / Ubuntu
$ sudo dnf install i3 i3status i3lock dmenu                     # Fedora
$ sudo pacman -S i3-wm i3status i3lock dmenu                    # Arch

A first-run wizard creates ~/.config/i3/config and asks for the mod key. Mod4 (Super / Win key) is the standard choice.

Synopsis#

Launch from a display manager (greeter session “i3”) or from startx with exec i3 in ~/.xinitrc. Once running, the operator talks to it through keybindings (configured in the config) and through the IPC socket via i3-msg.

Modes#

Layout

Behaviour

default (split)

New windows tile alongside existing ones in the focused container. Direction toggles with Mod+v (vertical) or Mod+h (horizontal).

tabbed

Stacks windows in the container; one visible, others behind tabs across the top.

stacked

Like tabbed but title bars stack vertically down the container.

floating

Window escapes the tiling tree. Drag with Mod+leftclick, toggle with Mod+Shift+Space.

Bindings are remappable; this is the default i3 config.

Tools#

i3-msg#

IPC client. The operator runs config commands, queries the tree, or scripts i3 from any shell.

Command

Effect

i3-msg workspace 2

Switch to workspace 2.

i3-msg [class="Firefox"] focus

Focus the first Firefox window.

i3-msg layout tabbed

Change focused container layout to tabbed.

i3-msg restart

Reload the binary in place; keeps the layout.

i3-msg -t get_tree

Dump the full window tree as JSON.

$ i3-msg -t get_workspaces | jq -r '.[].name'
$ i3-msg -t get_tree | jq '..|select(.window_properties?)|.window_properties.class'

i3status / i3blocks / i3bar#

i3bar is the panel; i3status (built-in) and i3blocks (community) generate the content. Either reads a small config and emits status JSON on stdout.

$ i3status -c ~/.config/i3status/config

dmenu / rofi#

App launcher. dmenu ships with i3; rofi is a richer replacement with windows, ssh, run, and drun modes.

$ dmenu_run -i                                  # case-insensitive launcher
$ rofi -show drun -modi drun,run,window,ssh

Constraints#

  • X11 only. For Wayland, use Tiling and pick sway (config-compatible) or hyprland.

  • No built-in compositor. Add picom if the operator wants transparency, shadows, or vsync.

  • No window decorations. The operator gets title-bar text in the i3bar only.

Files#

Configuration#

Path

Purpose

~/.config/i3/config

The operator’s config. Keybindings, autostart (exec lines), bar definition, colours, modes.

~/.config/i3status/config

i3status config (when used).

/etc/i3status.conf

System default for i3status.

~/.xsession-errors

X session log. Where errors from exec lines surface.

Variables#

Useful in keybindings and scripts.

Variable

Purpose

DISPLAY

The X server i3 is on; usually :0.

XAUTHORITY

Cookie file for the display.

I3SOCK

IPC socket path; i3-msg discovers it automatically when unset.

Common Tasks#

Reload the config without losing layout.

$ i3-msg reload                                # apply config changes
$ i3-msg restart                               # replace binary in place

Move the focused window to workspace N.

$ i3-msg move container to workspace 3

Rename the focused workspace.

$ i3-msg rename workspace to "3:web"

Programmatically focus a window by class.

$ i3-msg [class="(?i)firefox"] focus

Dump and restore a workspace layout.

$ i3-save-tree --workspace 2 > /tmp/ws2.json
$ i3-msg "workspace 2; append_layout /tmp/ws2.json"

Identify the active i3 version.

$ i3 --version

References#