LinuxCommandLibrary

bspwm

Binary space partitioning window manager

TLDR

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

$ bspwm -c [path/to/config]
copy

SYNOPSIS

bspwm [-v] [-h] [-l logfile] [-c config] [-f ipc_socket] [-p prefix] [-s splice_file]

PARAMETERS

-v
    Print version information and exit

-h
    Print usage information and exit

-l logfile
    Log to the specified logfile instead of stderr

-c config
    Use the specified config instead of ~/.config/bspwm/bspwmrc

-f ipc_socket
    Connect to existing instance via ipc_socket instead of starting new

-p prefix
    Use command prefixed by prefix for external rules

-s splice_file
    Splice layout tree from splice_file on startup

DESCRIPTION

bspwm is a lightweight, highly configurable tiling window manager for the X11 window system. It employs a binary space partitioning (BSP) layout algorithm, organizing windows into a binary tree structure that allows flexible tiling arrangements. Users can switch between layouts like tiled, monocle (fullscreen), and floating modes dynamically.

Unlike traditional stacking window managers, bspwm does not handle input (keyboard/mouse) itself, promoting modularity. Keybindings and mouse actions are delegated to external tools like sxhkd. The manager is controlled via the bspc IPC tool, which sends commands and subscribes to events such as window focus changes or geometry updates.

Configuration occurs through a shell script (bspwmrc), where users set parameters like window gaps, border widths/colors, focus behavior, and rules for specific applications. Features include multiple monitors support, workspace-per-monitor management, pseudo-tiling, window padding, and urgent hint handling. It supports EWMH standards for compatibility with panels and pagers.

bspwm emphasizes minimalism and performance, with no unnecessary dependencies beyond Xlib and xcb. It's popular in the Arch Linux community and ricing scenes for its customization potential via polybar, rofi, and compton/picocom for compositing.

CAVEATS

Requires X11 (no Wayland support); needs external tools like sxhkd for input and bspc for control; autostart via bspwmrc essential; lacks built-in panel or compositor.

CONFIGURATION FILE

Primary config in ~/.config/bspwm/bspwmrc: shell script with bspc config commands like bspc config border_width 2.

IPC AND EVENTS

Use bspc subscribe for events (e.g., window add/remove); control with bspc node/select, desktop -f.

WINDOW RULES

Set via bspc rule -a appname state=floating in bspwmrc for app-specific behavior.

HISTORY

Developed by Bastien Picard starting in 2011-2012, inspired by xmonad, dwm, and wmii. First stable releases around 0.5 in 2013; actively maintained with focus on stability and minimalism. Widely used in minimalistic setups.

SEE ALSO

bspc(1), sxhkd(1), xprop(1), polybar(1)

Copied to clipboard