3 .\" Author: [see the "Author" section]
4 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
6 .\" Manual: Bspwm Manual
10 .TH "BSPWM" "1" "11/25/2015" "Bspwm 0\&.9" "Bspwm Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 bspwm \- Binary space partitioning window manager
34 \fBbspwm\fR [\fB\-h\fR|\fB\-v\fR|\fB\-c\fR \fICONFIG_PATH\fR]
36 \fBbspc\fR \fICOMMAND\fR [\fIARGUMENTS\fR]
39 \fBbspwm\fR is a tiling window manager that represents windows as the leaves of a full binary tree\&.
41 It is controlled and configured via \fBbspc\fR\&.
46 Print the synopsis and exit\&.
51 Print the version and exit\&.
54 \fB\-c\fR \fICONFIG_PATH\fR
56 Use the given configuration file\&.
58 .SH "COMMON DEFINITIONS"
64 DIR := left | right | up | down
65 CYCLE_DIR := next | prev
72 Selectors are used to select a target window, desktop, or monitor\&. A selector can either describe the target relatively or name it globally\&.
74 Descriptive (relative) selectors consist of a primary selector and any number of non\-conflicting modifiers as follows:
80 PRIMARY_SELECTOR[\&.MODIFIER]*
86 For obvious reasons, neither desktop nor monitor names may be valid descriptive selectors\&.
88 An exclamation mark can be prepended to certain modifiers in order to reverse their meaning\&.
97 WINDOW_SEL := (<window_id>|DIR|CYCLE_DIR|biggest|last|focused|older|newer)[\&.[!]automatic][\&.[!](tiled|pseudo_tiled|floating|fullscreen)][\&.[!](below|normal|above)][\&.[!]local][\&.[!]same_class][\&.[!]focused][\&.[!](urgent|sticky|private|locked)]
104 .nr an-no-space-flag 1
108 \fBPrimary Selectors\fR
113 Selects the window in the given (spacial) direction relative to the active window\&.
118 Selects the window in the given (cyclic) direction\&.
123 Selects the biggest window on the current desktop\&.
128 Selects the previously focused window\&.
133 Selects the currently focused window\&.
138 Selects the window older than the focused window in the history\&.
143 Selects the window newer than the focused window in the history\&.
148 .nr an-no-space-flag 1
155 [!](tiled|pseudo_tiled|floating|fullscreen)
157 Only consider windows having or not having the given state\&.
162 Only consider windows in automatic or manual insertion mode\&.
167 Only consider focused or unfocused windows\&.
172 Only consider windows that have or don\(cqt have the same class as the current window\&.
177 Only consider windows in or not in the current desktop\&.
180 [!](private|urgent|sticky|locked)
182 Only consider windows that have or don\(cqt have the given flag set\&.
185 [!](below|normal|above)
187 Only consider windows in or not in the given layer\&.
198 DESKTOP_SEL := (<desktop_name>|[MONITOR_SEL:](focused|^<n>)CYCLE_DIR|last|older|newer)[\&.[!]occupied][\&.[!]urgent][\&.[!]local]
205 .nr an-no-space-flag 1
209 \fBPrimary Selectors\fR
214 Selects the desktop with the given name\&.
219 Selects the nth desktop\&.
224 Selects the desktop in the given direction relative to the active desktop\&.
229 Selects the previously focused desktop\&.
234 Selects the currently focused desktop\&.
239 Selects the desktop older than the focused desktop in the history\&.
244 Selects the desktop newer than the focused desktop in the history\&.
249 .nr an-no-space-flag 1
258 Only consider occupied or free desktops\&.
263 Only consider urgent or non urgent desktops\&.
268 Only consider inside or outside of the current monitor\&.
279 MONITOR_SEL := (<monitor_name>|^<n>|DIR|CYCLE_DIR|last|primary|focused|older|newer)[\&.[!]occupied]
286 .nr an-no-space-flag 1
290 \fBPrimary Selectors\fR
295 Selects the monitor with the given name\&.
300 Selects the nth monitor\&.
305 Selects the monitor in the given (spacial) direction relative to the active monitor\&.
310 Selects the monitor in the given (cyclic) direction relative to the active monitor\&.
315 Selects the primary monitor\&.
320 Selects the previously focused monitor\&.
325 Selects the currently focused monitor\&.
330 Selects the monitor older than the focused monitor in the history\&.
335 Selects the monitor newer than the focused monitor in the history\&.
340 .nr an-no-space-flag 1
349 Only consider monitors where the focused desktop is occupied or free\&.
356 Its size and position are determined by the splitting type and ratio of each node of its path in the window tree\&.
361 Has an unrestricted size while being centered in its tiling space\&.
366 Can be moved/resized freely\&. Although it doesn\(cqt occupy any tiling space, it is still part of the window tree\&.
371 Fills its monitor rectangle and has no borders\&. It is send in the ABOVE layer by default\&.
378 \fBwindow \-\-close\fR
384 Stays in the focused desktop of its monitor\&.
389 Tries to keep the same tiling position/size\&.
394 Has its urgency hint set\&. This flag is set externally\&.
396 .SH "STACKING LAYERS"
398 There\(cqs three stacking layers: BELOW, NORMAL and ABOVE\&.
400 In each layer, the window are orderered as follow: tiled & pseudo\-tiled < fullscreen < floating\&.
405 .nr an-no-space-flag 1
412 window [\fIWINDOW_SEL\fR] \fIOPTIONS\fR
416 .nr an-no-space-flag 1
423 \fB\-f\fR, \fB\-\-focus\fR [\fIWINDOW_SEL\fR]
425 Focus the selected or given window\&.
428 \fB\-a\fR, \fB\-\-activate\fR [\fIWINDOW_SEL\fR]
430 Activate the selected or given window\&.
433 \fB\-d\fR, \fB\-\-to\-desktop\fR \fIDESKTOP_SEL\fR
435 Send the selected window to the given desktop\&.
438 \fB\-m\fR, \fB\-\-to\-monitor\fR \fIMONITOR_SEL\fR
440 Send the selected window to the given monitor\&.
443 \fB\-w\fR, \fB\-\-to\-window\fR \fIWINDOW_SEL\fR
445 Transplant the selected window to the given window\&.
448 \fB\-s\fR, \fB\-\-swap\fR \fIWINDOW_SEL\fR
450 Swap the selected window with the given window\&.
453 \fB\-p\fR, \fB\-\-presel\fR \fIDIR\fR|cancel
455 Preselect the splitting area of the selected window (or cancel the preselection)\&.
458 \fB\-r\fR, \fB\-\-ratio\fR \fIRATIO\fR
460 Set the splitting ratio of the selected window (0 <
465 \fB\-e\fR, \fB\-\-edge\fR \fIDIR\fR \fIRATIO\fR|\(+-\fIPIXELS\fR
467 Set or change the splitting ratio of the edge located in the given direction in relation to the selected window\&.
470 \fB\-R\fR, \fB\-\-rotate\fR \fIDIR\fR \fI90|270|180\fR
472 Rotate the tree holding the edge located in the given direction in relation to the selected window\&.
475 \fB\-t\fR, \fB\-\-state\fR tiled|pseudo_tiled|floating|fullscreen
477 Set the state of the selected window\&.
480 \fB\-g\fR, \fB\-\-flag\fR locked|sticky|private[=on|off]
482 Set or toggle the given flag for the selected window\&.
485 \fB\-l\fR, \fB\-\-layer\fR below|normal|above
487 Set the stacking layer of the selected window\&.
490 \fB\-c\fR, \fB\-\-close\fR
492 Close the selected window\&.
495 \fB\-k\fR, \fB\-\-kill\fR
497 Kill the selected window\&.
503 .nr an-no-space-flag 1
510 desktop [\fIDESKTOP_SEL\fR] \fIOPTIONS\fR
514 .nr an-no-space-flag 1
521 \fB\-f\fR, \fB\-\-focus\fR [\fIDESKTOP_SEL\fR]
523 Focus the selected or given desktop\&.
526 \fB\-m\fR, \fB\-\-to\-monitor\fR \fIMONITOR_SEL\fR
528 Send the selected desktop to the given monitor\&.
531 \fB\-l\fR, \fB\-\-layout\fR \fICYCLE_DIR\fR|monocle|tiled
533 Set or cycle the layout of the selected desktop\&.
536 \fB\-n\fR, \fB\-\-rename\fR <new_name>
538 Rename the selected desktop\&.
541 \fB\-s\fR, \fB\-\-swap\fR \fIDESKTOP_SEL\fR
543 Swap the selected desktop with the given desktop\&.
546 \fB\-b\fR, \fB\-\-bubble\fR \fICYCLE_DIR\fR
548 Bubble the selected desktop in the given direction\&.
551 \fB\-r\fR, \fB\-\-remove\fR
553 Remove the selected desktop\&.
556 \fB\-c\fR, \fB\-\-cancel\-presel\fR
558 Cancel the preselection of all the windows of the selected desktop\&.
561 \fB\-F\fR, \fB\-\-flip\fR \fIhorizontal|vertical\fR
563 Flip the tree of the selected desktop\&.
566 \fB\-R\fR, \fB\-\-rotate\fR \fI90|270|180\fR
568 Rotate the tree of the selected desktop\&.
571 \fB\-E\fR, \fB\-\-equalize\fR
573 Reset the split ratios of the tree of the selected desktop\&.
576 \fB\-B\fR, \fB\-\-balance\fR
578 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area\&.
581 \fB\-C\fR, \fB\-\-circulate\fR forward|backward
583 Circulate the leaves of the tree of the selected desktop\&.
589 .nr an-no-space-flag 1
596 monitor [\fIMONITOR_SEL\fR] \fIOPTIONS\fR
600 .nr an-no-space-flag 1
607 \fB\-f\fR, \fB\-\-focus\fR [\fIMONITOR_SEL\fR]
609 Focus the selected or given monitor\&.
612 \fB\-a\fR, \fB\-\-add\-desktops\fR <name>\&...
614 Create desktops with the given names in the selected monitor\&.
617 \fB\-r\fR, \fB\-\-remove\-desktops\fR <name>\&...
619 Remove desktops with the given names\&.
622 \fB\-o\fR, \fB\-\-reorder\-desktops\fR <name>\&...
624 Reorder the desktops of the selected monitor to match the given order\&.
627 \fB\-d\fR, \fB\-\-reset\-desktops\fR <name>\&...
629 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\&.
632 \fB\-n\fR, \fB\-\-rename\fR <new_name>
634 Rename the selected monitor\&.
637 \fB\-s\fR, \fB\-\-swap\fR \fIMONITOR_SEL\fR
639 Swap the selected monitor with the given monitor\&.
645 .nr an-no-space-flag 1
656 .nr an-no-space-flag 1
663 \fB\-W\fR, \fB\-\-windows\fR
665 List the IDs of the matching windows\&.
668 \fB\-D\fR, \fB\-\-desktops\fR
670 List the names of the matching desktops\&.
673 \fB\-M\fR, \fB\-\-monitors\fR
675 List the names of the matching monitors\&.
678 \fB\-T\fR, \fB\-\-tree\fR
680 Print a JSON representation of the matching item\&.
683 \fB\-H\fR, \fB\-\-history\fR
685 Print the focus history as it relates to the query\&.
688 \fB\-S\fR, \fB\-\-stack\fR
690 Print the window stacking order\&.
693 [\fB\-m\fR,\fB\-\-monitor\fR [\fIMONITOR_SEL\fR]] | [\fB\-d\fR,\fB\-\-desktop\fR [\fIDESKTOP_SEL\fR]] | [\fB\-w\fR, \fB\-\-window\fR [\fIWINDOW_SEL\fR]]
695 Constrain matches to the selected monitor, desktop or window\&.
701 .nr an-no-space-flag 1
708 restore \fIOPTIONS\fR
712 .nr an-no-space-flag 1
719 \fB\-T\fR, \fB\-\-tree\fR <file_path>
721 Load the desktop trees from the given file\&.
724 \fB\-H\fR, \fB\-\-history\fR <file_path>
726 Load the focus history from the given file\&.
729 \fB\-S\fR, \fB\-\-stack\fR <file_path>
731 Load the window stacking order from the given file\&.
737 .nr an-no-space-flag 1
744 control \fIOPTIONS\fR
748 .nr an-no-space-flag 1
755 \fB\-\-adopt\-orphans\fR
757 Manage all the unmanaged windows remaining from a previous session\&.
760 \fB\-\-toggle\-visibility\fR
762 Toggle the visibility of all the windows\&.
765 \fB\-\-record\-history\fR on|off
767 Enable or disable the recording of window focus history\&.
770 \fB\-\-subscribe\fR (all|report|monitor|desktop|window|\&...)*
772 Continuously print status information\&. See the
774 section for the detailed description of each event\&.
777 \fB\-\-get\-status\fR
779 Print the current status information\&.
785 .nr an-no-space-flag 1
792 pointer \fIOPTIONS\fR
796 .nr an-no-space-flag 1
803 \fB\-g\fR, \fB\-\-grab\fR focus|move|resize_side|resize_corner
805 Initiate the given pointer action\&.
808 \fB\-t\fR, \fB\-\-track\fR <x> <y>
810 Pass the pointer root coordinates for the current pointer action\&.
813 \fB\-u\fR, \fB\-\-ungrab\fR
815 Terminate the current pointer action\&.
821 .nr an-no-space-flag 1
832 .nr an-no-space-flag 1
839 \fB\-a\fR, \fB\-\-add\fR <class_name>|<instance_name>|* [\fB\-o\fR|\fB\-\-one\-shot\fR] [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)]
844 \fB\-r\fR, \fB\-\-remove\fR ^<n>|head|tail|<class_name>|<instance_name>|*\&...
846 Remove the given rules\&.
849 \fB\-l\fR, \fB\-\-list\fR [<class_name>|<instance_name>|*]
857 .nr an-no-space-flag 1
864 config [\-m \fIMONITOR_SEL\fR|\-d \fIDESKTOP_SEL\fR|\-w \fIWINDOW_SEL\fR] <key> [<value>]
866 Get or set the value of <key>\&.
872 .nr an-no-space-flag 1
881 Quit with an optional exit status\&.
886 If the server can\(cqt handle a message, \fBbspc\fR will return with one of the following exit codes:
904 Colors are either \fI#RRGGBB\fR or X color names, booleans are \fItrue\fR, \fIon\fR, \fIfalse\fR or \fIoff\fR\&.
906 All the boolean settings are \fIfalse\fR by default unless stated otherwise\&.
907 .SS "Global Settings"
909 \fIfocused_border_color\fR
911 Color of the border of a focused window of a focused monitor\&.
914 \fIactive_border_color\fR
916 Color of the border of a focused window of an unfocused monitor\&.
919 \fInormal_border_color\fR
921 Color of the border of an unfocused window\&.
924 \fIpresel_border_color\fR
927 \fBwindow \-\-presel\fR
931 \fIfocused_locked_border_color\fR
933 Color of the border of a focused locked window of a focused monitor\&.
936 \fIactive_locked_border_color\fR
938 Color of the border of a focused locked window of an unfocused monitor\&.
941 \fInormal_locked_border_color\fR
943 Color of the border of an unfocused locked window\&.
946 \fIfocused_sticky_border_color\fR
948 Color of the border of a focused sticky window of a focused monitor\&.
951 \fIactive_sticky_border_color\fR
953 Color of the border of a focused sticky window of an unfocused monitor\&.
956 \fInormal_sticky_border_color\fR
958 Color of the border of an unfocused sticky window\&.
961 \fIfocused_private_border_color\fR
963 Color of the border of a focused private window of a focused monitor\&.
966 \fIactive_private_border_color\fR
968 Color of the border of a focused private window of an unfocused monitor\&.
971 \fInormal_private_border_color\fR
973 Color of the border of an unfocused private window\&.
976 \fIurgent_border_color\fR
978 Color of the border of an urgent window\&.
983 Default split ratio\&.
988 Prefix prepended to each of the status lines\&.
991 \fIexternal_rules_command\fR
993 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:
994 \fBkey1=value1 key2=value2 \&...\fR
995 (the valid key/value pairs are given in the description of the
1000 \fIinitial_polarity\fR
1002 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:
1004 \fBsecond_child\fR\&.
1007 \fIhistory_aware_focus\fR
1009 Give priority to the focus history when focusing nodes\&.
1012 \fIfocus_by_distance\fR
1014 Base focusing on distances between windows\&.
1017 \fIborderless_monocle\fR
1019 Remove borders of tiled windows for the
1024 \fIgapless_monocle\fR
1026 Remove gaps of tiled windows for the
1033 Set the desktop layout to
1035 if there\(cqs only one tiled window in the tree\&.
1038 \fIfocus_follows_pointer\fR
1040 Focus the window under the pointer\&.
1043 \fIpointer_follows_focus\fR
1045 When focusing a window, put the pointer at its center\&.
1048 \fIpointer_follows_monitor\fR
1050 When focusing a monitor, put the pointer at its center\&.
1053 \fIauto_alternate\fR
1055 Interpret consecutive identical
1068 Interpret consecutive identical
1071 \fB\-\-cancel\-presel\fR
1075 \fIignore_ewmh_focus\fR
1077 Ignore EWMH focus requests coming from applications\&.
1080 \fIcenter_pseudo_tiled\fR
1082 Center pseudo tiled windows into their tiling rectangles\&. Defaults to
1086 \fIremove_disabled_monitors\fR
1088 Consider disabled monitors as disconnected\&.
1091 \fIremove_unplugged_monitors\fR
1093 Remove unplugged monitors\&.
1096 \fImerge_overlapping_monitors\fR
1098 Merge overlapping monitors (the bigger remains)\&.
1100 .SS "Monitor and Desktop Settings"
1102 \fItop_padding\fR, \fIright_padding\fR, \fIbottom_padding\fR, \fIleft_padding\fR
1104 Padding space added at the sides of the monitor or desktop\&.
1106 .SS "Default, Desktop Default and Window Settings"
1110 Window border width\&.
1112 .SS "Default and Desktop Settings"
1116 Size of the gap that separates windows\&.
1122 See the next section for the description of the format\&.
1125 \fImonitor_add <monitor_name> <monitor_id> <monitor_geometry>\fR
1127 A monitor is added\&.
1130 \fImonitor_rename <old_name> <new_name>\fR
1132 A monitor is renamed\&.
1135 \fImonitor_remove <monitor_name>\fR
1137 A monitor is removed\&.
1140 \fImonitor_focus <monitor_name>\fR
1142 A monitor is focused\&.
1145 \fImonitor_geometry <monitor_name> <monitor_geometry>\fR
1147 The geometry of a monitor changed\&.
1150 \fIdesktop_add <monitor_name> <desktop_name>\fR
1152 A desktop is added\&.
1155 \fIdesktop_rename <monitor_name> <old_name> <new_name>\fR
1157 A desktop is renamed\&.
1160 \fIdesktop_remove <monitor_name> <desktop_name>\fR
1162 A desktop is removed\&.
1165 \fIdesktop_swap <src_monitor_name> <src_desktop_name> <dst_monitor_name> <dst_desktop_name>\fR
1167 A desktop is swapped\&.
1170 \fIdesktop_transfer <src_monitor_name> <src_desktop_name> <dst_monitor_name>\fR
1172 A desktop is transferred\&.
1175 \fIdesktop_focus <monitor_name> <desktop_name>\fR
1177 A desktop is focused\&.
1180 \fIdesktop_layout <monitor_name> <desktop_name> tiled|monocle\fR
1182 The layout of a desktop changed\&.
1185 \fIwindow_manage <monitor_name> <desktop_name> <window_id> <ip_id>\fR
1187 A window is managed\&.
1190 \fIwindow_unmanage <monitor_name> <desktop_name> <window_id>\fR
1192 A window is unmanaged\&.
1195 \fIwindow_swap <src_monitor_name> <src_desktop_name> <src_window_id> <dst_monitor_name> <dst_desktop_name> <dst_window_id>\fR
1197 A window is swapped\&.
1200 \fIwindow_transfer <src_monitor_name> <src_desktop_name> <src_window_id> <dst_monitor_name> <dst_desktop_name> <dst_window_id>\fR
1202 A window is transferred\&.
1205 \fIwindow_focus <monitor_name> <desktop_name> <window_id>\fR
1207 A window is focused\&.
1210 \fIwindow_activate <monitor_name> <desktop_name> <window_id>\fR
1212 A window is activated\&.
1215 \fIwindow_geometry <monitor_name> <desktop_name> <window_id> <window_geometry>\fR
1217 The geometry of a window changed\&.
1220 \fIwindow_state <monitor_name> <desktop_name> <window_id> tiled|pseudo_tiled|floating|fullscreen on|off\fR
1222 The state of a window changed\&.
1225 \fIwindow_flag <monitor_name> <desktop_name> <window_id> sticky|private|locked|urgent on|off\fR
1227 One of the flags of a window changed\&.
1230 \fIwindow_layer <monitor_name> <desktop_name> <window_id> below|normal|above\fR
1232 The layer of a window changed\&.
1235 Please note that \fBbspwm\fR initializes monitors before it reads messages on its socket, therefore the initial monitor events can\(cqt be received\&.
1238 Each report event message is composed of items separated by colons\&.
1240 Each item has the form \fI<type><value>\fR where \fI<type>\fR is the first character of the item\&.
1242 \fIM<monitor_name>\fR
1247 \fIm<monitor_name>\fR
1249 Unfocused monitor\&.
1252 \fIO<desktop_name>\fR
1254 Occupied focused desktop\&.
1257 \fIo<desktop_name>\fR
1259 Occupied unfocused desktop\&.
1262 \fIF<desktop_name>\fR
1264 Free focused desktop\&.
1267 \fIf<desktop_name>\fR
1269 Free unfocused desktop\&.
1272 \fIU<desktop_name>\fR
1274 Urgent focused desktop\&.
1277 \fIu<desktop_name>\fR
1279 Urgent unfocused desktop\&.
1284 Layout of the focused desktop of a monitor\&.
1286 .SH "ENVIRONMENT VARIABLES"
1290 The path of the socket used for the communication between
1293 \fBbspwm\fR\&. If it isn\(cqt defined, then the following path is used:
1294 \fI/tmp/bspwm<host_name>_<display_number>_<screen_number>\-socket\fR\&.
1300 \h'-04'\(bu\h'+03'\c
1306 Steven Allen <steven at stebalien\&.com>
1311 \h'-04'\(bu\h'+03'\c
1317 Thomas Adam <thomas at xteddy\&.org>
1322 \h'-04'\(bu\h'+03'\c
1328 Ivan Kanakarakis <ivan\&.kanak at gmail\&.com>
1332 Bastien Dejean <nihilhill at gmail\&.com>