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|.nonurgent][.local|.foreign][.focused|.unfocused][.below|.normal|.above][.fullscreen|.nonfullscreen][.sticky|.nonsticky][.public|.private][.locked|.unlocked][.pseudotiled|.nonpseudotiled]
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 windows outside of the current desktop.
192 Only consider private windows.
195 Only consider non private windows.
198 Only consider urgent windows.
201 Only consider non urgent windows.
204 Only consider pseudo-tiled windows.
207 Only consider non pseudo-tiled windows.
210 Only consider sticky windows.
213 Only consider non sticky windows.
216 Only consider locked windows.
219 Only consider non locked windows.
222 Only consider non fullscreen windows.
225 Only consider fullscreen windows.
228 Only consider non fullscreen windows.
231 Only consider focused windows.
234 Only consider unfocused windows.
237 Only consider windows of the BELOW layer.
240 Only consider windows of the NORMAL layer.
243 Only consider windows of the ABOVE layer.
251 DESKTOP_SEL := <desktop_name>
253 | (CYCLE_DIR|last|[MONITOR_SEL:]focused|older|newer)[.occupied|.free][.urgent|.nonurgent][.local|.foreign]
260 Selects the desktop with the given name.
263 Selects the nth desktop.
266 Selects the desktop in the given direction relative to the active desktop.
269 Selects the previously focused desktop.
272 Selects the currently focused desktop.
275 Selects the desktop older than the focused desktop in the history.
278 Selects the desktop newer than the focused desktop in the history.
284 Only consider occupied desktops.
287 Only consider free desktops.
290 Only consider urgent desktops.
293 Only consider non urgent desktops.
296 Only consider desktops of the current monitor.
299 Only consider desktops outside of the current monitor.
307 MONITOR_SEL := <monitor_name>
309 | (DIR|CYCLE_DIR|last|primary|focused|older|newer)[.occupied|.free]
316 Selects the monitor with the given name.
319 Selects the nth monitor.
322 Selects the monitor in the given (spacial) direction relative to the active monitor.
325 Selects the monitor in the given (cyclic) direction relative to the active monitor.
328 Selects the primary monitor.
331 Selects the previously focused monitor.
334 Selects the currently focused monitor.
337 Selects the monitor older than the focused monitor in the history.
340 Selects the monitor newer than the focused monitor in the history.
346 Only consider monitors where the focused desktop is occupied.
349 Only consider monitors where the focused desktop is free.
356 Can be moved/resized freely. Although it doesn't occupy any tiling space, it is still part of the window tree.
359 Has an unrestricted size while being centered in its tiling space.
362 Fills its monitor rectangle and has no borders.
365 Ignores the *close* message.
368 Stays in the focused desktop of its monitor.
371 Tries to keep the same tiling position/size.
374 Has its urgency hint set.
380 There's three stacking layers: BELOW, NORMAL and ABOVE.
382 In each layer, floating windows are stacked above tiled windows.
394 window ['WINDOW_SEL'] 'OPTIONS'
398 *-f*, *--focus* ['WINDOW_SEL']::
399 Focus the selected or given window.
401 *-d*, *--to-desktop* 'DESKTOP_SEL'::
402 Send the selected window to the given desktop.
404 *-m*, *--to-monitor* 'MONITOR_SEL'::
405 Send the selected window to the given monitor.
407 *-w*, *--to-window* 'WINDOW_SEL'::
408 Transplant the selected window to the given window.
410 *-s*, *--swap* 'WINDOW_SEL'::
411 Swap the selected window with the given window.
413 *-p*, *--presel* 'DIR'|cancel::
414 Preselect the splitting area of the selected window (or cancel the preselection).
416 *-r*, *--ratio* 'RATIO'::
417 Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
419 *-e*, *--edge* 'DIR' 'RATIO'|±'PIXELS'::
420 Set or change the splitting ratio of the edge located in the given direction in relation to the selected window.
422 *-R*, *--rotate* 'DIR' '90|270|180'::
423 Rotate the tree holding the edge located in the given direction in relation to the selected window.
425 *-t*, *--toggle* floating|fullscreen|pseudo_tiled|locked|sticky|private[=on|off]::
426 Set or toggle the given state for the selected window.
428 *-l*, *--layer* below|normal|above::
429 Set the stacking layer of the selected window.
432 Close the selected window.
435 Kill the selected window.
443 desktop ['DESKTOP_SEL'] 'OPTIONS'
447 *-f*, *--focus* ['DESKTOP_SEL']::
448 Focus the selected or given desktop.
450 *-m*, *--to-monitor* 'MONITOR_SEL'::
451 Send the selected desktop to the given monitor.
453 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
454 Set or cycle the layout of the selected desktop.
456 *-n*, *--rename* <new_name>::
457 Rename the selected desktop.
459 *-s*, *--swap* 'DESKTOP_SEL'::
460 Swap the selected desktop with the given desktop.
462 *-b*, *--bubble* 'CYCLE_DIR'::
463 Bubble the selected desktop in the given direction.
466 Remove the selected desktop.
468 *-c*, *--cancel-presel*::
469 Cancel the preselection of all the windows of the selected desktop.
471 *-F*, *--flip* 'horizontal|vertical'::
472 Flip the tree of the selected desktop.
474 *-R*, *--rotate* '90|270|180'::
475 Rotate the tree of the selected desktop.
478 Reset the split ratios of the tree of the selected desktop.
481 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
483 *-C*, *--circulate* forward|backward::
484 Circulate the leaves of the tree of the selected desktop.
486 *-t*, *--toggle* floating[=on|off]::
487 Set or toggle the given state for the selected desktop.
496 monitor ['MONITOR_SEL'] 'OPTIONS'
500 *-f*, *--focus* ['MONITOR_SEL']::
501 Focus the selected or given monitor.
503 *-a*, *--add-desktops* <name>...::
504 Create desktops with the given names in the selected monitor.
506 *-r*, *--remove-desktops* <name>...::
507 Remove desktops with the given names.
509 *-o*, *--reorder-desktops* <name>...::
510 Reorder the desktops of the selected monitor to match the given order.
512 *-d*, *--reset-desktops* <name>...::
513 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.
515 *-n*, *--rename* <new_name>::
516 Rename the selected monitor.
518 *-s*, *--swap* 'MONITOR_SEL'::
519 Swap the selected monitor with the given monitor.
532 List matching windows.
535 List matching desktops.
538 List matching monitors.
541 Print tree rooted at query.
544 Print the history as it relates to the query.
547 Print the window stacking order.
549 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
550 Constrain matches to the selected monitor, desktop or window.
563 *-T*, *--tree* <file_path>::
564 Load the desktop trees from the given file.
566 *-H*, *--history* <file_path>::
567 Load the focus history from the given file.
569 *-S*, *--stack* <file_path>::
570 Load the window stacking order from the given file.
584 Manage all the unmanaged windows remaining from a previous session.
586 *--toggle-visibility*::
587 Toggle the visibility of all the windows.
589 *--record-history* on|off::
590 Enable or disable the recording of window focus history.
592 *--subscribe* (all|report|monitor|desktop|window|...)*::
593 Continuously print status information.
596 Print the current status information.
609 *-g*, *--grab* focus|move|resize_side|resize_corner::
610 Initiate the given pointer action.
612 *-t*, *--track* <x> <y>::
613 Pass the pointer root coordinates for the current pointer action.
616 Terminate the current pointer action.
629 *-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)] [layer=LAYER] [split_dir=DIR] [split_ratio=RATIO]::
632 *-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
633 Remove the given rules.
635 *-l*, *--list* [<class_name>|<instance_name>|*]::
644 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-w 'WINDOW_SEL'] <key> [<value>]::
645 Get or set the value of <key>.
654 Quit with an optional exit status.
659 If the server can't handle a message, *bspc* will return with one of the following exit codes:
671 Colors are either '#RRGGBB' or http://en.wikipedia.org/wiki/X11_color_names[X color names], booleans are 'true', 'on', 'false' or 'off'.
673 All the boolean settings are 'false' by default unless stated otherwise.
678 'focused_border_color'::
679 Color of the border of a focused window of a focused monitor.
681 'active_border_color'::
682 Color of the border of a focused window of an unfocused monitor.
684 'normal_border_color'::
685 Color of the border of an unfocused window.
687 'presel_border_color'::
688 Color of the *presel* message feedback.
690 'focused_locked_border_color'::
691 Color of the border of a focused locked window of a focused monitor.
693 'active_locked_border_color'::
694 Color of the border of a focused locked window of an unfocused monitor.
696 'normal_locked_border_color'::
697 Color of the border of an unfocused locked window.
699 'focused_sticky_border_color'::
700 Color of the border of a focused sticky window of a focused monitor.
702 'active_sticky_border_color'::
703 Color of the border of a focused sticky window of an unfocused monitor.
705 'normal_sticky_border_color'::
706 Color of the border of an unfocused sticky window.
708 'focused_private_border_color'::
709 Color of the border of a focused private window of a focused monitor.
711 'active_private_border_color'::
712 Color of the border of a focused private window of an unfocused monitor.
714 'normal_private_border_color'::
715 Color of the border of an unfocused private window.
717 'urgent_border_color'::
718 Color of the border of an urgent window.
724 Prefix prepended to each of the status lines.
726 'external_rules_command'::
727 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).
730 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*.
732 'history_aware_focus'::
733 Give priority to the focus history when focusing nodes.
735 'focus_by_distance'::
736 Base focusing on distances between windows.
738 'borderless_monocle'::
739 Remove borders of tiled windows for the *monocle* desktop layout.
742 Remove gaps of tiled windows for the *monocle* desktop layout.
745 Set the desktop layout to *monocle* if there's only one tiled window in the tree.
747 'focus_follows_pointer'::
748 Focus the window under the pointer.
750 'pointer_follows_focus'::
751 When focusing a window, put the pointer at its center.
753 'pointer_follows_monitor'::
754 When focusing a monitor, put the pointer at its center.
757 Interpret two consecutive identical *use* messages as an *alternate* message.
760 Interpret two consecutive identical *presel* messages as a *cancel* message.
762 'apply_floating_atom'::
763 Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
765 'ignore_ewmh_focus'::
766 Ignore EWMH focus requests coming from applications.
768 'center_pseudo_tiled'::
769 Center pseudo tiled windows into their tiling rectangles. Defaults to 'true'.
771 'remove_disabled_monitors'::
772 Consider disabled monitors as disconnected.
774 'remove_unplugged_monitors'::
775 Remove unplugged monitors.
777 'merge_overlapping_monitors'::
778 Merge overlapping monitors (the bigger remains).
780 Monitor and Desktop Settings
781 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
787 Padding space added at the sides of the monitor or desktop.
789 Default, Desktop Default and Window Settings
790 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
795 Default and Desktop Settings
796 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
799 Size of the gap that separates windows.
805 Status information is composed of items separated by colons.
807 Each item has the form '<type><value>' where '<type>' is the first character of the item.
816 Occupied focused desktop.
819 Occupied unfocused desktop.
822 Free focused desktop.
825 Free unfocused desktop.
828 Urgent focused desktop.
831 Urgent unfocused desktop.
834 Layout of the focused desktop of a monitor.
836 Environment Variables
837 ---------------------
840 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'.
845 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
846 * A custom panel (have a look at the files in 'examples/panel').
851 * Configured and controlled through messages.
852 * Multiple monitors support.
859 * Steven Allen <steven at stebalien.com>
860 * Thomas Adam <thomas at xteddy.org>
861 * Ivan Kanakarakis <ivan.kanak at gmail.com>
866 Bastien Dejean <nihilhill at gmail.com>
871 bspwm at librelist.com
874 vim: set ft=asciidoc: