{{Merge|Window Manager#List of window managers|A simple entry in that list could offer the same information.}}

−

'''bspwm''' is a tiling window manager that represents windows as the leaves of a full binary tree. It has support for [http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html EWMH] and multiple monitors, and is configured and controlled through messages.

'''bspwm''' is a tiling window manager that represents windows as the leaves of a full binary tree. It has support for [http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html EWMH] and multiple monitors, and is configured and controlled through messages.

== Installation ==

== Installation ==

−

Install {{AUR|bspwm}} or {{AUR|bspwm-git}} from the [[AUR]]. You will also want to install {{AUR|sxhkd}} or {{AUR|sxhkd-git}}, a simple X hotkey daemon used to communicate with bspwm through {{ic|bspc}} as well as launch your applications of choice.

+

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

To start bspwm on login, add the following to your {{ic|.xinitrc}}:

To start bspwm on login, add the following to your {{ic|.xinitrc}}:

−

{{bc|sxhkd &

+

{{bc|

−

exec bspwm}}

+

sxhkd &

+

exec bspwm

+

}}

== Configuration ==

== Configuration ==

Line 24:

Line 24:

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

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

+

+

=== Rules ===

+

+

As of {{ic|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 [https://github.com/baskerville/bspwm/blob/master/contrib/rules rules], place {{ic | rulc}} and {{ic | ruld}} in a folder that is in your $PATH and make them executable. Start {{ ic | ruld }} on login with something like {{ ic | rulc -l > /dev/null <nowiki>||</nowiki> ruld &}}. You can then use the rules in the example {{ic | bspwmrc }} These scripts require both [https://www.archlinux.org/packages/?sort=&q=lua-posix&maintainer=&flagged= lua-posix] and [https://www.archlinux.org/packages/?sort=&repo=Extra&q=lua&maintainer=&flagged= lua]

+

# Alternatively, create a script that is called in your bspwmrc file that forms the rules. See [https://bbs.archlinux.org/viewtopic.php?pid=1346272#p1346272 Stebalien's post] or [https://gist.github.com/windelicato/7348087 earsplit's config] for examples of how to accomplish this.

+

+

Both of these methods require installing '''xwinfo''' from the [https://aur.archlinux.org/packages/xwinfo-git AUR] or from [https://github.com/baskerville/xwinfo 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 {{ ic | xprop <nowiki>|</nowiki> grep WM_CLASS}} to make sure you're using the proper string.

+

+

=== Panels ===

+

Currently, [https://aur.archlinux.org/packages/bar-aint-recursive/ bar] and [https://www.archlinux.org/packages/?sort=&q=dzen2&maintainer=&flagged= dzen2] are supported with bspwm. Check the examples folder on the GitHub page for ideas or the [https://wiki.archlinux.org/index.php/Bar-aint-recursive Bar] wiki page. The panel will be executed by placing {{ic | panel &}} for bar or {{ic | panel dzen2 &}} for dzen2 in your bspwmrc. Check the opt-depends in the bspwm package for dependencies that may be required in either case.

+

+

To display system information on your status bar you can use various system calls. This example will show you how to edit your {{ic | panel }} to get the volume status on your BAR:

If either of these do not respond with a value, then go to your .bashrc or .zshrc and add the following lines:

+

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

−

{{bc|export XDG_CONFIG_HOME&#61;"~/.config"

+

{{bc|

−

export BSPWM_SOCKET&#61;"/tmp/bspwm-socket"}}

+

export XDG_CONFIG_HOME&#61;"$HOME/.config"

+

export BSPWM_SOCKET&#61;"/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.}}

Contents

Installation

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.

Configuration

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.

Rules

As of 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 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

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.

Panels

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.

To display system information on your status bar you can use various system calls. This example will show you how to edit your panel to get the volume status on your BAR:

5. Install xwinfo from AUR and lua-posix. Change the rules of $XDG_CONFIG_HOME/bspwm/bspwm_rules to 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.

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.