2 :man version: {revnumber}
3 :man manual: Bspwm Manual
11 bspwm - Binary space partitioning window manager
16 *bspwm* [*-h*|*-v*|*-c* 'CONFIG_PATH']
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 Use the given configuration file.
43 *bspwm* has only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
45 The default configuration file is '$XDG_CONFIG_HOME/bspwm/bspwmrc'.
47 Keyboard and pointer bindings are defined with https://github.com/baskerville/sxhkd[sxhkd].
49 Example configuration files can be found in the *examples* directory.
54 New windows are inserted in the tree as close as possible to the focused window.
56 There is only two splitting modes: 'automatic' and 'manual'.
58 The default mode is 'automatic'. The 'manual' mode is entered by sending a *preselection* message.
60 Example: insertion of a new node (number 4) into the given tree in 'automatic' mode:
70 +-------------------------+ +-------------------------+
74 | 3 |------------| --> | 4 |------------|
78 +-------------------------+ +-------------------------+
81 Same departure, but the mode is 'manual', and a *window --presel up* message was sent beforehand:
90 +-------------------------+ +-------------------------+
94 | 3 |------------| --> |------------|------------|
98 +-------------------------+ +-------------------------+
104 Each monitor contains at least one desktop.
106 Each desktop contains at most one tree.
112 DIR := left | right | up | down
113 CYCLE_DIR := next | prev
119 Selectors are used to select a target window, desktop, or monitor. A selector
120 can either describe the target relatively or name it globally.
122 Descriptive (relative) selectors consist of a primary selector and any number
123 of non-conflicting modifiers as follows:
125 PRIMARY_SELECTOR[.MODIFIER]*
127 For obvious reasons, neither desktops nor monitors names may be valid
128 descriptive selectors.
136 WINDOW_SEL := <window_id>
137 | (DIR|CYCLE_DIR|biggest|last|focused|older|newer)[.floating|.tiled][.like|.unlike][.manual][.urgent][.local]
144 Selects the window in the given (spacial) direction relative to the active
148 Selects the window in the given (cyclic) direction.
151 Selects the biggest window on the current desktop.
154 Selects the previously focused window.
157 Selects the currently focused window.
160 Selects the window older than the focused window in the history.
163 Selects the window newer than the focused window in the history.
169 Only consider floating windows.
172 Only consider tiled windows.
175 Only consider windows that have the same class as the current window.
178 Only consider windows that have a different class than the current window.
181 Only consider windows in manual splitting mode (see *--presel*).
184 Only consider windows of the current desktop.
187 Only consider urgent windows.
195 DESKTOP_SEL := <desktop_name>
197 | (CYCLE_DIR|last|focused|older|newer)[.occupied|.free][.urgent][.local]
204 Selects the desktop with the given name.
207 Selects the nth desktop.
210 Selects the desktop in the given direction relative to the active desktop.
213 Selects the previously focused desktop.
216 Selects the currently focused desktop.
219 Selects the desktop older than the focused desktop in the history.
222 Selects the desktop newer than the focused desktop in the history.
228 Only consider occupied desktops.
231 Only consider free desktops.
234 Only consider urgent desktops.
237 Only consider desktops of the current monitor.
245 MONITOR_SEL := <monitor_name>
247 | (DIR|CYCLE_DIR|last|primary|focused|older|newer)[.occupied|.free]
254 Selects the monitor with the given name.
257 Selects the nth monitor.
260 Selects the monitor in the given (spacial) direction relative to the active monitor.
263 Selects the monitor in the given (cyclic) direction relative to the active monitor.
266 Selects the primary monitor.
269 Selects the previously focused monitor.
272 Selects the currently focused monitor.
275 Selects the monitor older than the focused monitor in the history.
278 Selects the monitor newer than the focused monitor in the history.
284 Only consider monitors where the focused desktop is occupied.
287 Only consider monitors where the focused desktop is free.
294 Is above any tiled window and can be moved/resized freely. Although it doesn't occupy any tiling space, it is still part of the window tree.
297 Fills its monitor rectangle, is above all the other windows and has no borders.
300 Ignores the *close* message.
303 Stays in the focused desktop of its monitor.
306 Tries to keep the same tiling position/size.
318 window ['WINDOW_SEL'] 'OPTIONS'
322 *-f*, *--focus* ['WINDOW_SEL']::
323 Focus the selected or given window.
325 *-d*, *--to-desktop* 'DESKTOP_SEL'::
326 Send the selected window to the given desktop.
328 *-m*, *--to-monitor* 'MONITOR_SEL'::
329 Send the selected window to the given monitor.
331 *-w*, *--to-window* 'WINDOW_SEL'::
332 Transplant the selected window to the given window.
334 *-s*, *--swap* 'WINDOW_SEL'::
335 Swap the selected window with the given window.
337 *-p*, *--presel* 'DIR'|cancel::
338 Preselect the splitting area of the selected window (or cancel the preselection).
340 *-r*, *--ratio* 'RATIO'::
341 Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
343 *-e*, *--edge* 'DIR' 'RATIO'|±'PIXELS'|pull|push::
344 Set and change the splitting ratio of (or pull, or push) the edge located in the given direction in relation to the selected window.
346 *-R*, *--rotate* 'DIR' '90|270|180'::
347 Rotate the tree holding the edge located in the given direction in relation to the selected window.
349 *-t*, *--toggle* floating|fullscreen|locked|sticky|private[=on|off]::
350 Set or toggle the given state for the selected window.
353 Close the selected window.
356 Kill the selected window.
364 desktop ['DESKTOP_SEL'] 'OPTIONS'
368 *-f*, *--focus* ['DESKTOP_SEL']::
369 Focus the selected or given desktop.
371 *-m*, *--to-monitor* 'MONITOR_SEL'::
372 Send the selected desktop to the given monitor.
374 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
375 Set or cycle the layout of the selected desktop.
377 *-n*, *--rename* <new_name>::
378 Rename the selected desktop.
380 *-s*, *--swap* 'DESKTOP_SEL'::
381 Swap the selected desktop with the given desktop.
384 Remove the selected desktop.
386 *-c*, *--cancel-presel*::
387 Cancel the preselection of all the windows of the selected desktop.
389 *-F*, *--flip* 'horizontal|vertical'::
390 Flip the tree of the selected desktop.
392 *-R*, *--rotate* '90|270|180'::
393 Rotate the tree of the selected desktop.
396 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
398 *-C*, *--circulate* forward|backward::
399 Circulate the leaves of the tree of the selected desktop.
401 *-t*, *--toggle* floating[=on|off]::
402 Set or toggle the given state for the selected desktop.
411 monitor ['MONITOR_SEL'] 'OPTIONS'
415 *-f*, *--focus* ['MONITOR_SEL']::
416 Focus the selected or given monitor.
418 *-a*, *--add-desktops* <name>...::
419 Create desktops with the given names in the selected monitor.
421 *-r*, *--remove-desktops* <name>...::
422 Remove desktops with the given names.
424 *-o*, *--reorder-desktops* <name>...::
425 Reorder the desktops of the selected monitor to match the given order.
427 *-d*, *--reset-desktops* <name>...::
428 Rename, add or remove desktops depending on whether the number of given names is equal, superior or inferior to the number of existing desktops.
430 *-n*, *--rename* <new_name>::
431 Rename the selected monitor.
433 *-s*, *--swap* 'MONITOR_SEL'::
434 Swap the selected monitor with the given monitor.
447 List matching windows.
450 List matching desktops.
453 List matching monitors.
456 Print tree rooted at query.
459 Print the history as it relates to the query.
462 Print the window stacking order.
464 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
465 Constrain matches to the selected monitor, desktop or window.
478 *-T*, *--tree* <file_path>::
479 Load the desktop trees from the given file.
481 *-H*, *--history* <file_path>::
482 Load the focus history from the given file.
484 *-S*, *--stack* <file_path>::
485 Load the window stacking order from the given file.
499 Manage all the unmanaged windows remaining from a previous session.
501 *--toggle-visibility*::
502 Toggle the visibility of all the windows.
504 *--record-history* on|off::
505 Enable or disable the recording of window focus history.
508 Continuously print status informations on standard output.
521 *-g*, *--grab* focus|move|resize_side|resize_corner::
522 Initiate the given pointer action.
524 *-t*, *--track* <x> <y>::
525 Pass the pointer root coordinates for the current pointer action.
528 Terminate the current pointer action.
541 *-a*, *--add* <class_name>|<instance_name>|* [*-o*|*--one-shot*] [desktop=DESKTOP_SEL|monitor=MONITOR_SEL] [(floating|fullscreen|locked|sticky|private|center|lower|follow|manage|focus)=(true|false)]::
544 *-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
545 Remove the given rules.
547 *-l*, *--list* [<class_name>|<instance_name>|*]::
556 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'] <key> [<value>]::
557 Get or set the value of <key>.
566 Quit with an optional exit status.
570 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
572 All the boolean settings are 'false' by default.
577 'focused_border_color'::
578 Color of the border of a focused window of a focused monitor.
580 'active_border_color'::
581 Color of the border of a focused window of an unfocused monitor.
583 'normal_border_color'::
584 Color of the border of an unfocused window.
586 'presel_border_color'::
587 Color of the *presel* message feedback.
589 'focused_locked_border_color'::
590 Color of the border of a focused locked window of a focused monitor.
592 'active_locked_border_color'::
593 Color of the border of a focused locked window of an unfocused monitor.
595 'normal_locked_border_color'::
596 Color of the border of an unfocused locked window.
598 'focused_sticky_border_color'::
599 Color of the border of a focused sticky window of a focused monitor.
601 'active_sticky_border_color'::
602 Color of the border of a focused sticky window of an unfocused monitor.
604 'normal_sticky_border_color'::
605 Color of the border of an unfocused sticky window.
607 'focused_private_border_color'::
608 Color of the border of a focused private window of a focused monitor.
610 'active_private_border_color'::
611 Color of the border of a focused private window of an unfocused monitor.
613 'normal_private_border_color'::
614 Color of the border of an unfocused private window.
616 'urgent_border_color'::
617 Color of the border of an urgent window.
623 Intensity of the growth involved in pulling or pushing an edge.
626 Prefix prepended to each of the status lines.
628 'external_rules_command'::
629 External command used to retrieve rule consequences. The command will receive the the ID of the window being processed as its first argument and the class and instance names as second and third arguments. The output of that command must have the following format: *key1=value1 key2=value2 ...* (the valid key/value pairs are given in the description of the 'rule' command).
631 'history_aware_focus'::
632 Give priority to the focus history when focusing nodes.
634 'borderless_monocle'::
635 Remove borders for tiled windows in monocle mode.
638 Remove gaps for tiled windows in monocle mode.
640 'focus_follows_pointer'::
641 Focus the window under the pointer.
643 'pointer_follows_monitor'::
644 When focusing a monitor, put the pointer at its center.
647 Interpret two consecutive identical *use* messages as an *alternate* message.
650 Interpret two consecutive identical *presel* messages as a *cancel* message.
652 'apply_floating_atom'::
653 Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
655 'ignore_ewmh_focus'::
656 Ignore EWMH requests to focus a window.
658 'remove_disabled_monitor'::
659 Consider disabled monitors as disconnected.
665 Size of the gap that separates windows.
671 Padding space added at the sides of the desktop.
680 Status informations are composed of items separated by colons.
682 Each item has the form '<type><value>' where '<type>' is the first character of the item.
691 Occupied focused desktop.
694 Occupied unfocused desktop.
697 Free focused desktop.
700 Free unfocused desktop.
703 Urgent focused desktop.
706 Urgent unfocused desktop.
709 Layout of the focused desktop of the focused monitor.
711 Environment Variables
712 ---------------------
715 The path of the socket used for the communication between *bspc* and *bspwm*. If it isn't defined, then the following path is used: '/tmp/bspwm<display_name>-socket'.
720 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
721 * A custom panel if the '-s' flag is used (have a look at the files in 'examples/panel').
726 * Configured and controlled through messages.
727 * Multiple monitors support (via 'RandR').
728 * EWMH support (*tint2* works).
734 * Steven Allen <steven at stebalien.com>
735 * Thomas Adam <thomas at xteddy.org>
736 * Ivan Kanakarakis <ivan.kanak at gmail.com>
741 Bastien Dejean <nihilhill at gmail.com>
746 bspwm at librelist.com
749 vim: set ft=asciidoc: