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.
44 DIR := left | right | up | down
45 CYCLE_DIR := next | prev
51 Selectors are used to select a target window, desktop, or monitor. A selector
52 can either describe the target relatively or name it globally.
54 Descriptive (relative) selectors consist of a primary selector and any number
55 of non-conflicting modifiers as follows:
57 PRIMARY_SELECTOR[.MODIFIER]*
59 For obvious reasons, neither desktop nor monitor names may be valid descriptive
68 WINDOW_SEL := <window_id>
69 | (DIR|CYCLE_DIR|biggest|last|focused|older|newer)[.manual|.automatic][.tiled|nontiled][.pseudotiled|.nonpseudotiled][.floating|.nonfloating][.fullscreen|.nonfullscreen][.below|.normal|.above][.local|.foreign][.like|.unlike][.focused|.unfocused][.urgent|.nonurgent][.sticky|.nonsticky][.public|.private][.locked|.unlocked]
76 Selects the window in the given (spacial) direction relative to the active window.
79 Selects the window in the given (cyclic) direction.
82 Selects the biggest window on the current desktop.
85 Selects the previously focused window.
88 Selects the currently focused window.
91 Selects the window older than the focused window in the history.
94 Selects the window newer than the focused window in the history.
100 Only consider tiled windows.
103 Only consider non tiled windows.
106 Only consider pseudo-tiled windows.
109 Only consider non pseudo-tiled windows.
112 Only consider floating windows.
115 Only consider non floating windows.
118 Only consider fullscreen windows.
121 Only consider non fullscreen windows.
124 Only consider windows in manual splitting mode.
127 Only consider windows in automatic splitting mode.
130 Only consider focused windows.
133 Only consider unfocused windows.
136 Only consider windows of the BELOW layer.
139 Only consider windows of the NORMAL layer.
142 Only consider windows of the ABOVE layer.
145 Only consider windows that have the same class as the current window.
148 Only consider windows that have a different class than the current window.
151 Only consider windows of the current desktop.
154 Only consider windows outside of the current desktop.
157 Only consider private windows.
160 Only consider non private windows.
163 Only consider urgent windows.
166 Only consider non urgent windows.
169 Only consider sticky windows.
172 Only consider non sticky windows.
175 Only consider locked windows.
178 Only consider non locked windows.
186 DESKTOP_SEL := <desktop_name>
188 | (CYCLE_DIR|last|[MONITOR_SEL:]focused|older|newer)[.occupied|.free][.urgent|.nonurgent][.local|.foreign]
195 Selects the desktop with the given name.
198 Selects the nth desktop.
201 Selects the desktop in the given direction relative to the active desktop.
204 Selects the previously focused desktop.
207 Selects the currently focused desktop.
210 Selects the desktop older than the focused desktop in the history.
213 Selects the desktop newer than the focused desktop in the history.
219 Only consider occupied desktops.
222 Only consider free desktops.
225 Only consider urgent desktops.
228 Only consider non urgent desktops.
231 Only consider desktops of the current monitor.
234 Only consider desktops outside of the current monitor.
242 MONITOR_SEL := <monitor_name>
244 | (DIR|CYCLE_DIR|last|primary|focused|older|newer)[.occupied|.free]
251 Selects the monitor with the given name.
254 Selects the nth monitor.
257 Selects the monitor in the given (spacial) direction relative to the active monitor.
260 Selects the monitor in the given (cyclic) direction relative to the active monitor.
263 Selects the primary monitor.
266 Selects the previously focused monitor.
269 Selects the currently focused monitor.
272 Selects the monitor older than the focused monitor in the history.
275 Selects the monitor newer than the focused monitor in the history.
281 Only consider monitors where the focused desktop is occupied.
284 Only consider monitors where the focused desktop is free.
291 Its size and position are determined by the splitting type and ratio of each node of its path in the window tree.
294 Has an unrestricted size while being centered in its tiling space.
297 Can be moved/resized freely. Although it doesn't occupy any tiling space, it is still part of the window tree.
300 Fills its monitor rectangle and has no borders. It is send in the ABOVE layer by default.
307 Ignores the *window --close* message.
310 Stays in the focused desktop of its monitor.
313 Tries to keep the same tiling position/size.
316 Has its urgency hint set. This flag is set externally.
322 There's three stacking layers: BELOW, NORMAL and ABOVE.
324 In each layer, the window are orderered as follow: tiled & pseudo-tiled < fullscreen < floating.
336 window ['WINDOW_SEL'] 'OPTIONS'
340 *-f*, *--focus* ['WINDOW_SEL']::
341 Focus the selected or given window.
343 *-a*, *--activate* ['WINDOW_SEL']::
344 Activate the selected or given window.
346 *-d*, *--to-desktop* 'DESKTOP_SEL'::
347 Send the selected window to the given desktop.
349 *-m*, *--to-monitor* 'MONITOR_SEL'::
350 Send the selected window to the given monitor.
352 *-w*, *--to-window* 'WINDOW_SEL'::
353 Transplant the selected window to the given window.
355 *-s*, *--swap* 'WINDOW_SEL'::
356 Swap the selected window with the given window.
358 *-p*, *--presel* 'DIR'|cancel::
359 Preselect the splitting area of the selected window (or cancel the preselection).
361 *-r*, *--ratio* 'RATIO'::
362 Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
364 *-e*, *--edge* 'DIR' 'RATIO'|±'PIXELS'::
365 Set or change the splitting ratio of the edge located in the given direction in relation to the selected window.
367 *-R*, *--rotate* 'DIR' '90|270|180'::
368 Rotate the tree holding the edge located in the given direction in relation to the selected window.
370 *-t*, *--state* tiled|pseudo_tiled|floating|fullscreen::
371 Set the state of the selected window.
373 *-g*, *--flag* locked|sticky|private[=on|off]::
374 Set or toggle the given flag for the selected window.
376 *-l*, *--layer* below|normal|above::
377 Set the stacking layer of the selected window.
380 Close the selected window.
383 Kill the selected window.
391 desktop ['DESKTOP_SEL'] 'OPTIONS'
395 *-f*, *--focus* ['DESKTOP_SEL']::
396 Focus the selected or given desktop.
398 *-m*, *--to-monitor* 'MONITOR_SEL'::
399 Send the selected desktop to the given monitor.
401 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
402 Set or cycle the layout of the selected desktop.
404 *-n*, *--rename* <new_name>::
405 Rename the selected desktop.
407 *-s*, *--swap* 'DESKTOP_SEL'::
408 Swap the selected desktop with the given desktop.
410 *-b*, *--bubble* 'CYCLE_DIR'::
411 Bubble the selected desktop in the given direction.
414 Remove the selected desktop.
416 *-c*, *--cancel-presel*::
417 Cancel the preselection of all the windows of the selected desktop.
419 *-F*, *--flip* 'horizontal|vertical'::
420 Flip the tree of the selected desktop.
422 *-R*, *--rotate* '90|270|180'::
423 Rotate the tree of the selected desktop.
426 Reset the split ratios of the tree of the selected desktop.
429 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
431 *-C*, *--circulate* forward|backward::
432 Circulate the leaves of the tree of the selected desktop.
441 monitor ['MONITOR_SEL'] 'OPTIONS'
445 *-f*, *--focus* ['MONITOR_SEL']::
446 Focus the selected or given monitor.
448 *-a*, *--add-desktops* <name>...::
449 Create desktops with the given names in the selected monitor.
451 *-r*, *--remove-desktops* <name>...::
452 Remove desktops with the given names.
454 *-o*, *--reorder-desktops* <name>...::
455 Reorder the desktops of the selected monitor to match the given order.
457 *-d*, *--reset-desktops* <name>...::
458 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.
460 *-n*, *--rename* <new_name>::
461 Rename the selected monitor.
463 *-s*, *--swap* 'MONITOR_SEL'::
464 Swap the selected monitor with the given monitor.
477 List matching windows.
480 List matching desktops.
483 List matching monitors.
486 Print tree rooted at query.
489 Print the history as it relates to the query.
492 Print the window stacking order.
494 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
495 Constrain matches to the selected monitor, desktop or window.
508 *-T*, *--tree* <file_path>::
509 Load the desktop trees from the given file.
511 *-H*, *--history* <file_path>::
512 Load the focus history from the given file.
514 *-S*, *--stack* <file_path>::
515 Load the window stacking order from the given file.
529 Manage all the unmanaged windows remaining from a previous session.
531 *--toggle-visibility*::
532 Toggle the visibility of all the windows.
534 *--record-history* on|off::
535 Enable or disable the recording of window focus history.
537 *--subscribe* (all|report|monitor|desktop|window|...)*::
538 Continuously print status information. See the *EVENTS* section for the detailed description of each event.
541 Print the current status information.
554 *-g*, *--grab* focus|move|resize_side|resize_corner::
555 Initiate the given pointer action.
557 *-t*, *--track* <x> <y>::
558 Pass the pointer root coordinates for the current pointer action.
561 Terminate the current pointer action.
574 *-a*, *--add* <class_name>|<instance_name>|* [*-o*|*--one-shot*] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [state=STATE] [layer=LAYER] [split_dir=DIR] [split_ratio=RATIO] [(locked|sticky|private|center|follow|manage|focus|border)=(on|off)]::
577 *-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
578 Remove the given rules.
580 *-l*, *--list* [<class_name>|<instance_name>|*]::
589 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-w 'WINDOW_SEL'] <key> [<value>]::
590 Get or set the value of <key>.
599 Quit with an optional exit status.
604 If the server can't handle a message, *bspc* will return with one of the following exit codes:
616 Colors are either '#RRGGBB' or http://en.wikipedia.org/wiki/X11_color_names[X color names], booleans are 'true', 'on', 'false' or 'off'.
618 All the boolean settings are 'false' by default unless stated otherwise.
623 'focused_border_color'::
624 Color of the border of a focused window of a focused monitor.
626 'active_border_color'::
627 Color of the border of a focused window of an unfocused monitor.
629 'normal_border_color'::
630 Color of the border of an unfocused window.
632 'presel_border_color'::
633 Color of the *window --presel* message feedback.
635 'focused_locked_border_color'::
636 Color of the border of a focused locked window of a focused monitor.
638 'active_locked_border_color'::
639 Color of the border of a focused locked window of an unfocused monitor.
641 'normal_locked_border_color'::
642 Color of the border of an unfocused locked window.
644 'focused_sticky_border_color'::
645 Color of the border of a focused sticky window of a focused monitor.
647 'active_sticky_border_color'::
648 Color of the border of a focused sticky window of an unfocused monitor.
650 'normal_sticky_border_color'::
651 Color of the border of an unfocused sticky window.
653 'focused_private_border_color'::
654 Color of the border of a focused private window of a focused monitor.
656 'active_private_border_color'::
657 Color of the border of a focused private window of an unfocused monitor.
659 'normal_private_border_color'::
660 Color of the border of an unfocused private window.
662 'urgent_border_color'::
663 Color of the border of an urgent window.
669 Prefix prepended to each of the status lines.
671 'external_rules_command'::
672 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).
675 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*.
677 'history_aware_focus'::
678 Give priority to the focus history when focusing nodes.
680 'focus_by_distance'::
681 Base focusing on distances between windows.
683 'borderless_monocle'::
684 Remove borders of tiled windows for the *monocle* desktop layout.
687 Remove gaps of tiled windows for the *monocle* desktop layout.
690 Set the desktop layout to *monocle* if there's only one tiled window in the tree.
692 'focus_follows_pointer'::
693 Focus the window under the pointer.
695 'pointer_follows_focus'::
696 When focusing a window, put the pointer at its center.
698 'pointer_follows_monitor'::
699 When focusing a monitor, put the pointer at its center.
702 Interpret consecutive identical *--focus* arguments as the *last* selector for the *monitor* and *desktop* commands.
705 Interpret consecutive identical *--presel* arguments as *--cancel-presel* option.
707 'ignore_ewmh_focus'::
708 Ignore EWMH focus requests coming from applications.
710 'center_pseudo_tiled'::
711 Center pseudo tiled windows into their tiling rectangles. Defaults to 'true'.
713 'remove_disabled_monitors'::
714 Consider disabled monitors as disconnected.
716 'remove_unplugged_monitors'::
717 Remove unplugged monitors.
719 'merge_overlapping_monitors'::
720 Merge overlapping monitors (the bigger remains).
722 Monitor and Desktop Settings
723 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
729 Padding space added at the sides of the monitor or desktop.
731 Default, Desktop Default and Window Settings
732 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
737 Default and Desktop Settings
738 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
741 Size of the gap that separates windows.
748 See the next section for the description of the format.
750 'monitor_add <monitor_name> <monitor_id> <monitor_geometry>'::
753 'monitor_rename <old_name> <new_name>'::
754 A monitor is renamed.
756 'monitor_remove <monitor_name>'::
757 A monitor is removed.
759 'monitor_focus <monitor_name>'::
760 A monitor is focused.
762 'monitor_geometry <monitor_name> <monitor_geometry>'::
763 The geometry of a monitor changed.
765 'desktop_add <monitor_name> <desktop_name>'::
768 'desktop_rename <monitor_name> <old_name> <new_name>'::
769 A desktop is renamed.
771 'desktop_remove <monitor_name> <desktop_name>'::
772 A desktop is removed.
774 'desktop_swap <src_monitor_name> <src_desktop_name> <dst_monitor_name> <dst_desktop_name>'::
775 A desktop is swapped.
777 'desktop_transfer <src_monitor_name> <src_desktop_name> <dst_monitor_name>'::
778 A desktop is transferred.
780 'desktop_focus <monitor_name> <desktop_name>'::
781 A desktop is focused.
783 'desktop_layout <monitor_name> <desktop_name> tiled|monocle'::
784 The layout of a desktop changed.
786 'window_manage <monitor_name> <desktop_name> <window_id> <ip_id>'::
789 'window_unmanage <monitor_name> <desktop_name> <window_id>'::
790 A window is unmanaged.
792 'window_swap <src_monitor_name> <src_desktop_name> <src_window_id> <dst_monitor_name> <dst_desktop_name> <dst_window_id>'::
795 'window_transfer <src_monitor_name> <src_desktop_name> <src_window_id> <dst_monitor_name> <dst_desktop_name> <dst_window_id>'::
796 A window is transferred.
798 'window_focus <monitor_name> <desktop_name> <window_id>'::
801 'window_activate <monitor_name> <desktop_name> <window_id>'::
802 A window is activated.
804 'window_geometry <monitor_name> <desktop_name> <window_id> <window_geometry>'::
805 The geometry of a window changed.
807 'window_state <monitor_name> <desktop_name> <window_id> tiled|pseudo_tiled|floating|fullscreen on|off'::
808 The state of a window changed.
810 'window_flag <monitor_name> <desktop_name> <window_id> sticky|private|locked|urgent on|off'::
811 One of the flags of a window changed.
813 'window_layer <monitor_name> <desktop_name> <window_id> below|normal|above'::
814 The layer of a window changed.
816 Please note that *bspwm* initializes monitors before it reads messages on its socket, therefore the initial monitor events can't be received.
821 Each report event message is composed of items separated by colons.
823 Each item has the form '<type><value>' where '<type>' is the first character of the item.
832 Occupied focused desktop.
835 Occupied unfocused desktop.
838 Free focused desktop.
841 Free unfocused desktop.
844 Urgent focused desktop.
847 Urgent unfocused desktop.
850 Layout of the focused desktop of a monitor.
852 Environment Variables
853 ---------------------
856 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'.
861 * Steven Allen <steven at stebalien.com>
862 * Thomas Adam <thomas at xteddy.org>
863 * Ivan Kanakarakis <ivan.kanak at gmail.com>
868 Bastien Dejean <nihilhill at gmail.com>