1 image:https://github.com/baskerville/bspwm/raw/master/logo/bspwm-logo.png[logo]
4 :man version: {revnumber}
5 :man manual: Bspwm Manual
13 bspwm - Tiling window manager based on binary space partitioning
18 *bspwm* [*-h*|*-v*|*-s* 'PANEL_FIFO'|*-p* 'PANEL_PREFIX']
20 *bspc* 'COMMAND' ['ARGUMENTS']
25 *bspwm* is a tiling window manager that represents windows as the leaves of a full binary tree.
27 It is controlled and configured via *bspc*.
34 Print the synopsis and exit.
37 Print the version and exit.
40 Write the internal state to the given FIFO.
43 Start every line written to the 'PANEL_FIFO' with the given prefix.
49 *bspwm* have only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
51 Its configuration file is '$XDG_CONFIG_HOME/bspwm/autostart'.
53 Keyboard and pointer bindings are defined with https://github.com/baskerville/sxhkd[sxhkd].
55 Example configuration files can be found in the *examples* directory.
60 New windows are inserted in the tree as close as possible to the focused window.
62 There is only two splitting modes: 'automatic' and 'manual'.
64 The default mode is 'automatic'. The 'manual' mode is entered by sending a *preselection* message.
66 Example: insertion of a new node (number 4) into the given tree in 'automatic' mode:
76 +-------------------------+ +-------------------------+
80 | 3 |------------| --> | 4 |------------|
84 +-------------------------+ +-------------------------+
87 Same departure, but the mode is 'manual', and a *window --presel up* message was sent beforehand:
96 +-------------------------+ +-------------------------+
100 | 3 |------------| --> |------------|------------|
104 +-------------------------+ +-------------------------+
110 Each monitor contains at least one desktop.
112 Each desktop contains at most one tree.
119 WINDOW_SEL := (CYCLE|DIR|biggest|focused|last)[.WINDOW_CLASS] | <window_id>
120 DESKTOP_SEL := (CYCLE|focused|last)[.DESKTOP_CLASS] | <desktop_name>
121 MONITOR_SEL := (CYCLE|DIR|focused|last)[.DESKTOP_CLASS] | <monitor_name>
123 DESKTOP_CLASS := [occupied|free]
124 WINDOW_CLASS := [floating|tiled][.][like|unlike]
126 DIR := left|right|up|down
129 FLIP := horizontal|vertical
141 window ['WINDOW_SEL'] 'OPTIONS'
145 *-f*, *--focus* ['WINDOW_SEL']::
146 Focus the selected or given window.
148 *-d*, *--to-desktop* 'DESKTOP_SEL'::
149 Send the selected window to the given desktop.
151 *-m*, *--to-monitor* 'MONITOR_SEL'::
152 Send the selected window to the given monitor.
154 *-w*, *--to-window* 'WINDOW_SEL'::
155 Transplant the selected window to the given window.
157 *-s*, *--swap* 'WINDOW_SEL'::
158 Swap the selected window with the given window.
160 *-p*, *--presel* 'DIR'|cancel::
161 Preselect the splitting area of the selected window (or cancel the preselection).
163 *-r*, *--ratio* 'RATIO'::
164 Set the splitting ratio of the selected window.
166 *-e*, *--edge* 'DIR' 'RATIO'|pull|push::
167 Set the splitting ratio (or pull, or push) the edge located in the given direction in relation to the selected window.
169 *-t*, *--toggle* floating|fullscreen|locked[=on|off]::
170 Set or toggle the given state for the selected window.
173 Close the selected window.
176 Kill the selected window.
184 desktop ['DESKTOP_SEL'] 'OPTIONS'
188 *-f*, *--focus* ['DESKTOP_SEL']::
189 Focus the selected or given desktop.
191 *-m*, *--to-monitor* 'MONITOR_SEL'::
192 Send the selected desktop to the given monitor.
194 *-l*, *--layout* 'CYCLE'|monocle|tiled::
195 Set or cycle the layout of the selected desktop.
197 *-n*, *--rename* <new_name>::
198 Rename the selected desktop.
201 Remove the selected desktop.
203 *-c*, *--cancel-presel*::
204 Cancel the preselection of all the windows of the selected desktop.
206 *-F*, *--flip* 'FLIP'::
207 Flip the tree of the selected desktop.
209 *-R*, *--rotate* 'ROTATE'::
210 Rotate the tree of the selected desktop.
213 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
215 *-C*, *--circulate* forward|backward::
216 Circulate the leaves of the tree of the selected desktop.
224 monitor ['MONITOR_SEL'] 'OPTIONS'
228 *-f*, *--focus* ['MONITOR_SEL']::
229 Focus the selected or given monitor.
231 *-a*, *--add-desktops* <name>...::
232 Create desktops with the given names in the selected monitor.
234 *-r*, *--remove-desktops* <name>...::
235 Remove desktops with the given names.
237 *-p*, *--pad* <top> <right> <bottom> <left>::
238 Set the padding of the selected monitor.
240 *-n*, *--rename* <new_name>::
241 Rename the selected monitor.
254 List matching windows.
257 List matching desktops.
260 List matching monitors.
263 Print tree rooted at query.
266 Print the history as it relates to the query.
268 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
269 Constrain matches to the selected monitor, desktop or window.
282 *-T*, *--tree* <file_path>::
283 Load the desktop trees from the given file.
285 *-H*, *--history* <file_path>::
286 Load the focus history from the given file.
299 *--adopt-orphans* <file_path>::
300 Manage all the unmanaged windows remaining from a previous session.
302 *--put-status* <file_path>::
303 Write the current internal state to the panel FIFO.
305 *--toggle-visibility*::
306 Toggle the visibility of all the managed windows.
319 *-t*, *--track* <x> <y>::
320 Pass the pointer root coordinates for the current pointer action.
322 *-g*, *--grab* focus|move|resize_side|resize_corner::
323 Perform the given pointer action.
336 *-a*, *--add* <pattern> [-d 'DESKTOP_SEL'] [--floating] [--follow]::
337 Create a new rule (<pattern> must match the class or instance name).
339 *-r*, *--rm* <rule_uid>...::
340 Remove the rules with the given UIDs.
342 *-l*, *--list* [<pattern>]::
351 config <key> [<value>]::
352 Get or set the value of <key>.
361 Quit with an optional exit status.
365 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
367 All the boolean settings are 'false' by default.
370 'focused_border_color'::
371 Color of the border of a focused window of a focused monitor.
373 'active_border_color'::
374 Color of the border of a focused window of an unfocused monitor.
376 'normal_border_color'::
377 Color of the border of an unfocused window.
379 'presel_border_color'::
380 Color of the *presel* message feedback.
382 'focused_locked_border_color'::
383 Color of the border of a focused locked window of a focused monitor.
385 'active_locked_border_color'::
386 Color of the border of a focused locked window of an unfocused monitor.
388 'normal_locked_border_color'::
389 Color of the border of an unfocused locked window.
391 'urgent_border_color'::
392 Color of the border of an urgent window.
398 Value of the gap that separates windows.
407 Padding space added at the sides of the current monitor.
410 The value that shall be used for the '_NET_WM_NAME' property of the root window.
412 'borderless_monocle'::
413 Remove borders for tiled windows in monocle mode.
416 Remove gaps for tiled windows in monocle mode.
418 'focus_follows_pointer'::
419 Focus the window under the pointer.
421 'pointer_follows_monitor'::
422 When focusing a monitor, put the pointer at its center.
425 Prevent floating windows from being raised when they might cover other floating windows.
427 'apply_shadow_property'::
428 Enable shadows for floating windows via the '_COMPTON_SHADOW' property.
431 Interpret two consecutive identical *use* messages as an *alternate* message.
434 Interpret two consecutive identical *presel* messages as a *cancel* message.
436 'focus_by_distance'::
437 Use window or leaf distance for focus movement.
439 'history_aware_focus'::
440 Give priority to the focus history when focusing nodes.
442 Environment Variables
443 ---------------------
446 The path of the socket used for the communication between *bspc* and *bspwm*.
451 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
452 * A custom panel if the '-s' flag is used (have a look at the files in 'examples/panel').
457 * Configured and controlled through messages.
458 * Multiple monitors support (via 'RandR').
459 * EWMH support (*tint2* works).
465 * Steven Allen <steven at stebalien.com>
466 * Thomas Adam <thomas at xteddy.org>
467 * Ivan Kanakarakis <ivan.kanak at gmail.com>
472 Bastien Dejean <baskerville at lavabit.com>
477 bspwm at librelist.com
480 vim: set ft=asciidoc: