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|.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 a libre 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.
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 informations.
519 Print the current status informations.
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)=(true|false)] [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.
581 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
583 All the boolean settings are 'false' by default.
588 'focused_border_color'::
589 Color of the border of a focused window of a focused monitor.
591 'active_border_color'::
592 Color of the border of a focused window of an unfocused monitor.
594 'normal_border_color'::
595 Color of the border of an unfocused window.
597 'presel_border_color'::
598 Color of the *presel* message feedback.
600 'focused_locked_border_color'::
601 Color of the border of a focused locked window of a focused monitor.
603 'active_locked_border_color'::
604 Color of the border of a focused locked window of an unfocused monitor.
606 'normal_locked_border_color'::
607 Color of the border of an unfocused locked window.
609 'focused_sticky_border_color'::
610 Color of the border of a focused sticky window of a focused monitor.
612 'active_sticky_border_color'::
613 Color of the border of a focused sticky window of an unfocused monitor.
615 'normal_sticky_border_color'::
616 Color of the border of an unfocused sticky window.
618 'focused_private_border_color'::
619 Color of the border of a focused private window of a focused monitor.
621 'active_private_border_color'::
622 Color of the border of a focused private window of an unfocused monitor.
624 'normal_private_border_color'::
625 Color of the border of an unfocused private window.
627 'urgent_border_color'::
628 Color of the border of an urgent window.
634 Prefix prepended to each of the status lines.
636 'external_rules_command'::
637 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).
639 'history_aware_focus'::
640 Give priority to the focus history when focusing nodes.
642 'borderless_monocle'::
643 Remove borders for tiled windows in monocle mode.
646 Remove gaps for tiled windows in monocle mode.
648 'focus_follows_pointer'::
649 Focus the window under the pointer.
651 'pointer_follows_monitor'::
652 When focusing a monitor, put the pointer at its center.
655 Interpret two consecutive identical *use* messages as an *alternate* message.
658 Interpret two consecutive identical *presel* messages as a *cancel* message.
660 'apply_floating_atom'::
661 Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
663 'ignore_ewmh_focus'::
664 Ignore EWMH focus requests coming from applications.
666 'remove_disabled_monitor'::
667 Consider disabled monitors as disconnected.
669 Monitor and Desktop Settings
670 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
676 Padding space added at the sides of the monitor or desktop.
678 Desktop and Window Settings
679 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
688 Size of the gap that separates windows.
694 Status informations are composed of items separated by colons.
696 Each item has the form '<type><value>' where '<type>' is the first character of the item.
705 Occupied focused desktop.
708 Occupied unfocused desktop.
711 Free focused desktop.
714 Free unfocused desktop.
717 Urgent focused desktop.
720 Urgent unfocused desktop.
723 Layout of the focused desktop of the focused monitor.
725 Environment Variables
726 ---------------------
729 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'.
734 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
735 * A custom panel if the '-s' flag is used (have a look at the files in 'examples/panel').
740 * Configured and controlled through messages.
741 * Multiple monitors support (via 'RandR').
742 * EWMH support (*tint2* works).
748 * Steven Allen <steven at stebalien.com>
749 * Thomas Adam <thomas at xteddy.org>
750 * Ivan Kanakarakis <ivan.kanak at gmail.com>
755 Bastien Dejean <nihilhill at gmail.com>
760 bspwm at librelist.com
763 vim: set ft=asciidoc: