i3 Window Manager Guide
i3 Window Manager Keybindings Overview
The i3 window manager is a highly configurable tiling window manager for X11. It is designed for users who prefer keyboard-driven workflows and efficient window management. This guide provides a comprehensive overview of common i3 keybindings and configuration concepts.
Note: Most i3 keybindings use the ◆ modifier key. This is typically the Alt key by default but is often swapped with the Meta (Windows) key for enhanced usability.
Basic Window Operations
These keybindings are fundamental for interacting with windows in i3.
- Open New Terminal:
◆ + Enter - Open Application Launcher:
◆ + d
Window Splitting and Layouts
Control how new windows are arranged on your screen.
- Change where new window is opened:
- Horizontal split:
◆ + h - Vertical split:
◆ + v
- Horizontal split:
- Change container layout:
- Default (tiled):
◆ + e - Stacked:
◆ + s - Tabbed:
◆ + w - Floating window (drag with
◆ + LeftClick):◆ + Shift + Space
- Default (tiled):
Window Movement and Focus
Navigate and reposition windows efficiently.
- Movement (vim-like):
^ l < j ; > k V - Switch focus around windows in workspace:
◆ + <movement key> - Move windows around workspace:
◆ + Shift + <movement key>
Workspaces Management
Organize your applications into virtual desktops.
- i3 has 10 workspaces by default, labeled 1, 2, ..., 9, 0.
- Change workspace:
◆ + 0-9 - Send focused window to workspace:
◆ + Shift + 0-9
Advanced Window Management
Fine-tune your window layout and behavior.
- Toggle fullscreen:
◆ + f - Enter resize mode: (resize with movement/arrow keys, exit with
Esc)◆ + r - Guide: Precise positioning of newly spawned windows:
When creating a new window, the currently focused window will be split. You can control whether it splits horizontally or vertically with
◆+vor◆+h. You can focus multiple windows at once. For example, with a layout of two windows:+-------+-------+ | . . . | . . . | | . . . | . . . | | . 1 . | . 2 . | | . . . | . . . | | . . . | . . . | +-------+-------+To select both windows (parent container) and split them vertically, so the new window takes half the screen:
- Select parent container:
◆ + a - Vertically spawn new terminal window:
◆+v, then◆+Enter
Resulting layout:
+-------+-------+ | . . . | . . . | | . 1 . | . 2 . | +-------+-------+ | . . . 3 . . . | | . . . . . . . | +---------------+Whenever you split a window by spawning a new one, both windows are placed in an invisible container. You can focus this parent container with
◆+a. - Select parent container:
i3 Configuration
The i3 configuration files define your keybindings, window rules, and overall behavior. They are typically located in the following order of priority:
~/.config/i3/config(or$XDG_CONFIG_HOME/i3/config)~/.i3/config/etc/xdg/i3/config(or$XDG_CONFIG_DIRS/i3/config)/etc/i3/config
You can specify a custom config file with the -c option when starting i3. The default configuration path is usually /etc/i3/config.
Configuration Syntax Examples
- Key bindings: Use
bindsymfor key bindings.
bindsym $mod+4 workspace $ws4
bindsym $mod+Shift+R exec custom-script-in-path.sh --flag1 --flag2
bindcode for direct key code bindings.bindcode 172 exec playerctl play-pause
- Execute once per session:
exec --no-startup-id ~/.config/polybar/launch.sh - Always execute on startup/restart:
exec_always --no-startup-id ~/.config/polybar/launch.sh
set $gamingMode "gaming_mode"
bindsym $mod+g mode $gamingMode
mode $gamingMode {
# Insert declarations for this mode. Useful when normal keybindings fight
# with keybindings of your games. Don't forget to add option to return from
# this mode!
bindsym $mod+Escape mode default
}
bindsym $mod+x move workspace to output right
◆ + Shift + c◆ + Shift + r◆ + Shift + eExternal Resources
- i3 User Guide
- MDN Web Docs (for general web development context)
- Bash Manual