Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMay 20, 2026·3 min de lecture

bspwm — Tiling Window Manager Based on Binary Space Partitioning

bspwm is a tiling window manager for X11 that arranges windows using a binary tree structure. It is controlled entirely through messages via bspc, making it fully scriptable and highly customizable. Combined with sxhkd for keybindings, it offers a minimal yet powerful desktop workflow.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
bspwm Overview
Commande CLI universelle
npx tokrepo install 5264d9ef-5404-11f1-9bc6-00163e2b0d79

Introduction

bspwm is a minimalist tiling window manager that represents windows as leaves of a binary tree. Created by Bastien Dejean, it separates window management from input handling — bspwm manages the layout while sxhkd (Simple X Hotkey Daemon) handles keyboard shortcuts. All interaction happens through the bspc command, making every aspect of the window manager scriptable from the shell.

What bspwm Does

  • Arranges windows in a binary tree layout that splits the screen recursively
  • Controls all window operations through the bspc CLI command
  • Supports multiple monitors with independent desktops per monitor
  • Provides tiling, floating, and fullscreen modes per window
  • Integrates with sxhkd for user-defined keyboard shortcuts

Architecture Overview

bspwm models each desktop as a binary tree where internal nodes represent splits (horizontal or vertical) and leaf nodes represent windows. When a new window opens, it splits the focused leaf. The bspc command communicates with bspwm over a Unix socket, sending commands like bspc node -f west (focus the window to the left) or bspc node -s east (swap with the window to the right). External rules match windows by class or title and assign them to specific desktops or set them as floating.

Self-Hosting & Configuration

  • Configure bspwm via ~/.config/bspwm/bspwmrc — a shell script that runs on startup
  • Define keybindings in ~/.config/sxhkd/sxhkdrc using a simple syntax
  • Set window gaps, border width, and colors with bspc config commands
  • Write window rules with bspc rule -a ClassName desktop=^3 state=floating
  • Use a status bar like polybar or lemonbar, reading bspwm state via bspc subscribe

Key Features

  • Pure separation of concerns — bspwm handles layout, sxhkd handles input, polybar handles status
  • Fully scriptable via bspc — automate layouts, window placement, and desktop switching from shell scripts
  • Binary tree layout enables intuitive recursive splitting with manual resize and rotation
  • Per-window rules for automatic desktop assignment, floating state, and focus behavior
  • EWMH compliance for compatibility with panels, compositors, and desktop utilities

Comparison with Similar Tools

  • i3 — manual tiling with a built-in IPC and config language; bspwm uses a cleaner separation of concerns via bspc and sxhkd
  • dwm — source-code-configured tiling WM; bspwm is configured via shell scripts without recompilation
  • Hyprland — Wayland-native compositor with animations; bspwm is X11-only but lighter and more scriptable
  • Awesome WM — Lua-configured tiling WM; bspwm is simpler with its shell-based approach

FAQ

Q: Is bspwm good for beginners to tiling WMs? A: The learning curve is moderate. Copy the example configs, learn a few bspc commands, and customize incrementally.

Q: Does bspwm work with Wayland? A: No. bspwm is X11-only. For a similar approach on Wayland, consider Sway or River.

Q: How do I add a status bar? A: Use polybar or lemonbar. Subscribe to bspwm events with bspc subscribe to update the bar dynamically.

Q: Can I use bspwm with a compositor for transparency and shadows? A: Yes. Pair it with picom (formerly compton) for compositing effects.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires