bspc
Manage windows in a binary space partitioning
TLDR
Define two virtual desktops
Focus the given desktop
Close the windows rooted at the selected node
Send the selected node to the given desktop
Toggle full screen mode for the selected node
Set the value of a specific setting
SYNOPSIS
bspc [-h|--help|-v|--version]
bspc <object> <subcommand> [arguments...]
bspc query [selectors] [format_options]
bspc config [property] [value]
PARAMETERS
-h, --help
Displays the help message and exits.
-v, --version
Displays version information and exits.
<object>
Specifies the target category of operation. Common objects include monitor, desktop, node, window, rule, config, query, control, and wm. Each object has its own set of specific subcommands and arguments.
DESCRIPTION
bspc is the command-line client for the bspwm tiling window manager. It acts as the primary interface for users and scripts to interact with and control the bspwm daemon.
Through bspc, users can query the current state of the window manager (e.g., monitor arrangement, desktop contents, window properties, node layouts). More importantly, it allows sending commands to bspwm to modify its behavior and manage windows. This includes actions like focusing windows, moving windows between desktops, resizing nodes, creating or removing desktops, applying window rules, and adjusting global configuration settings.
Its design emphasizes scriptability, making it a cornerstone for creating custom keybindings with tools like sxhkd and for automating window management tasks. bspc communicates with the bspwm daemon via an inter-process communication (IPC) socket.
CAVEATS
bspc
requires the bspwm
daemon to be running to function properly. Without it, commands will fail as there's no daemon to communicate with.
The command's full power comes from understanding its hierarchical structure of objects and subcommands, which can be complex for new users.
Error messages from bspc
can sometimes be concise, requiring familiarity with bspwm
's internal state to diagnose issues.
INTER-PROCESS COMMUNICATION (IPC)
bspc
communicates with the bspwm
daemon using an inter-process communication (IPC) mechanism, typically via a Unix domain socket. This allows external scripts and applications to seamlessly interact with and control the window manager's behavior.
SCRIPTABILITY AND CUSTOMIZATION
The primary strength of bspc
lies in its scriptability. It is commonly used in conjunction with hotkey daemons like sxhkd
to define custom keybindings, enabling users to finely tune their window management workflow and automate complex tasks.
HISTORY
bspwm
and its client bspc
were created by Baptiste Fontaine (baskerville).
First publicly released around 2013, bspwm
introduced a unique approach to tiling window management based on binary space partitioning, differing from traditional static or dynamic tiling managers.
From its inception, bspc
has been the sole and indispensable interface for controlling bspwm
, facilitating its highly customizable and scriptable nature.
Its development has been driven by the philosophy of "do one thing and do it well," with bspwm
focusing on window management logic and bspc
on providing a robust command-line API for interaction.