From ArchWiki
Revision as of 17:11, 22 November 2013 by Tuftedocelot (talk | contribs) (Configuration: Add a start to panel info)
Jump to: navigation, search

bspwm is a tiling window manager that represents windows as the leaves of a full binary tree. It has support for EWMH and multiple monitors, and is configured and controlled through messages.


Install bspwmAUR or bspwm-gitAUR from the AUR. You will also want to install sxhkdAUR or sxhkd-gitAUR, a simple X hotkey daemon used to communicate with bspwm through bspc as well as launch your applications of choice. With commit 948b804, xwinfo-gitAUR is also required by the example configuration files.

To start bspwm on login, add the following to your .xinitrc:

sxhkd &
exec bspwm


Example configuration is found on GitHub.

Copy bspwmrc to ~/.config/bspwm/bspwmrc, sxhkdrc to ~/.config/sxhkd/sxhkdrc and make bspwmrc executable with chmod +x ~/.config/bspwm/bspwmrc.

Documentation for bspwm is found by running man bspwm.

There is also documentation for sxhkd found by running man sxhkd.

These two files are where you will be setting wm settings and keybindings, respectively.


As of 948b804 window-specific rules were externalized. Rules can be created in a few different ways. Two such methods are below:

  1. Using the example scripts provide in rules, place rulc and ruld in a folder that is in your $PATH and make them executable. Start ruld on login with something like rulc -l > /dev/null || ruld &. You can then use the rules in the example bspwmrc These scripts require both lua-posix and lua
  2. Alternatively, create a script that is called in your bspwmrc file that forms the rules. See Stebalien's post or earsplit's config for examples of how to accomplish this.

Both of these methods require installing xwinfo from the AUR or from github

If a particular window does not seem to be behaving according to your rules, check the class name of the program. This can be accomplished by running xprop | grep WM_CLASS to make sure you're using the proper string.


Currently, bar and dzen2 are supported with bspwm. Check the examples folder on the GitHub page for ideas or the Bar wiki page. The panel will be executed by placing panel & for bar or panel dzen2 & for dzen2 in your bspwmrc. Check the opt-depends in the bspwm package for dependencies that may be required in either case.


The following environmental variables may need to be defined:


If either of these do not respond with a value, then go to your ~/.profile and add the following lines:

export XDG_CONFIG_HOME="$HOME/.config"
export BSPWM_SOCKET="/tmp/bspwm-socket"
Note: You may put these anywhere that is sourced for your user. Another sane place to put these would be as part of your user's ~/.xinitrc, or zsh users might choose ~/.zshenv. User your best discretion.

See also