LinuxCommandLibrary

i3

Tile and manage application windows

TLDR

Start i3 (Note that a pre-existing window manager must not be open when this command is run)

$ i3
copy

Open a new terminal window
$ <Super Enter>
copy

Move the focused window to a workspace
$ <Super Shift [Number]>
copy

Switch to a workspace
$ <Super [Number]>
copy

Split the next window horizontally
$ <Super h>
copy

Split the next window vertically
$ <Super v>
copy

Open an application launcher
$ <Super d>
copy

SYNOPSIS

i3-msg [-q] [-t <type>] [-v] [-s <socket_path>] <command>

PARAMETERS

-q
    Enables quiet mode, suppressing output.

-t <type>
    Specifies the message type to send (e.g., 'command', 'workspace', 'version').

-v
    Displays the version of i3-msg and exits.

-s <socket_path>
    Connects to a specific i3 IPC socket instead of the default.

<command>
    The i3 command string to execute (e.g., 'focus left', 'workspace 2').

DESCRIPTION

i3 is a dynamic tiling window manager for X11, designed from scratch to be simple, fast, and keyboard-driven. Unlike traditional floating window managers, i3 arranges windows into a non-overlapping grid, maximizing screen space and reducing mouse usage. It features a tree-based layout, allowing windows to be split horizontally or vertically, and organized into tabbed or stacked containers. Configuration is done via a plain text file, offering extensive customization for keybindings, workspace behavior, and application rules.

While "i3" refers to the window manager itself, its command-line interaction utility, i3-msg, is crucial for sending commands to a running i3 instance, controlling layouts, moving windows, and querying information. i3 is popular among developers and power users for its performance, transparency, and predictable behavior.

CAVEATS

i3 has a relatively steep learning curve for new users due to its keyboard-centric design and tiling paradigm. It requires manual configuration via a plain text file, which can be daunting initially. As an X11-native window manager, it does not directly support Wayland; users seeking a similar experience on Wayland typically use sway.

CONFIGURATION

i3 is configured entirely through a plain text file, typically located at ~/.config/i3/config. This file defines keybindings, workspace names, application startup rules, and bar settings, offering extensive control over the window manager's behavior.

INTER-PROCESS COMMUNICATION (IPC)

i3 features a powerful IPC interface, allowing external programs and scripts to interact with the running i3 instance. This enables dynamic control, status reporting, and integration with other utilities, forming the basis for commands like i3-msg.

WORKSPACES AND CONTAINERS

Windows in i3 are organized within virtual workspaces, which can be navigated and named. Within workspaces, windows are managed in a tree of containers, which can be split horizontally or vertically, and transformed into stacked or tabbed layouts, providing flexible window arrangement.

HISTORY

i3 was created by Michael Stapelberg and initially released around 2009. It emerged as an alternative to existing tiling window managers like wmii and dwm, aiming for a cleaner codebase, easier configuration, and a more robust Inter-Process Communication (IPC) mechanism. Its focus on simplicity, speed, and clear documentation, combined with its tree-based window management, quickly established it as a popular choice among Linux power users and developers.

SEE ALSO

i3-msg(1), i3bar(1), i3lock(1), i3status(1), sway(1), xrandr(1)

Copied to clipboard