I3 Window Manager Default Keyboard Shortcuts Tutorial Guide
The i3 window manager is a highly customizable and efficient tool for managing your desktop environment, and mastering its default keyboard shortcuts can significantly enhance your productivity. Here is a comprehensive guide to the default keyboard shortcuts for the i3 window manager, updated for 2024.
General Shortcuts
These shortcuts are essential for navigating and managing your i3 environment.
- Open Terminal:
$mod+Enter
(Alt+Enter by default) opens a new terminal, which will fill the available screen space. - Open Application Launcher:
$mod+d
(Alt+D by default) opens dmenu, a text-based program launcher. - Resize Mode:
$mod+r
(Alt+R by default) toggles resize mode, allowing you to resize windows and containers. - Exit i3:
$mod+Shift+e
(Alt+Shift+E by default) exits the i3 session. - Restart i3:
$mod+Shift+r
(Alt+Shift+R by default) restarts i3 in place, preserving windows and layouts. - Reload Configuration:
$mod+Shift+c
(Alt+Shift+C by default) reloads the i3 configuration file, useful for adding new custom shortcuts without restarting.
Window Management
These shortcuts help you manage and manipulate windows within i3.
- Focus Window:
$mod+j
(Alt+J by default) focuses the window to the left.$mod+k
(Alt+K by default) focuses the window below.$mod+l
(Alt+L by default) focuses the window above.$mod+;
(Alt+; by default) focuses the window to the right.
- Move Window:
$mod+Shift+j
(Alt+Shift+J by default) moves the focused window to the left.$mod+Shift+k
(Alt+Shift+K by default) moves the focused window down.$mod+Shift+l
(Alt+Shift+L by default) moves the focused window up.$mod+Shift+;
(Alt+Shift+; by default) moves the focused window to the right.
- Close Window:
$mod+Shift+q
(Alt+Shift+Q by default) closes the currently focused window. - Fullscreen Mode:
$mod+f
(Alt+F by default) toggles the fullscreen mode for the currently selected window.
Layout and Container Management
These shortcuts help you manage the layout and containers within i3.
- Split Layout:
$mod+v
(Alt+V by default) splits the window vertically.$mod+h
(Alt+H by default) splits the window horizontally.
- Layout Modes:
$mod+s
(Alt+S by default) switches to stacked layout.$mod+w
(Alt+W by default) switches to tabbed layout.$mod+e
(Alt+E by default) toggles between vertical and horizontal split layouts or reverts to split layout if in stacked or tabbed mode.
- Floating Mode:
$mod+Shift+Space
(Alt+Shift+Space by default) toggles between floating and tiling modes.
Workspace Management
These shortcuts help you manage and navigate workspaces in i3.
- Switch Workspace:
$mod+Num
(e.g., Alt+1, Alt+2, etc.) switches to the corresponding workspace number. - Move Window to Workspace:
$mod+Shift+Num
(e.g., Alt+Shift+1, Alt+Shift+2, etc.) moves the focused window to the corresponding workspace number.
Advanced Tips and Customization
Customizing Keybindings
i3 allows extensive customization of its keybindings. To change the default keybindings, you need to edit the i3 configuration file. Here’s how:
- Copy the Default Configuration: Copy the default configuration file to your user directory:
cp /etc/i3/config ~/.i3/config
orcp /etc/i3/config ~/.config/i3/config
if you prefer the XDG directory scheme. - Edit the Configuration: Open the copied file with a text editor and modify the keybindings as needed. For example, to change the modifier key from Alt to the Windows key, you would add
set $mod Mod4
to your configuration file.
Using Comments in Configuration
Comments in the configuration file are started with a #
and can only be used at the beginning of a line. This is useful for documenting your setup for later reference.
Floating Modifier
You can configure a floating modifier to move floating windows more easily. For example, setting floating_modifier Mod1
allows you to press the modifier key (e.g., Alt), click on a floating window, and drag it to the desired position.
By mastering these default keyboard shortcuts and understanding how to customize i3 to your needs, you can significantly enhance your productivity and workflow.