Skip to content

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 (or rofi if 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 next and workspace prev commands.

Resizing Windows

  • Enter Resize Mode ($mod+r): Enters resize mode. Once in resize mode:
    • h or Left: Shrink width.
    • l or Right: Grow width.
    • k or Up: Shrink height.
    • j or Down: Grow height.
    • Escape or Enter: 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/config on older setups).
  • Example Keybinding:
    # Launch Firefox with $mod+F1
    bindsym $mod+F1 exec firefox
    
    # Take a screenshot with Print Screen
    bindsym Print exec --no-startup-id scrot
    
    # Lock screen with $mod+x
    bindsym $mod+x exec --no-startup-id i3lock -c 000000
    
  • Setting $mod Key:
    # Use Super key as modifier
    set $mod Mod4
    
    # Or use Alt key as modifier
    set $mod Mod1
    
  • Status Bar: i3 uses i3bar with i3status by default. Alternatives like polybar or waybar can be configured in the config file.
  • Gaps (i3-gaps): If using i3-gaps, you can add inner and outer gaps between windows:
    gaps inner 10
    gaps outer 5