i3

Also known as: i3wm

On this page 7

i3 (also written i3wm) is a manual tiling window manager for the X Window System that arranges application windows side by side without overlap and is driven mainly from the keyboard. On the Linux desktop it replaces the window-management part of a full environment such as GNOME or Xfce, giving users precise control over layout with very low resource use.

First released in 2009, i3 is written in C, configured through a single plain-text file and documented thoroughly. It became one of the most widely used tiling window managers in Linux and BSD systems and inspired Sway, its compatible successor for Wayland.

How i3 organizes windows in a container tree

i3 stores the whole screen as a tree of containers. The root holds one node per output (monitor), each output holds workspaces, and each workspace holds split containers and windows. Every container has a layout and an orientation that decide how its children share space, so the visible arrangement is a direct picture of that tree.

Tiling in i3 is manual rather than dynamic. Dynamic managers such as dwm or xmonad place new windows according to a fixed algorithm, while i3 opens each new window next to the focused one using the split direction chosen by the user. The user therefore decides the structure with commands such as split horizontal or split vertical, and i3 keeps it stable.

The four container layouts in the following table are the building blocks of every i3 screen.

LayoutHow children appearTypical use
splithSide by side, left to rightEditor next to terminal
splitvStacked top to bottomLog output under a shell
tabbedOne visible, tabs on topSeveral browser windows
stackingOne visible, title list aboveMany small tool windows
Container layouts in i3

Windows can also be floating, which takes them out of the tree for dialogs and pop-ups. A special hidden workspace, the scratchpad, keeps a floating window ready to appear and disappear with one key, which suits a calculator or a quick terminal.

Configuration, key bindings and workspaces

All behavior of i3 comes from a text configuration file, usually stored at ~/.config/i3/config. On first start a wizard generates a default file and asks whether the modifier key should be Alt (Mod1) or the Super key (Mod4). Changes take effect after a reload, without logging out, so users refine their setup in small, safe steps.

The configuration uses short directives. bindsym maps keys to commands, exec starts programs, for_window applies rules to matching windows and assign sends an application to a chosen workspace. Modes, such as the default resize mode, change what keys do until the user leaves them, which keeps the number of shortcuts manageable.

DirectivePurposeExample effect
bindsymBinds a key combination to a commandMod+Enter opens a terminal
exec and exec_alwaysStarts programs at login or reloadLaunches a notification daemon
for_windowApplies rules to matching windowsMakes dialogs float
assignPlaces an app on a workspaceBrowser always on workspace 2
modeDefines a temporary key mapArrow keys resize windows
barConfigures the status barShows i3status output
Important configuration directives

Workspaces are numbered or named virtual desktops created on demand and removed when empty. With several monitors, each output shows its own workspace, and i3 uses RandR to detect screen changes, so moving a workspace to another monitor is a single command.

The i3 ecosystem: i3bar, IPC and companion tools

i3 deliberately does one job and delegates the rest to small programs. The status bar, i3bar, draws workspace buttons and a status line produced by a separate generator such as i3status, i3blocks or Polybar. Application launching is usually handled by dmenu or rofi, and screen locking by i3lock.

Automation relies on the IPC interface, a Unix socket that accepts commands and returns JSON describing the tree, workspaces and outputs. The i3-msg tool sends commands from shell scripts, and libraries in Python, Go and other languages subscribe to events such as window focus or workspace changes. Since version 4.22, released in 2023, i3 also includes gaps between windows, a feature that previously required the i3-gaps fork.

i3 compared with other Linux desktop options

i3 sits between full desktop environments and minimal dynamic tilers. The next table places it among neighboring options so that the trade-offs are visible.

OptionDisplay protocolTiling modelMain trade-off
i3X11Manual, tree basedMature and stable, X11 only
SwayWaylandManual, i3 compatibleModern stack, some X11 tools differ
HyprlandWaylandDynamic with animationsVisual effects, faster change
dwm and xmonadX11Dynamic, algorithmicConfigured in source code
GNOME and KDE PlasmaWayland or X11Floating, optional tilingIntegrated but heavier
i3 versus related window managers and desktops

Because Sway reads most i3 configuration files almost unchanged, i3 users can move to Wayland with little relearning. Applications that still need X11 run under XWayland in that case, while i3 itself remains tied to the X server.

Strengths, limitations and common pitfalls

The main strength of i3 is predictable, keyboard-first productivity with memory use typically measured in a few megabytes. Its main cost is that the user must assemble the rest of the desktop: network applets, notifications, display settings and power management are not included.

SymptomLikely causeFix
New windows open in odd placesWrong split orientationSet split direction before opening
Screen tearing in videoNo compositor runningStart picom through exec
Dialogs fill the whole screenMissing floating ruleAdd a for_window floating rule
Settings apps do not apply themesNo settings daemonRun xsettingsd or a GTK theme tool
Keys stop working after editsConfig syntax errorCheck with the config test option
Frequent problems and their fixes

A further limitation is that i3 will not gain Wayland support; its developers recommend Sway for that path. For users who stay on X11, however, i3 remains a stable, well-documented and actively maintained choice.

Understanding it simply

Most computer screens let windows pile up on top of each other like papers on a messy desk. i3 instead arranges every window like tiles on a floor, so they always fill the screen without covering each other.

You move and resize these tiles mostly with keyboard shortcuts instead of the mouse. It takes a few days to learn, but afterwards many people find they work faster and stay more focused, because everything they need is always visible.

Applied in practice

A backend developer works on a laptop with 8 GB of memory connected to a 27-inch external monitor. She replaces the default desktop with i3 and assigns her code editor to workspace 1, a browser to workspace 2 and chat to workspace 3, so each task lives in a fixed place.

On workspace 1 she splits the screen horizontally, keeps the editor on the left at about 60 percent width and stacks two terminals vertically on the right, one for tests and one for server logs. A scratchpad terminal toggles with a single key for quick commands, and a small Python script uses the IPC interface to rename workspaces after the active project.

The result is a layout she reaches from any window in one or two keystrokes, with the window manager itself using less memory than a single browser tab.