2 :man version: {revnumber}
3 :man manual: Bspwm Manual
11 bspwm - Tiling window manager based on binary space partitioning
16 *bspwm* [*-h*|*-v*|*-s* 'PANEL_FIFO'|*-p* 'PANEL_PREFIX']
18 *bspc* 'COMMAND' ['ARGUMENTS']
23 *bspwm* is a tiling window manager that represents windows as the leaves of a full binary tree.
25 It is controlled and configured via *bspc*.
32 Print the synopsis and exit.
35 Print the version and exit.
38 Write the internal state to the given FIFO.
41 Start every line written to the 'PANEL_FIFO' with the given prefix.
47 *bspwm* have only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
49 Its configuration file is '$XDG_CONFIG_HOME/bspwm/autostart'.
51 Keyboard and pointer bindings are defined with https://github.com/baskerville/sxhkd[sxhkd].
53 Example configuration files can be found in the *examples* directory.
58 New windows are inserted in the tree as close as possible to the focused window.
60 There is only two splitting modes: 'automatic' and 'manual'.
62 The default mode is 'automatic'. The 'manual' mode is entered by sending a *preselection* message.
64 Example: insertion of a new node (number 4) into the given tree in 'automatic' mode:
74 +-------------------------+ +-------------------------+
78 | 3 |------------| --> | 4 |------------|
82 +-------------------------+ +-------------------------+
85 Same departure, but the mode is 'manual', and a *window --presel up* message was sent beforehand:
94 +-------------------------+ +-------------------------+
98 | 3 |------------| --> |------------|------------|
102 +-------------------------+ +-------------------------+
108 Each monitor contains at least one desktop.
110 Each desktop contains at most one tree.
116 DIR := left | right | up | down
117 CYCLE_DIR := next | prev
123 Selectors are used to select a target window, desktop, or monitor. A selector
124 can either describe the target relatively or name it globally.
126 Descriptive (relative) selectors consist of a primary selector and any number
127 of non-conflicting modifiers as follows:
129 PRIMARY_SELECTOR[.MODIFIER]*
131 For obvious reasons, neither desktops nor monitors names may be valid
132 descriptive selectors.
140 WINDOW_SEL := <window_id>
141 | (DIR|CYCLE_DIR|biggest|last|focused)[.floating|.tiled][.like|.unlike]
148 Selects the window in the given (spacial) direction relative to the active
152 Selects the window in the given (cyclic) direction.
155 Selects the biggest window on the current desktop.
158 Selects the previously focused window on the current desktop.
161 Selects the currently focused window.
167 Only consider floating windows.
170 Only consider tiled windows.
173 Only consider windows that have the same class as the current window.
176 Only consider windows that have a different class than the current window.
184 DESKTOP_SEL := <desktop_name>
185 | (CYCLE_DIR|last|focused)[.occupied|.free]
192 Selects the desktop in the given direction relative to the active desktop.
195 Selects the previously focused focused desktop.
198 Selects the currently focused desktop.
204 Only consider occupied desktops.
207 Only consider free desktops.
215 MONITOR_SEL := <monitor_name>
216 | (DIR|CYCLE_DIR|last|focused)[.occupied|.free]
223 Selects the monitor in the given (spacial) direction relative to the active monitor.
226 Selects the monitor in the given (cyclic) direction relative to the active monitor.
229 Selects the previously focused focused monitor.
232 Selects the currently focused monitor.
238 Only consider monitors where the focused desktop is occupied.
241 Only consider monitors where the focused desktop is free.
253 window ['WINDOW_SEL'] 'OPTIONS'
257 *-f*, *--focus* ['WINDOW_SEL']::
258 Focus the selected or given window.
260 *-d*, *--to-desktop* 'DESKTOP_SEL'::
261 Send the selected window to the given desktop.
263 *-m*, *--to-monitor* 'MONITOR_SEL'::
264 Send the selected window to the given monitor.
266 *-w*, *--to-window* 'WINDOW_SEL'::
267 Transplant the selected window to the given window.
269 *-s*, *--swap* 'WINDOW_SEL'::
270 Swap the selected window with the given window.
272 *-p*, *--presel* 'DIR'|cancel::
273 Preselect the splitting area of the selected window (or cancel the preselection).
275 *-r*, *--ratio* 'RATIO'::
276 Set the splitting ratio of the selected window.
278 *-e*, *--edge* 'DIR' 'RATIO'|pull|push::
279 Set the splitting ratio (or pull, or push) the edge located in the given direction in relation to the selected window.
281 *-t*, *--toggle* floating|fullscreen|locked[=on|off]::
282 Set or toggle the given state for the selected window.
285 Close the selected window.
288 Kill the selected window.
296 desktop ['DESKTOP_SEL'] 'OPTIONS'
300 *-f*, *--focus* ['DESKTOP_SEL']::
301 Focus the selected or given desktop.
303 *-m*, *--to-monitor* 'MONITOR_SEL'::
304 Send the selected desktop to the given monitor.
306 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
307 Set or cycle the layout of the selected desktop.
309 *-n*, *--rename* <new_name>::
310 Rename the selected desktop.
313 Remove the selected desktop.
315 *-c*, *--cancel-presel*::
316 Cancel the preselection of all the windows of the selected desktop.
318 *-F*, *--flip* 'horizontal|vertical'::
319 Flip the tree of the selected desktop.
321 *-R*, *--rotate* '90|270|180'::
322 Rotate the tree of the selected desktop.
325 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
327 *-C*, *--circulate* forward|backward::
328 Circulate the leaves of the tree of the selected desktop.
336 monitor ['MONITOR_SEL'] 'OPTIONS'
340 *-f*, *--focus* ['MONITOR_SEL']::
341 Focus the selected or given monitor.
343 *-a*, *--add-desktops* <name>...::
344 Create desktops with the given names in the selected monitor.
346 *-r*, *--remove-desktops* <name>...::
347 Remove desktops with the given names.
349 *-p*, *--pad* <top> <right> <bottom> <left>::
350 Set the padding of the selected monitor.
352 *-n*, *--rename* <new_name>::
353 Rename the selected monitor.
366 List matching windows.
369 List matching desktops.
372 List matching monitors.
375 Print tree rooted at query.
378 Print the history as it relates to the query.
380 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
381 Constrain matches to the selected monitor, desktop or window.
394 *-T*, *--tree* <file_path>::
395 Load the desktop trees from the given file.
397 *-H*, *--history* <file_path>::
398 Load the focus history from the given file.
411 *--adopt-orphans* <file_path>::
412 Manage all the unmanaged windows remaining from a previous session.
414 *--put-status* <file_path>::
415 Write the current internal state to the panel FIFO.
417 *--toggle-visibility*::
418 Toggle the visibility of all the managed windows.
431 *-t*, *--track* <x> <y>::
432 Pass the pointer root coordinates for the current pointer action.
434 *-g*, *--grab* focus|move|resize_side|resize_corner::
435 Perform the given pointer action.
448 *-a*, *--add* <pattern> [-d 'DESKTOP_SEL'] [--floating] [--follow]::
449 Create a new rule (<pattern> must match the class or instance name).
451 *-r*, *--rm* <rule_uid>...::
452 Remove the rules with the given UIDs.
454 *-l*, *--list* [<pattern>]::
463 config <key> [<value>]::
464 Get or set the value of <key>.
473 Quit with an optional exit status.
477 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
479 All the boolean settings are 'false' by default.
482 'focused_border_color'::
483 Color of the border of a focused window of a focused monitor.
485 'active_border_color'::
486 Color of the border of a focused window of an unfocused monitor.
488 'normal_border_color'::
489 Color of the border of an unfocused window.
491 'presel_border_color'::
492 Color of the *presel* message feedback.
494 'focused_locked_border_color'::
495 Color of the border of a focused locked window of a focused monitor.
497 'active_locked_border_color'::
498 Color of the border of a focused locked window of an unfocused monitor.
500 'normal_locked_border_color'::
501 Color of the border of an unfocused locked window.
503 'urgent_border_color'::
504 Color of the border of an urgent window.
510 Value of the gap that separates windows.
519 Padding space added at the sides of the current monitor.
522 The value that shall be used for the '_NET_WM_NAME' property of the root window.
524 'borderless_monocle'::
525 Remove borders for tiled windows in monocle mode.
528 Remove gaps for tiled windows in monocle mode.
530 'focus_follows_pointer'::
531 Focus the window under the pointer.
533 'pointer_follows_monitor'::
534 When focusing a monitor, put the pointer at its center.
536 'monitor_focus_fallback'::
537 If the focus message fails, try to focus the nearest monitor in the same direction.
540 Prevent floating windows from being raised when they might cover other floating windows.
542 'apply_shadow_property'::
543 Enable shadows for floating windows via the '_COMPTON_SHADOW' property.
546 Interpret two consecutive identical *use* messages as an *alternate* message.
549 Interpret two consecutive identical *presel* messages as a *cancel* message.
551 'focus_by_distance'::
552 Use window or leaf distance for focus movement.
554 'history_aware_focus'::
555 Give priority to the focus history when focusing nodes.
557 Environment Variables
558 ---------------------
561 The path of the socket used for the communication between *bspc* and *bspwm*.
566 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
567 * A custom panel if the '-s' flag is used (have a look at the files in 'examples/panel').
572 * Configured and controlled through messages.
573 * Multiple monitors support (via 'RandR').
574 * EWMH support (*tint2* works).
580 * Steven Allen <steven at stebalien.com>
581 * Thomas Adam <thomas at xteddy.org>
582 * Ivan Kanakarakis <ivan.kanak at gmail.com>
587 Bastien Dejean <baskerville at lavabit.com>
592 bspwm at librelist.com
595 vim: set ft=asciidoc: