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 are 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 action, 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 desktop nor monitor names may be valid descriptive
136 WINDOW_SEL := <window_id>
137 | (DIR|CYCLE_DIR|biggest|last|focused|older|newer)[.floating|.tiled][.like|.unlike][.manual|.automatic][.urgent][.local][.unfocused]
144 Selects the window in the given (spacial) direction relative to the active window.
147 Selects the window in the given (cyclic) direction.
150 Selects the biggest window on the current desktop.
153 Selects the previously focused window.
156 Selects the currently focused window.
159 Selects the window older than the focused window in the history.
162 Selects the window newer than the focused window in the history.
168 Only consider floating windows.
171 Only consider tiled windows.
174 Only consider windows that have the same class as the current window.
177 Only consider windows that have a different class than the current window.
180 Only consider windows in manual splitting mode.
183 Only consider windows in automatic splitting mode.
186 Only consider windows of the current desktop.
189 Only consider urgent windows.
192 Only consider windows other than the focused window.
200 DESKTOP_SEL := <desktop_name>
202 | (CYCLE_DIR|last|[MONITOR_SEL:]focused|older|newer)[.occupied|.free][.urgent][.local]
209 Selects the desktop with the given name.
212 Selects the nth desktop.
215 Selects the desktop in the given direction relative to the active desktop.
218 Selects the previously focused desktop.
221 Selects the currently focused desktop.
224 Selects the desktop older than the focused desktop in the history.
227 Selects the desktop newer than the focused desktop in the history.
233 Only consider occupied desktops.
236 Only consider free desktops.
239 Only consider urgent desktops.
242 Only consider desktops of the current monitor.
250 MONITOR_SEL := <monitor_name>
252 | (DIR|CYCLE_DIR|last|primary|focused|older|newer)[.occupied|.free]
259 Selects the monitor with the given name.
262 Selects the nth monitor.
265 Selects the monitor in the given (spacial) direction relative to the active monitor.
268 Selects the monitor in the given (cyclic) direction relative to the active monitor.
271 Selects the primary monitor.
274 Selects the previously focused monitor.
277 Selects the currently focused monitor.
280 Selects the monitor older than the focused monitor in the history.
283 Selects the monitor newer than the focused monitor in the history.
289 Only consider monitors where the focused desktop is occupied.
292 Only consider monitors where the focused desktop is free.
299 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.
302 Has an unrestricted size while being centered in its tiling space.
305 Fills its monitor rectangle, is above all the other windows and has no borders.
308 Ignores the *close* message.
311 Stays in the focused desktop of its monitor.
314 Tries to keep the same tiling position/size.
326 window ['WINDOW_SEL'] 'OPTIONS'
330 *-f*, *--focus* ['WINDOW_SEL']::
331 Focus the selected or given window.
333 *-d*, *--to-desktop* 'DESKTOP_SEL'::
334 Send the selected window to the given desktop.
336 *-m*, *--to-monitor* 'MONITOR_SEL'::
337 Send the selected window to the given monitor.
339 *-w*, *--to-window* 'WINDOW_SEL'::
340 Transplant the selected window to the given window.
342 *-s*, *--swap* 'WINDOW_SEL'::
343 Swap the selected window with the given window.
345 *-p*, *--presel* 'DIR'|cancel::
346 Preselect the splitting area of the selected window (or cancel the preselection).
348 *-r*, *--ratio* 'RATIO'::
349 Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
351 *-e*, *--edge* 'DIR' 'RATIO'|±'PIXELS'::
352 Set or change the splitting ratio of the edge located in the given direction in relation to the selected window.
354 *-R*, *--rotate* 'DIR' '90|270|180'::
355 Rotate the tree holding the edge located in the given direction in relation to the selected window.
357 *-t*, *--toggle* floating|fullscreen|pseudo_tiled|locked|sticky|private[=on|off]::
358 Set or toggle the given state for the selected window.
361 Close the selected window.
364 Kill the selected window.
372 desktop ['DESKTOP_SEL'] 'OPTIONS'
376 *-f*, *--focus* ['DESKTOP_SEL']::
377 Focus the selected or given desktop.
379 *-m*, *--to-monitor* 'MONITOR_SEL'::
380 Send the selected desktop to the given monitor.
382 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
383 Set or cycle the layout of the selected desktop.
385 *-n*, *--rename* <new_name>::
386 Rename the selected desktop.
388 *-s*, *--swap* 'DESKTOP_SEL'::
389 Swap the selected desktop with the given desktop.
391 *-b*, *--bubble* 'CYCLE_DIR'::
392 Bubble the selected desktop in the given direction.
395 Remove the selected desktop.
397 *-c*, *--cancel-presel*::
398 Cancel the preselection of all the windows of the selected desktop.
400 *-F*, *--flip* 'horizontal|vertical'::
401 Flip the tree of the selected desktop.
403 *-R*, *--rotate* '90|270|180'::
404 Rotate the tree of the selected desktop.
407 Reset the split ratios of the tree of the selected desktop.
410 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
412 *-C*, *--circulate* forward|backward::
413 Circulate the leaves of the tree of the selected desktop.
415 *-t*, *--toggle* floating[=on|off]::
416 Set or toggle the given state for the selected desktop.
425 monitor ['MONITOR_SEL'] 'OPTIONS'
429 *-f*, *--focus* ['MONITOR_SEL']::
430 Focus the selected or given monitor.
432 *-a*, *--add-desktops* <name>...::
433 Create desktops with the given names in the selected monitor.
435 *-r*, *--remove-desktops* <name>...::
436 Remove desktops with the given names.
438 *-o*, *--reorder-desktops* <name>...::
439 Reorder the desktops of the selected monitor to match the given order.
441 *-d*, *--reset-desktops* <name>...::
442 Rename, add or remove desktops depending on whether the number of given names is equal, superior or inferior to the number of existing desktops. Incidentally reset the settings of the existing desktops.
444 *-n*, *--rename* <new_name>::
445 Rename the selected monitor.
447 *-s*, *--swap* 'MONITOR_SEL'::
448 Swap the selected monitor with the given monitor.
461 List matching windows.
464 List matching desktops.
467 List matching monitors.
470 Print tree rooted at query.
473 Print the history as it relates to the query.
476 Print the window stacking order.
478 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
479 Constrain matches to the selected monitor, desktop or window.
492 *-T*, *--tree* <file_path>::
493 Load the desktop trees from the given file.
495 *-H*, *--history* <file_path>::
496 Load the focus history from the given file.
498 *-S*, *--stack* <file_path>::
499 Load the window stacking order from the given file.
513 Manage all the unmanaged windows remaining from a previous session.
515 *--toggle-visibility*::
516 Toggle the visibility of all the windows.
518 *--record-history* on|off::
519 Enable or disable the recording of window focus history.
521 *--subscribe* (all|report|monitor|desktop|window|...)*::
522 Continuously print status information.
525 Print the current status information.
538 *-g*, *--grab* focus|move|resize_side|resize_corner::
539 Initiate the given pointer action.
541 *-t*, *--track* <x> <y>::
542 Pass the pointer root coordinates for the current pointer action.
545 Terminate the current pointer action.
558 *-a*, *--add* <class_name>|<instance_name>|* [*-o*|*--one-shot*] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [(floating|fullscreen|pseudo_tiled|locked|sticky|private|center|follow|manage|focus|border)=(on|off)] [split_dir=DIR] [split_ratio=RATIO]::
561 *-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
562 Remove the given rules.
564 *-l*, *--list* [<class_name>|<instance_name>|*]::
573 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-w 'WINDOW_SEL'] <key> [<value>]::
574 Get or set the value of <key>.
583 Quit with an optional exit status.
588 If the server can't handle a message, *bspc* will return with one of the following exit codes:
600 Colors are either '#RRGGBB' or http://en.wikipedia.org/wiki/X11_color_names[X color names], booleans are 'true', 'on', 'false' or 'off'.
602 All the boolean settings are 'false' by default unless stated otherwise.
607 'focused_border_color'::
608 Color of the border of a focused window of a focused monitor.
610 'active_border_color'::
611 Color of the border of a focused window of an unfocused monitor.
613 'normal_border_color'::
614 Color of the border of an unfocused window.
616 'presel_border_color'::
617 Color of the *presel* message feedback.
619 'focused_locked_border_color'::
620 Color of the border of a focused locked window of a focused monitor.
622 'active_locked_border_color'::
623 Color of the border of a focused locked window of an unfocused monitor.
625 'normal_locked_border_color'::
626 Color of the border of an unfocused locked window.
628 'focused_sticky_border_color'::
629 Color of the border of a focused sticky window of a focused monitor.
631 'active_sticky_border_color'::
632 Color of the border of a focused sticky window of an unfocused monitor.
634 'normal_sticky_border_color'::
635 Color of the border of an unfocused sticky window.
637 'focused_private_border_color'::
638 Color of the border of a focused private window of a focused monitor.
640 'active_private_border_color'::
641 Color of the border of a focused private window of an unfocused monitor.
643 'normal_private_border_color'::
644 Color of the border of an unfocused private window.
646 'urgent_border_color'::
647 Color of the border of an urgent window.
653 Prefix prepended to each of the status lines.
655 'external_rules_command'::
656 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).
659 On which child should a new window be attached when adding a window on a single window tree in automatic mode. Accept the following values: *first_child*, *second_child*.
661 'history_aware_focus'::
662 Give priority to the focus history when focusing nodes.
664 'focus_by_distance'::
665 Base focusing on distances between windows.
667 'borderless_monocle'::
668 Remove borders for tiled windows in monocle mode.
671 Remove gaps for tiled windows in monocle mode.
673 'focus_follows_pointer'::
674 Focus the window under the pointer.
676 'pointer_follows_focus'::
677 When focusing a window, put the pointer at its center.
679 'pointer_follows_monitor'::
680 When focusing a monitor, put the pointer at its center.
683 Interpret two consecutive identical *use* messages as an *alternate* message.
686 Interpret two consecutive identical *presel* messages as a *cancel* message.
688 'apply_floating_atom'::
689 Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
691 'ignore_ewmh_focus'::
692 Ignore EWMH focus requests coming from applications.
694 'center_pseudo_tiled'::
695 Center pseudo tiled windows into their tiling rectangles. Defaults to 'true'.
697 'remove_disabled_monitors'::
698 Consider disabled monitors as disconnected.
700 'remove_unplugged_monitors'::
701 Remove unplugged monitors.
703 'merge_overlapping_monitors'::
704 Merge overlapping monitors (the bigger remains).
706 Monitor and Desktop Settings
707 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
713 Padding space added at the sides of the monitor or desktop.
715 Default, Desktop Default and Window Settings
716 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
721 Default and Desktop Settings
722 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
725 Size of the gap that separates windows.
731 Status information is composed of items separated by colons.
733 Each item has the form '<type><value>' where '<type>' is the first character of the item.
742 Occupied focused desktop.
745 Occupied unfocused desktop.
748 Free focused desktop.
751 Free unfocused desktop.
754 Urgent focused desktop.
757 Urgent unfocused desktop.
760 Layout of the focused desktop of a monitor.
762 Environment Variables
763 ---------------------
766 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<host_name>_<display_number>_<screen_number>-socket'.
771 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
772 * A custom panel (have a look at the files in 'examples/panel').
777 * Configured and controlled through messages.
778 * Multiple monitors support.
785 * Steven Allen <steven at stebalien.com>
786 * Thomas Adam <thomas at xteddy.org>
787 * Ivan Kanakarakis <ivan.kanak at gmail.com>
792 Bastien Dejean <nihilhill at gmail.com>
797 bspwm at librelist.com
800 vim: set ft=asciidoc: