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]
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.
197 DESKTOP_SEL := <desktop_name>
199 | (CYCLE_DIR|last|[MONITOR_SEL:]focused|older|newer)[.occupied|.free][.urgent][.local]
206 Selects the desktop with the given name.
209 Selects the nth desktop.
212 Selects the desktop in the given direction relative to the active desktop.
215 Selects the previously focused desktop.
218 Selects the currently focused desktop.
221 Selects the desktop older than the focused desktop in the history.
224 Selects the desktop newer than the focused desktop in the history.
230 Only consider occupied desktops.
233 Only consider free desktops.
236 Only consider urgent desktops.
239 Only consider desktops of the current monitor.
247 MONITOR_SEL := <monitor_name>
249 | (DIR|CYCLE_DIR|last|primary|focused|older|newer)[.occupied|.free]
256 Selects the monitor with the given name.
259 Selects the nth monitor.
262 Selects the monitor in the given (spacial) direction relative to the active monitor.
265 Selects the monitor in the given (cyclic) direction relative to the active monitor.
268 Selects the primary monitor.
271 Selects the previously focused monitor.
274 Selects the currently focused monitor.
277 Selects the monitor older than the focused monitor in the history.
280 Selects the monitor newer than the focused monitor in the history.
286 Only consider monitors where the focused desktop is occupied.
289 Only consider monitors where the focused desktop is free.
296 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.
299 Has an unrestricted size while being centered in its tiling space.
302 Fills its monitor rectangle, is above all the other windows and has no borders.
305 Ignores the *close* message.
308 Stays in the focused desktop of its monitor.
311 Tries to keep the same tiling position/size.
323 window ['WINDOW_SEL'] 'OPTIONS'
327 *-f*, *--focus* ['WINDOW_SEL']::
328 Focus the selected or given window.
330 *-d*, *--to-desktop* 'DESKTOP_SEL'::
331 Send the selected window to the given desktop.
333 *-m*, *--to-monitor* 'MONITOR_SEL'::
334 Send the selected window to the given monitor.
336 *-w*, *--to-window* 'WINDOW_SEL'::
337 Transplant the selected window to the given window.
339 *-s*, *--swap* 'WINDOW_SEL'::
340 Swap the selected window with the given window.
342 *-p*, *--presel* 'DIR'|cancel::
343 Preselect the splitting area of the selected window (or cancel the preselection).
345 *-r*, *--ratio* 'RATIO'::
346 Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
348 *-e*, *--edge* 'DIR' 'RATIO'|±'PIXELS'::
349 Set or change the splitting ratio of the edge located in the given direction in relation to the selected window.
351 *-R*, *--rotate* 'DIR' '90|270|180'::
352 Rotate the tree holding the edge located in the given direction in relation to the selected window.
354 *-t*, *--toggle* floating|fullscreen|pseudo_tiled|locked|sticky|private[=on|off]::
355 Set or toggle the given state for the selected window.
358 Close the selected window.
361 Kill the selected window.
369 desktop ['DESKTOP_SEL'] 'OPTIONS'
373 *-f*, *--focus* ['DESKTOP_SEL']::
374 Focus the selected or given desktop.
376 *-m*, *--to-monitor* 'MONITOR_SEL'::
377 Send the selected desktop to the given monitor.
379 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
380 Set or cycle the layout of the selected desktop.
382 *-n*, *--rename* <new_name>::
383 Rename the selected desktop.
385 *-s*, *--swap* 'DESKTOP_SEL'::
386 Swap the selected desktop with the given desktop.
389 Remove the selected desktop.
391 *-c*, *--cancel-presel*::
392 Cancel the preselection of all the windows of the selected desktop.
394 *-F*, *--flip* 'horizontal|vertical'::
395 Flip the tree of the selected desktop.
397 *-R*, *--rotate* '90|270|180'::
398 Rotate the tree of the selected desktop.
401 Reset the split ratios of the tree of the selected desktop.
404 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
406 *-C*, *--circulate* forward|backward::
407 Circulate the leaves of the tree of the selected desktop.
409 *-t*, *--toggle* floating[=on|off]::
410 Set or toggle the given state for the selected desktop.
419 monitor ['MONITOR_SEL'] 'OPTIONS'
423 *-f*, *--focus* ['MONITOR_SEL']::
424 Focus the selected or given monitor.
426 *-a*, *--add-desktops* <name>...::
427 Create desktops with the given names in the selected monitor.
429 *-r*, *--remove-desktops* <name>...::
430 Remove desktops with the given names.
432 *-o*, *--reorder-desktops* <name>...::
433 Reorder the desktops of the selected monitor to match the given order.
435 *-d*, *--reset-desktops* <name>...::
436 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.
438 *-n*, *--rename* <new_name>::
439 Rename the selected monitor.
441 *-s*, *--swap* 'MONITOR_SEL'::
442 Swap the selected monitor with the given monitor.
455 List matching windows.
458 List matching desktops.
461 List matching monitors.
464 Print tree rooted at query.
467 Print the history as it relates to the query.
470 Print the window stacking order.
472 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
473 Constrain matches to the selected monitor, desktop or window.
486 *-T*, *--tree* <file_path>::
487 Load the desktop trees from the given file.
489 *-H*, *--history* <file_path>::
490 Load the focus history from the given file.
492 *-S*, *--stack* <file_path>::
493 Load the window stacking order from the given file.
507 Manage all the unmanaged windows remaining from a previous session.
509 *--toggle-visibility*::
510 Toggle the visibility of all the windows.
512 *--record-history* on|off::
513 Enable or disable the recording of window focus history.
516 Continuously print status information.
519 Print the current status information.
532 *-g*, *--grab* focus|move|resize_side|resize_corner::
533 Initiate the given pointer action.
535 *-t*, *--track* <x> <y>::
536 Pass the pointer root coordinates for the current pointer action.
539 Terminate the current pointer action.
552 *-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]::
555 *-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
556 Remove the given rules.
558 *-l*, *--list* [<class_name>|<instance_name>|*]::
567 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-w 'WINDOW_SEL'] <key> [<value>]::
568 Get or set the value of <key>.
577 Quit with an optional exit status.
582 If the server can't handle a message, *bspc* will return with one of the following exit codes:
594 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
596 All the boolean settings are 'false' by default.
601 'focused_border_color'::
602 Color of the border of a focused window of a focused monitor.
604 'active_border_color'::
605 Color of the border of a focused window of an unfocused monitor.
607 'normal_border_color'::
608 Color of the border of an unfocused window.
610 'presel_border_color'::
611 Color of the *presel* message feedback.
613 'focused_locked_border_color'::
614 Color of the border of a focused locked window of a focused monitor.
616 'active_locked_border_color'::
617 Color of the border of a focused locked window of an unfocused monitor.
619 'normal_locked_border_color'::
620 Color of the border of an unfocused locked window.
622 'focused_sticky_border_color'::
623 Color of the border of a focused sticky window of a focused monitor.
625 'active_sticky_border_color'::
626 Color of the border of a focused sticky window of an unfocused monitor.
628 'normal_sticky_border_color'::
629 Color of the border of an unfocused sticky window.
631 'focused_private_border_color'::
632 Color of the border of a focused private window of a focused monitor.
634 'active_private_border_color'::
635 Color of the border of a focused private window of an unfocused monitor.
637 'normal_private_border_color'::
638 Color of the border of an unfocused private window.
640 'urgent_border_color'::
641 Color of the border of an urgent window.
647 Prefix prepended to each of the status lines.
649 'external_rules_command'::
650 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).
652 'history_aware_focus'::
653 Give priority to the focus history when focusing nodes.
655 'focus_by_distance'::
656 Base focusing on distances between windows.
658 'borderless_monocle'::
659 Remove borders for tiled windows in monocle mode.
662 Remove gaps for tiled windows in monocle mode.
664 'focus_follows_pointer'::
665 Focus the window under the pointer.
667 'pointer_follows_focus'::
668 When focusing a window, put the pointer at its center.
670 'pointer_follows_monitor'::
671 When focusing a monitor, put the pointer at its center.
674 Interpret two consecutive identical *use* messages as an *alternate* message.
677 Interpret two consecutive identical *presel* messages as a *cancel* message.
679 'apply_floating_atom'::
680 Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
682 'ignore_ewmh_focus'::
683 Ignore EWMH focus requests coming from applications.
685 'remove_disabled_monitors'::
686 Consider disabled monitors as disconnected.
688 'remove_unplugged_monitors'::
689 Remove unplugged monitors.
691 'merge_overlapping_monitors'::
692 Merge overlapping monitors (the bigger remains).
694 Monitor and Desktop Settings
695 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
701 Padding space added at the sides of the monitor or desktop.
703 Default, Desktop Default and Window Settings
704 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
709 Default and Desktop Settings
710 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
713 Size of the gap that separates windows.
719 Status information is composed of items separated by colons.
721 Each item has the form '<type><value>' where '<type>' is the first character of the item.
730 Occupied focused desktop.
733 Occupied unfocused desktop.
736 Free focused desktop.
739 Free unfocused desktop.
742 Urgent focused desktop.
745 Urgent unfocused desktop.
748 Layout of the focused desktop of a monitor.
750 Environment Variables
751 ---------------------
754 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'.
759 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
760 * A custom panel (have a look at the files in 'examples/panel').
765 * Configured and controlled through messages.
766 * Multiple monitors support.
773 * Steven Allen <steven at stebalien.com>
774 * Thomas Adam <thomas at xteddy.org>
775 * Ivan Kanakarakis <ivan.kanak at gmail.com>
780 Bastien Dejean <nihilhill at gmail.com>
785 bspwm at librelist.com
788 vim: set ft=asciidoc: