i3
i3 Window Manager Keybindings
i3 is a tiling window manager for Linux that is entirely keyboard-driven. All default keybindings use $mod, which is typically set to the Super (Windows) key or Alt key in your config file (~/.config/i3/config).
The Most Important Shortcuts
- Open Terminal ($mod+Enter): Launches the default terminal emulator.
- Application Launcher ($mod+d): Opens
dmenu(orrofiif configured) to search and launch applications by name. - Kill Focused Window ($mod+Shift+q): Closes the currently focused window.
- Reload Config ($mod+Shift+c): Reloads the i3 configuration file without restarting.
- Restart i3 ($mod+Shift+r): Restarts i3 in-place, preserving your layout and open windows. Useful after editing the config.
- Exit i3 ($mod+Shift+e): Exits i3 (logs you out of the session). Prompts for confirmation.
Focus & Movement
- Move Focus ($mod+h/j/k/l): Move focus left/down/up/right (Vim-style). Arrow keys also work (
$mod+Left/Down/Up/Right). - Move Focused Window ($mod+Shift+h/j/k/l): Move the focused window in the given direction. Arrow keys also work.
- Focus Parent Container ($mod+a): Move focus to the parent container (useful with nested layouts).
- Focus Child Container ($mod+d): Move focus to the first child container.
Layout & Splits
- Horizontal Split ($mod+b): The next window opened will be placed to the right of the current window.
- Vertical Split ($mod+v): The next window opened will be placed below the current window.
- Toggle Split Direction ($mod+e): Switches the container between horizontal and vertical splitting.
- Stacking Layout ($mod+s): Windows are stacked on top of each other with title bars visible.
- Tabbed Layout ($mod+w): Windows are arranged as tabs, similar to a browser.
- Toggle Floating ($mod+Shift+Space): Toggles the focused window between tiling and floating mode.
- Focus Floating/Tiling ($mod+Space): Switches focus between tiling and floating windows.
- Fullscreen ($mod+f): Toggles fullscreen mode for the focused window.
Workspaces
- Switch to Workspace ($mod+0-9): Switches to workspace 1 through 10.
- Move Window to Workspace ($mod+Shift+0-9): Moves the focused window to workspace 1 through 10.
- Next/Previous Workspace: Not bound by default. Can be configured with
workspace nextandworkspace prevcommands.
Resizing Windows
- Enter Resize Mode ($mod+r): Enters resize mode. Once in resize mode:
horLeft: Shrink width.lorRight: Grow width.korUp: Shrink height.jorDown: Grow height.EscapeorEnter: Exit resize mode.
Scratchpad
- Move to Scratchpad ($mod+Shift+-): Sends the focused window to the scratchpad (a hidden workspace).
- Show Scratchpad ($mod+-): Shows/cycles through scratchpad windows. Press again to hide.
Multi-Monitor
- Focus Output ($mod+Ctrl+h/j/k/l): Move focus to the monitor in the given direction.
- Move Workspace to Output ($mod+Ctrl+Shift+h/j/k/l): Move the current workspace to the monitor in the given direction.
Customization
- Config File:
~/.config/i3/config(or~/.i3/configon older setups). - Example Keybinding:
- Setting $mod Key:
- Status Bar: i3 uses
i3barwithi3statusby default. Alternatives likepolybarorwaybarcan be configured in the config file. - Gaps (i3-gaps): If using
i3-gaps, you can add inner and outer gaps between windows: