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 AUR. You will also want to install AUR or AUR, a simple X hotkey daemon used to communicate with bspwm through
bspc as well as launch your applications of choice. With commit
948b804, AUR is also required by the example configuration files.
To start bspwm on login, add the following to your
sxhkd & exec bspwm
Example configuration is found on GitHub.
Documentation for bspwm is found by running
There is also documentation for sxhkd found by running
These two files are where you will be setting wm settings and keybindings, respectively.
948b804 window-specific rules were externalized.
Rules can be created in a few different ways. Two such methods are below:
- Using the example scripts provide in rules, place
ruldin a folder that is in your $PATH and make them executable. Start
ruldon login with something like
rulc -l > /dev/null || ruld &. You can then use the rules in the example
bspwmrcThese scripts require both lua-posix and lua
- 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.
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.
Example how to configure after install
- 1. Copy the supplied bspwm_rules, rule_command, ruld and rulc scripts from Examples to
$XDG_CONFIG_HOME/bspwm/and ensure they are executable.
- 2. Edit
$HOME/.profileto something similar to this:
PATH="/usr/games:$HOME/.config/bspwm:$PATH" export XDG_CONFIG_HOME="/home/$USER/.config" ## Bspwm export BSPWM_SOCKET="/tmp/bspwm-socket" export BSPWM_TREE=/tmp/bspwm.tree export BSPWM_HISTORY=/tmp/bspwm.history export BSPWM_STACK=/tmp/bspwm.stack export PANEL_FIFO=/tmp/panel-fifo export PANEL_HEIGHT=14
- 3. Edit
source $HOME/.profile & sxhkd -c $XDG_CONFIG_HOME/bspwm/sxhkdrc & exec wm
- 4. Add this line to
bspc config rule_command "$(command -v rule_command)"
- 5. Install xwinfo from AUR and lua-posix. Change the rules of
$XDG_CONFIG_HOME/bspwm/bspwm_rulesto your likening.
$ man bspc
... rule_command External command used to retrieve rule consequences. The command will receive the the ID of the window being processed as its first argument. The output of that command must have the following format: key1=value1 key2=value2 ..., where keyN is one of floating, fullscreen, locked, sticky, private, frame, center, lower, follow, manage, focus, desktop or monitor. ...
- To find out the window names you can use xorg-xprop. The lower-case 'vlc' is the instance and the upper-case 'Vlc' is the class.
$ xprop | grep WM_CLASS
WM_CLASS(STRING) = "vlc", "Vlc"
- 6. Restart bspwm and check so the rules have been applied.
$ rulc -l
class == "Gimp" =>floating=on class == "Firefox" => desktop=^2 class == "Vlc" => desktop=^3 instance == "rtorrent" => desktop=^3 instance == "URthree" => desktop=^3
The following environmental variables may need to be defined:
echo $BSPWM_SOCKET echo $XDG_CONFIG_HOME
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"
- Mailing List: bspwm at librelist.com.
#bspwm- IRC channel at the irc.freenode.net
- https://bbs.archlinux.org/viewtopic.php?id=149444 - Arch BBS thread
- https://github.com/baskerville/bspwm - GitHub project
- https://github.com/windelicato/dotfiles/wiki/bspwm-for-dummies - earsplit's "bspwm for dummies"