Tiling Window Manager X11

bspwm Binary Space Partitioning Window Manager

bspwm is a lightweight tiling window manager for X11 that organizes windows as the leaves of a full binary tree. Control your desktop through bspc, configure shortcuts with sxhkd, and build a fast, minimal Linux workflow.

Lightweight Minimal resource usage
Multi-Monitor Flexible workspace control
Highly Configurable Control with bspc
bspwm.desktop
X11
>_ terminal
I
user@linux : ~ $
bspc query -N -n .window
0x00400003 0x00600007 0x0080000A
user@linux : ~ $
# bspwmrc
II
01 bspc monitor -d I II III IV V 02 bspc config border_width 2 03 bspc config window_gap 10 04 bspc config split_ratio 0.52 05 bspc config borderless_monocle true
WINDOW MODE Binary Tiling
CONTROL bspc
HOTKEYS sxhkd
DISPLAY X11
WORKSPACES
TILED
Layout Binary Tree
Window Manager Running
UNDERSTANDING BSPWM

What Is bspwm?

bspwm, short for Binary Space Partitioning Window Manager, is a lightweight tiling window manager for X11. Instead of placing windows freely on the desktop, bspwm represents them as the leaves of a full binary tree and automatically divides available screen space between them.

Its design separates window management from keyboard input. The bspwm process manages windows and desktops, while bspc sends commands to bspwm through its socket. Keyboard and pointer shortcuts are commonly handled by sxhkd, giving users precise control over how their desktop behaves.

Automatic Tiling Windows are arranged using a binary tree structure.
Command-Based Control Use bspc to control monitors, desktops, nodes and settings.
Independent Hotkeys sxhkd can translate keyboard shortcuts into bspc commands.
HOW BSPWM WORKS
ACTIVE
WINDOW STRUCTURE Full Binary Tree
3 WINDOWS
Terminal
$ bspc query -N
Editor
Browser
ROOT
WINDOW
SPLIT
Control Flow Simple modular architecture
sxhkd Hotkeys
→
bspc Commands
→
bspwm Windows
Architecture Minimal & Modular
CORE CAPABILITIES

Key Features of bspwm

bspwm focuses on fast window management, predictable tiling and complete configuration control. Its binary-tree layout, command-based architecture and modular workflow make it especially useful for users who prefer a minimal and keyboard-driven Linux desktop.

01

Binary Tree Window Tiling

bspwm represents windows as leaves of a full binary tree. Each new window becomes part of a split structure, allowing the available screen area to be divided in a predictable and organized way.

Terminal
Editor
Browser
02

Control with bspc

The bspc command-line client communicates with bspwm and can be used to manage nodes, desktops, monitors and configuration settings from scripts or terminal commands.

$ bspc config window_gap 10 ✓
03

Keyboard-Driven Workflow

bspwm is commonly paired with sxhkd for keyboard shortcuts. This keeps hotkey handling separate from the window manager and gives users freedom to define their own workflow.

Super + Enter → Terminal
04

Multiple Monitor Support

Manage different monitors and desktops independently. bspwm can assign desktops to displays and lets you move or focus windows across monitors using simple bspc commands.

I Monitor 1
II Monitor 2
05

Flexible Window States

Windows are not limited to one layout style. bspwm supports tiled, pseudo-tiled, floating and fullscreen states, allowing individual windows to behave differently when needed.

Tiled Floating Fullscreen
06

Highly Configurable

Settings such as border width, window gaps, split ratio, focus behavior and desktop rules can be controlled through the bspwmrc configuration file and bspc commands.

Window Gap
Split Ratio
Border Width
BSPWM LAYOUT ENGINE
TILED
Terminal
$ bspc node -f next.local
NODE A
Editor
NODE B
Browser
NODE C
ACTIVE SPLIT Vertical → Horizontal
52%
48%
DESKTOPS Workspace Control
Monitor 1
Structure Binary Tree
Current State Tiled
WINDOW MANAGEMENT

How bspwm Manages Windows

bspwm organizes the desktop around a tree of nodes. Each managed window occupies a node, while internal nodes define how the available screen space is split between windows.

This structure allows windows to be focused, moved, resized and rearranged without relying on traditional overlapping placement. Desktops belong to monitors, and each desktop can maintain its own independent binary tree.

01
A Window Becomes a Node

When a new managed window appears, bspwm inserts it into the current desktop's tree according to the active insertion point.

02
The Existing Space Is Split

The selected node is divided and screen space is shared between the existing window and the newly inserted window.

03
bspc Controls the Tree

Commands can focus nodes, move them between desktops, change states, adjust split ratios and modify layout behavior.

Common Window States Control individual windows as needed
Tiled Managed by the tree
Floating Free window placement
Fullscreen Occupies the display
GETTING STARTED

How to Install bspwm

Install bspwm together with sxhkd, add the example configuration files, and make the bspwm startup script executable. Choose your Linux distribution below to view the appropriate setup commands.

01
Install bspwm & sxhkd Install the window manager and hotkey daemon using your distribution's package manager.
02
Copy Configuration Files Create the bspwm and sxhkd configuration directories and install the example configuration files.
03
Make bspwmrc Executable The bspwmrc file is a shell script, so it must have executable permission before bspwm starts.
04
Start Your Session Start bspwm from your X session or select it through your display manager.
installation
READY
METHOD 01 Arch Linux
pacman
Install packages
$ sudo pacman -S bspwm sxhkd
Create configuration
install -Dm755 /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm/bspwmrc install -Dm644 /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd/sxhkdrc
i

The example bspwmrc file is installed with executable permission, while sxhkdrc contains the keyboard shortcut configuration.

METHOD 02 Debian / Ubuntu
apt
Update package information
$ sudo apt update
Install bspwm
$ sudo apt install bspwm
Create config directories
$ mkdir -p ~/.config/bspwm ~/.config/sxhkd
i

Debian's bspwm package depends on sxhkd, so the hotkey daemon is normally installed automatically with bspwm.

METHOD 03 Build from Source
GitHub
Clone the repository
$ git clone https://github.com/baskerville/bspwm.git
Enter the directory
$ cd bspwm
Build and install
make sudo make install
!

Building from source requires the development dependencies listed by the bspwm project, including libxcb and the relevant xcb utility libraries.

Configuration ~/.config/bspwm/bspwmrc
Hotkey Daemon sxhkd
PERSONALIZE YOUR DESKTOP

bspwm Configuration Guide

bspwm is configured mainly through the bspwmrc startup script. You can define desktops, window gaps, border sizes, split behavior, focus settings and application rules with simple bspc commands.

~/.config/bspwm/bspwmrc
CONFIG
01 bspc monitor -d I II III IV V VI VII VIII IX X
02
03 bspc config border_width 2
04 bspc config window_gap 10
05 bspc config split_ratio 0.52
06 bspc config borderless_monocle true
07 bspc config gapless_monocle true
08
09 bspc rule -a Firefox desktop=^2
10 bspc rule -a Gimp state=floating
11
12 sxhkd &
bspwmrc Shell Script
APPEARANCE

Window Gaps & Borders

Adjust the spacing between tiled windows and control the width of active or inactive window borders.

Window Gap 10px
Border Width 2px
LAYOUT

Split Ratio

Control how much space each side of a binary split receives when bspwm inserts and arranges windows.

52%
48%
WORKSPACES

Desktop Names

Define your preferred desktop names for each monitor and move windows between them with bspc commands or keyboard shortcuts.

I II III IV V
APPLICATIONS

Window Rules

Rules can automatically assign applications to desktops or open specific programs in floating, fullscreen or other states.

Firefox Desktop II
Gimp Floating
STARTUP FLOW What happens when bspwm starts?
Simple configuration workflow
01 bspwm Starts The window manager launches your bspwm session.
→
02 bspwmrc Runs Your startup script applies bspc configuration commands.
→
03 sxhkd Starts Keyboard shortcuts become available for window control.
→
04 Desktop Ready bspwm is configured and ready for your workflow.
KEYBOARD WORKFLOW

bspwm Keyboard Shortcuts with sxhkd

bspwm does not handle keyboard shortcuts itself. A separate hotkey daemon such as sxhkd is commonly used to map key combinations to terminal commands and bspc actions. This keeps the window manager simple while giving you full control over your keyboard workflow.

01

Open a Terminal

Launch your preferred terminal instantly with a simple Super-key combination.

Super + Enter
02

Close a Window

Send a command to the focused node and close the selected application quickly.

Super + W
03

Focus Another Window

Move focus between neighboring windows without touching the mouse.

Super + H J K L
04

Switch Desktop

Jump between numbered desktops and keep different tasks organized in separate workspaces.

Super + 1–9
05

Move a Window

Send the focused window to another desktop while keeping your current workspace organized.

Super + Shift + 1–9
06

Toggle Floating Mode

Change a selected window from tiled behavior to a floating state when free placement is more useful.

Super + Shift + T
Your shortcuts are completely customizable

These combinations are examples of a keyboard-driven setup. Edit your ~/.config/sxhkd/sxhkdrc file to choose the shortcuts and commands that match your own workflow.

~/.config/sxhkd/sxhkdrc HOTKEYS
TERMINAL
# terminal emulator super + Return alacritty
WINDOW CONTROL
# close focused window super + w bspc node -c
# toggle floating state super + shift + t bspc node -t ~floating
DESKTOPS
# focus desktop super + {1-9} bspc desktop -f '^{1-9}'
# send node to desktop super + shift + {1-9} bspc node -d '^{1-9}'
FOCUS
# focus neighboring node super + {h,j,k,l} bspc node -f {west,south,north,east}
sxhkd running
KEYBOARD → BSPC → BSPWM
Super Modifier Key Your main shortcut layer
TROUBLESHOOTING GUIDE

Common bspwm Problems & Fixes

Most bspwm issues come from session startup, configuration files, sxhkd, window rules or monitor setup. Use these quick checks to find common problems and understand where to look when your bspwm setup does not behave as expected.

bspwm troubleshoot DIAGNOSTIC
!
PROBLEM 01

bspwm does not start

If the bspwm session fails immediately, check that the main configuration file exists and has executable permission. bspwmrc is a shell script, so permission or syntax problems can prevent the session from starting correctly.

QUICK CHECK
$ chmod +x ~/.config/bspwm/bspwmrc
1 Check the file Confirm bspwmrc exists in ~/.config/bspwm/.
2 Check permissions Make sure bspwmrc is executable.
3 Check syntax Run the script manually and look for errors.
!
PROBLEM 02

Black screen after login

A minimal bspwm session may look almost empty because bspwm does not provide a desktop panel, launcher or wallpaper by itself. If no shortcuts work either, check whether sxhkd started successfully.

CHECK SXHKD
$ pgrep -a sxhkd
1 Test a terminal shortcut Confirm your sxhkd terminal command is valid.
2 Check sxhkd Make sure the hotkey daemon is running.
3 Check startup apps Panel and wallpaper tools are separate from bspwm.
!
PROBLEM 03

Keyboard shortcuts do not work

bspwm does not process keyboard shortcuts itself. If your keybindings stop working, the issue is usually related to sxhkd, its configuration, a conflicting shortcut or an invalid command.

RELOAD SXHKD
$ pkill -USR1 -x sxhkd
1 Verify sxhkdrc Check ~/.config/sxhkd/sxhkdrc for errors.
2 Reload shortcuts Reload sxhkd after editing the configuration.
3 Check key conflicts Another program may already be using the shortcut.
!
PROBLEM 04

bspwmrc changes are not applied

Editing bspwmrc does not automatically guarantee that every new command has already been applied to the running session. Test the command directly with bspc or rerun the configuration script.

RUN CONFIG
$ ~/.config/bspwm/bspwmrc
1 Save the file Make sure your editor actually saved the changes.
2 Run it manually Shell errors will become easier to identify.
3 Test with bspc Try the individual command before restarting.
!
PROBLEM 05

Application rule is not working

bspwm rules depend on the application properties used by your rule. If a program does not match the expected class or name, the rule may never be applied.

INSPECT WINDOW
$ xprop WM_CLASS
1 Inspect WM_CLASS Click the application after running xprop.
2 Check the rule Use the correct application class in bspc rule.
3 Test again Close and reopen the app after changing the rule.
!
PROBLEM 06

Desktops appear on the wrong monitor

bspwm keeps a list of monitors, and desktops belong to monitors. If your monitor order changes, review the monitor names and then assign desktops to the intended display.

LIST MONITORS
$ bspc query -M --names
1 List monitor names Identify the names bspwm currently sees.
2 Review bspwmrc Check which desktops are assigned to each monitor.
3 Apply again Reload your monitor and desktop configuration.
BEST APPROACH Check one layer at a time
sxhkd → bspc → bspwm
CONFIGURATION Check bspwmrc first

Many startup and layout problems can be traced back to a command, path or syntax issue inside your bspwmrc script.

INPUT Check sxhkd separately

If bspwm is running but shortcuts do nothing, troubleshoot the hotkey daemon before changing the window manager itself.

DISPLAY Verify monitor names

Multi-monitor problems are easier to diagnose when you first confirm which displays bspwm currently recognizes.

SYSTEM SUPPORT

bspwm System Requirements & Compatibility

bspwm is designed for lightweight X11-based Linux desktop environments. It does not require a full desktop environment and can be combined with the tools you prefer for hotkeys, panels, notifications and application launching.

DISPLAY SERVER

X11 Environment

bspwm is an X11 window manager. It manages windows through the X Window System and is intended for sessions running on X rather than acting as a native Wayland compositor.

X11 Wayland

bspc

The command-line client used to send messages and commands to bspwm.

Core Component

sxhkd

Commonly used to map keyboard and pointer shortcuts to bspc commands.

Recommended

Config Files

Your bspwmrc and sxhkdrc files define startup behavior and shortcut mappings.

User Configurable

Multiple Monitors

bspwm can manage desktops across multiple monitors and allows monitor-specific workspace layouts.

Supported
COMPATIBILITY OVERVIEW
READY
LINUX DISTRIBUTIONS Common bspwm Platforms
Package availability may vary
A
Arch Linux pacman ✓
D
Debian apt ✓
U
Ubuntu apt ✓
F
Fedora Packages may vary •
MODULAR DESKTOP Build Your Own Environment
Mix & match
bspwm Window Manager
+
sxhkd Hotkeys
+
Panel Optional
DESIGN PROFILE Minimal by Design
No full desktop required
Window Management
Focused
Modularity
High
Mouse Dependency
Low
Customization
High
Best For Keyboard-focused Linux workflows
Display System X11
EXTEND YOUR SETUP bspwm works well with modular Linux utilities
sxhkd polybar dmenu rofi picom feh
WINDOW MANAGER COMPARISON

bspwm vs i3 vs awesome vs dwm

All four are popular choices for users who want more control than a traditional desktop environment provides, but they approach window management and configuration differently. Here is a practical comparison to help you understand where bspwm fits.

CURRENT FOCUS

bspwm

A tiling window manager built around binary space partitioning and controlled through messages sent by bspc.

Layout Model Binary Tree
Configuration Shell + bspc
Hotkeys External / sxhkd
Display System X11
TILING WM

i3

A tiling X11 window manager with a dedicated configuration format, extensive documentation and an IPC interface for external control.

Layout Model Container Tree
Configuration i3 Config
Hotkeys Built into Config
Display System X11
FRAMEWORK WM

awesome

A highly configurable framework window manager for X with dynamic layouts, tags, widgets and extensive customization through Lua.

Layout Model Dynamic Layouts
Configuration Lua
Hotkeys Lua Config
Display System X11
SOURCE CONFIG

dwm

A compact dynamic window manager from suckless that is customized primarily by editing its C configuration and rebuilding the program.

Layout Model Dynamic
Configuration C / config.h
Customization Source & Patches
Display System X11
QUICK COMPARISON Key differences at a glance
Choose based on your preferred workflow
Feature bspwm i3 awesome dwm
Primary Approach Binary tree tiling Tiling containers Framework + layouts Dynamic tiling
Main Configuration Shell / bspc Config file Lua C source
Keyboard Handling External daemon WM configuration Lua configuration Compiled configuration
Command / IPC Control bspc socket messages IPC interface Lua API / client tools Limited by default
Customization Style Modular Config driven Programming oriented Source oriented
Best Fit Users who like scripting and modular tools Users wanting a straightforward tiling setup Users wanting deep Lua-based customization Users comfortable modifying source code
WHY CHOOSE BSPWM?

bspwm is a strong fit for users who want explicit control without putting everything inside the window manager.

Its separation between window management, command control and keyboard handling makes it easy to combine bspwm with other Unix tools and build a desktop around your own scripts and preferences.

FREQUENTLY ASKED QUESTIONS

Frequently Asked Questions About bspwm

Find quick answers to common questions about bspwm, including how it works, its configuration files, sxhkd integration, X11 support and whether it is the right tiling window manager for your Linux setup.

bspwm is a tiling window manager for X11 that represents windows as the leaves of a full binary tree. Instead of manually positioning every tiled window, bspwm organizes screen space through tree-based splits and can be controlled using messages sent through the bspc command-line client.

bspwm stands for Binary Space Partitioning Window Manager. The name describes its approach to arranging windows using a binary tree that repeatedly divides the available screen area.

bspwm has a focused and modular design. It concentrates on window management rather than providing a complete desktop environment, allowing users to choose separate utilities for hotkeys, panels, launchers, notifications and other desktop functions.

bspwm is an X11 window manager, not a native Wayland compositor. If you want a Wayland-native environment, you will need a window manager or compositor designed specifically for Wayland.

bspwm does not handle keyboard or pointer input itself. sxhkd is commonly paired with bspwm to translate hotkeys into commands, including bspc commands. Other compatible input or hotkey tools can also be used.

bspc is the command-line client used to communicate with bspwm. It can send commands for managing nodes, desktops and monitors, as well as changing configuration settings and window rules.

A common user configuration location is ~/.config/bspwm/bspwmrc. The bspwmrc file is an executable startup script where users can run bspc commands, configure desktops, define window behavior and launch other programs needed for the session.

Yes. bspwm supports multiple monitors. Monitors and their desktops can be addressed through bspc, allowing users to organize workspaces and move or focus windows across a multi-monitor setup.

Beginners can use bspwm, but it generally requires more manual setup than a complete desktop environment. Learning basic shell configuration, bspc commands and sxhkd shortcuts makes the setup process much easier.

bspwm can be used on Linux distributions that provide the required X11 environment and dependencies. Package availability and installation commands vary by distribution, so users should check their distribution's repositories or build bspwm from source when appropriate.

Scroll to Top