3 .\" Author: [see the "Author" section]
4 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
6 .\" Manual: Bspwm Manual
7 .\" Source: Bspwm 0.9-104-ge434521
10 .TH "BSPWM" "1" "12/22/2015" "Bspwm 0\&.9\-104\-ge434521" "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 \fIDOMAIN\fR [\fISELECTOR\fR] \fICOMMANDS\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 := north | west | south | east
65 CYCLE_DIR := next | prev
72 Selectors are used to select a target node, desktop, or monitor\&. A selector can either describe the target relatively or name it globally\&.
74 Selectors consist of a descriptor and any number of non\-conflicting modifiers as follows:
80 DESCRIPTOR(\&.MODIFIER)*
86 An exclamation mark can be prepended to certain modifiers in order to reverse their meaning\&.
95 NODE_SEL := (<node_id>|PATH|DIR|CYCLE_DIR|last|older|newer|biggest|focused)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]leaf][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class]
97 STATE := tiled|pseudo_tiled|floating|fullscreen
99 FLAG := urgent|sticky|private|locked
101 LAYER := below|normal|above
103 PATH := @[DESK_SEL:][[/]JUMP](/JUMP)*
105 JUMP := first|1|second|2|brother|parent|DIR
112 .nr an-no-space-flag 1
121 Selects the node with the given ID\&.
126 Selects the node at the given path\&.
131 Selects the window in the given (spacial) direction relative to the active node\&.
136 Selects the window in the given (cyclic) direction\&.
141 Selects the biggest window on the current desktop\&.
146 Selects the previously focused node\&.
151 Selects the currently focused node\&.
156 Selects the node older than the focused node in the history\&.
161 Selects the node newer than the focused node in the history\&.
166 .nr an-no-space-flag 1
173 The initial node is the focused node (or the root if the path starts with \fI/\fR) of the focused desktop (or the selected desktop if the path has a \fIDESK_SEL\fR prefix)\&.
177 Jumps to the first child\&.
182 Jumps to the second child\&.
187 Jumps to the brother node\&.
192 Jumps to the parent node\&.
197 Jumps to the node holding the edge in the given direction\&.
202 .nr an-no-space-flag 1
211 Only consider focused or unfocused nodes\&.
216 Only consider nodes in automatic or manual insertion mode\&.
221 Only consider nodes in or not in the current desktop\&.
226 Only consider leaves or internal nodes\&.
229 [!](tiled|pseudo_tiled|floating|fullscreen)
231 Only consider windows in or not in the given state\&.
236 Only consider windows that have or don\(cqt have the same class as the current window\&.
239 [!](private|urgent|sticky|locked)
241 Only consider windows that have or don\(cqt have the given flag set\&.
244 [!](below|normal|above)
246 Only consider windows in or not in the given layer\&.
257 DESKTOP_SEL := (<desktop_name>|[MONITOR_SEL:](focused|^<n>)CYCLE_DIR|last|older|newer)[\&.[!]occupied][\&.[!]focused][\&.[!]urgent][\&.[!]local]
264 .nr an-no-space-flag 1
273 Selects the desktop with the given name\&.
278 Selects the nth desktop\&.
283 Selects the desktop in the given direction relative to the active desktop\&.
288 Selects the previously focused desktop\&.
293 Selects the currently focused desktop\&.
298 Selects the desktop older than the focused desktop in the history\&.
303 Selects the desktop newer than the focused desktop in the history\&.
308 .nr an-no-space-flag 1
317 Only consider occupied or free desktops\&.
322 Only consider focused or unfocused desktops\&.
327 Only consider urgent or non urgent desktops\&.
332 Only consider inside or outside of the current monitor\&.
343 MONITOR_SEL := (<monitor_name>|^<n>|DIR|CYCLE_DIR|last|primary|focused|older|newer)[\&.[!]occupied][\&.[!]focused]
350 .nr an-no-space-flag 1
359 Selects the monitor with the given name\&.
364 Selects the nth monitor\&.
369 Selects the monitor in the given (spacial) direction relative to the active monitor\&.
374 Selects the monitor in the given (cyclic) direction relative to the active monitor\&.
379 Selects the primary monitor\&.
384 Selects the previously focused monitor\&.
389 Selects the currently focused monitor\&.
394 Selects the monitor older than the focused monitor in the history\&.
399 Selects the monitor newer than the focused monitor in the history\&.
404 .nr an-no-space-flag 1
413 Only consider monitors where the focused desktop is occupied or free\&.
418 Only consider focused or unfocused monitors\&.
425 Its size and position are determined by the splitting type and ratio of each node of its path in the window tree\&.
430 Has an unrestricted size while being centered in its tiling space\&.
435 Can be moved/resized freely\&. Although it doesn\(cqt occupy any tiling space, it is still part of the window tree\&.
440 Fills its monitor rectangle and has no borders\&. It is send in the ABOVE layer by default\&.
453 Stays in the focused desktop of its monitor\&.
458 Tries to keep the same tiling position/size\&.
463 Has its urgency hint set\&. This flag is set externally\&.
465 .SH "STACKING LAYERS"
467 There\(cqs three stacking layers: BELOW, NORMAL and ABOVE\&.
469 In each layer, the window are orderered as follow: tiled & pseudo\-tiled < fullscreen < floating\&.
474 .nr an-no-space-flag 1
481 node [\fINODE_SEL\fR] \fICOMMANDS\fR
485 .nr an-no-space-flag 1
492 \fB\-f\fR, \fB\-\-focus\fR [\fINODE_SEL\fR]
494 Focus the selected or given node\&.
497 \fB\-a\fR, \fB\-\-activate\fR [\fINODE_SEL\fR]
499 Activate the selected or given node\&.
502 \fB\-d\fR, \fB\-\-to\-desktop\fR \fIDESKTOP_SEL\fR
504 Send the selected node to the given desktop\&.
507 \fB\-m\fR, \fB\-\-to\-monitor\fR \fIMONITOR_SEL\fR
509 Send the selected node to the given monitor\&.
512 \fB\-n\fR, \fB\-\-to\-node\fR \fINODE_SEL\fR
514 Transplant the selected node to the given node\&.
517 \fB\-s\fR, \fB\-\-swap\fR \fINODE_SEL\fR
519 Swap the selected node with the given node\&.
522 \fB\-p\fR, \fB\-\-presel\-dir\fR \fIDIR\fR|cancel
524 Preselect the splitting area of the selected node (or cancel the preselection)\&.
527 \fB\-o\fR, \fB\-\-presel\-ratio\fR \fIRATIO\fR
529 Set the splitting ratio of the preselection area\&.
532 \fB\-r\fR, \fB\-\-ratio\fR \fIRATIO\fR|\(+-\fIPIXELS\fR
534 Set the splitting ratio of the selected node (0 <
539 \fB\-R\fR, \fB\-\-rotate\fR \fI90|270|180\fR
541 Rotate the tree rooted at the selected node\&.
544 \fB\-F\fR, \fB\-\-flip\fR \fIhorizontal|vertical\fR
546 Flip the the tree rooted at selected node\&.
549 \fB\-E\fR, \fB\-\-equalize\fR
551 Reset the split ratios of the tree rooted at the selected node to their default value\&.
554 \fB\-B\fR, \fB\-\-balance\fR
556 Adjust the split ratios of the tree rooted at the selected node so that all windows occupy the same area\&.
559 \fB\-C\fR, \fB\-\-circulate\fR forward|backward
561 Circulate the windows of the tree rooted at the selected node\&.
564 \fB\-t\fR, \fB\-\-state\fR [~](tiled|pseudo_tiled|floating|fullscreen)
566 Set the state of the selected window\&.
569 \fB\-g\fR, \fB\-\-flag\fR locked|sticky|private[=on|off]
571 Set or toggle the given flag for the selected node\&.
574 \fB\-l\fR, \fB\-\-layer\fR below|normal|above
576 Set the stacking layer of the selected window\&.
579 \fB\-c\fR, \fB\-\-close\fR
581 Close the windows rooted at the selected node\&.
584 \fB\-k\fR, \fB\-\-kill\fR
586 Kill the windows rooted at the selected node\&.
592 .nr an-no-space-flag 1
599 desktop [\fIDESKTOP_SEL\fR] \fICOMMANDS\fR
603 .nr an-no-space-flag 1
610 \fB\-f\fR, \fB\-\-focus\fR [\fIDESKTOP_SEL\fR]
612 Focus the selected or given desktop\&.
615 \fB\-a\fR, \fB\-\-activate\fR [\fIDESKTOP_SEL\fR]
617 Activate the selected or given desktop\&.
620 \fB\-m\fR, \fB\-\-to\-monitor\fR \fIMONITOR_SEL\fR
622 Send the selected desktop to the given monitor\&.
625 \fB\-l\fR, \fB\-\-layout\fR \fICYCLE_DIR\fR|monocle|tiled
627 Set or cycle the layout of the selected desktop\&.
630 \fB\-n\fR, \fB\-\-rename\fR <new_name>
632 Rename the selected desktop\&.
635 \fB\-s\fR, \fB\-\-swap\fR \fIDESKTOP_SEL\fR
637 Swap the selected desktop with the given desktop\&.
640 \fB\-b\fR, \fB\-\-bubble\fR \fICYCLE_DIR\fR
642 Bubble the selected desktop in the given direction\&.
645 \fB\-r\fR, \fB\-\-remove\fR
647 Remove the selected desktop\&.
653 .nr an-no-space-flag 1
660 monitor [\fIMONITOR_SEL\fR] \fICOMMANDS\fR
664 .nr an-no-space-flag 1
671 \fB\-f\fR, \fB\-\-focus\fR [\fIMONITOR_SEL\fR]
673 Focus the selected or given monitor\&.
676 \fB\-a\fR, \fB\-\-add\-desktops\fR <name>\&...
678 Create desktops with the given names in the selected monitor\&.
681 \fB\-r\fR, \fB\-\-remove\-desktops\fR <name>\&...
683 Remove desktops with the given names\&.
686 \fB\-o\fR, \fB\-\-reorder\-desktops\fR <name>\&...
688 Reorder the desktops of the selected monitor to match the given order\&.
691 \fB\-d\fR, \fB\-\-reset\-desktops\fR <name>\&...
693 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\&.
696 \fB\-n\fR, \fB\-\-rename\fR <new_name>
698 Rename the selected monitor\&.
701 \fB\-s\fR, \fB\-\-swap\fR \fIMONITOR_SEL\fR
703 Swap the selected monitor with the given monitor\&.
709 .nr an-no-space-flag 1
716 query \fICOMMANDS\fR [\fIOPTIONS\fR]
720 .nr an-no-space-flag 1
727 \fB\-N\fR, \fB\-\-nodes\fR
729 List the IDs of the matching nodes\&.
732 \fB\-D\fR, \fB\-\-desktops\fR
734 List the names of the matching desktops\&.
737 \fB\-M\fR, \fB\-\-monitors\fR
739 List the names of the matching monitors\&.
742 \fB\-T\fR, \fB\-\-tree\fR
744 Print a JSON representation of the matching item\&.
749 .nr an-no-space-flag 1
756 [\fB\-m\fR,\fB\-\-monitor\fR [\fIMONITOR_SEL\fR]] | [\fB\-d\fR,\fB\-\-desktop\fR [\fIDESKTOP_SEL\fR]] | [\fB\-n\fR, \fB\-\-node\fR [\fINODE_SEL\fR]]
758 Constrain matches to the selected monitor, desktop or node\&. The descriptor can be omitted for
768 .nr an-no-space-flag 1
779 .nr an-no-space-flag 1
786 \fB\-d\fR, \fB\-\-dump\-state\fR
788 Dump the current world state on standard output\&.
791 \fB\-l\fR, \fB\-\-load\-state\fR <file_path>
793 Load a world state from the given file\&.
796 \fB\-a\fR, \fB\-\-add\-monitor\fR <name> WxH+X+Y
798 Add a monitor for the given name and rectangle\&.
801 \fB\-r\fR, \fB\-\-remove\-monitor\fR <name>
803 Remove the monitor with the given name\&.
806 \fB\-o\fR, \fB\-\-adopt\-orphans\fR
808 Manage all the unmanaged windows remaining from a previous session\&.
811 \fB\-h\fR, \fB\-\-record\-history\fR on|off
813 Enable or disable the recording of node focus history\&.
816 \fB\-g\fR, \fB\-\-get\-status\fR
818 Print the current status information\&.
824 .nr an-no-space-flag 1
831 pointer \fICOMMANDS\fR
835 .nr an-no-space-flag 1
842 \fB\-g\fR, \fB\-\-grab\fR focus|move|resize_side|resize_corner
844 Initiate the given pointer action\&.
847 \fB\-t\fR, \fB\-\-track\fR <x> <y>
849 Pass the pointer root coordinates for the current pointer action\&.
852 \fB\-u\fR, \fB\-\-ungrab\fR
854 Terminate the current pointer action\&.
860 .nr an-no-space-flag 1
871 .nr an-no-space-flag 1
878 \fB\-a\fR, \fB\-\-add\fR (<class_name>|\fB)[:(<instance_name>|\fR)] [\fB\-o\fR|\fB\-\-one\-shot\fR] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|node=NODE_SEL] [state=STATE] [layer=LAYER] [split_dir=DIR] [split_ratio=RATIO] [(locked|sticky|private|center|follow|manage|focus|border)=(on|off)]
883 \fB\-r\fR, \fB\-\-remove\fR ^<n>|head|tail|(<class_name>|\fB)[:(<instance_name>|\fR)]\&...
885 Remove the given rules\&.
888 \fB\-l\fR, \fB\-\-list\fR
896 .nr an-no-space-flag 1
903 config [\-m \fIMONITOR_SEL\fR|\-d \fIDESKTOP_SEL\fR|\-n \fINODE_SEL\fR] <key> [<value>]
905 Get or set the value of <key>\&.
911 .nr an-no-space-flag 1
918 subscribe (all|report|monitor|desktop|window|\&...)*
920 Continuously print status information\&. See the
922 section for the detailed description of each event\&.
928 .nr an-no-space-flag 1
937 Quit with an optional exit status\&.
942 If the server can\(cqt handle a message, \fBbspc\fR will return with one of the following exit codes:
960 Colors are in the form \fI#RRGGBB\fR, booleans are \fItrue\fR, \fIon\fR, \fIfalse\fR or \fIoff\fR\&.
962 All the boolean settings are \fIfalse\fR by default unless stated otherwise\&.
963 .SS "Global Settings"
965 \fInormal_border_color\fR
967 Color of the border of an unfocused window\&.
970 \fIactive_border_color\fR
972 Color of the border of a focused window of an unfocused monitor\&.
975 \fIfocused_border_color\fR
977 Color of the border of a focused window of a focused monitor\&.
980 \fIpresel_feedback_color\fR
983 \fBnode \-\-presel\-{dir,ratio}\fR
984 message feedback area\&.
989 Default split ratio\&.
994 Prefix prepended to each of the status lines\&.
997 \fIexternal_rules_command\fR
999 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:
1000 \fBkey1=value1 key2=value2 \&...\fR
1001 (the valid key/value pairs are given in the description of the
1006 \fIinitial_polarity\fR
1008 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:
1010 \fBsecond_child\fR\&.
1013 \fIhistory_aware_focus\fR
1015 Give priority to the focus history when focusing nodes\&.
1018 \fIfocus_by_distance\fR
1020 Base focusing on distances between windows\&.
1023 \fIborderless_monocle\fR
1025 Remove borders of tiled windows for the
1030 \fIgapless_monocle\fR
1032 Remove gaps of tiled windows for the
1037 \fIsingle_monocle\fR
1039 Set the desktop layout to
1041 if there\(cqs only one tiled window in the tree\&.
1044 \fIfocus_follows_pointer\fR
1046 Focus the window under the pointer\&.
1049 \fIpointer_follows_focus\fR
1051 When focusing a window, put the pointer at its center\&.
1054 \fIpointer_follows_monitor\fR
1056 When focusing a monitor, put the pointer at its center\&.
1059 \fIignore_ewmh_focus\fR
1061 Ignore EWMH focus requests coming from applications\&.
1064 \fIcenter_pseudo_tiled\fR
1066 Center pseudo tiled windows into their tiling rectangles\&. Defaults to
1070 \fIremove_disabled_monitors\fR
1072 Consider disabled monitors as disconnected\&.
1075 \fIremove_unplugged_monitors\fR
1077 Remove unplugged monitors\&.
1080 \fImerge_overlapping_monitors\fR
1082 Merge overlapping monitors (the bigger remains)\&.
1084 .SS "Monitor and Desktop Settings"
1086 \fItop_padding\fR, \fIright_padding\fR, \fIbottom_padding\fR, \fIleft_padding\fR
1088 Padding space added at the sides of the monitor or desktop\&.
1090 .SS "Default, Desktop Default and Window Settings"
1094 Window border width\&.
1096 .SS "Default and Desktop Settings"
1100 Size of the gap that separates windows\&.
1106 See the next section for the description of the format\&.
1109 \fImonitor_add <monitor_name> <monitor_id> <monitor_geometry>\fR
1111 A monitor is added\&.
1114 \fImonitor_rename <old_name> <new_name>\fR
1116 A monitor is renamed\&.
1119 \fImonitor_remove <monitor_name>\fR
1121 A monitor is removed\&.
1124 \fImonitor_focus <monitor_name>\fR
1126 A monitor is focused\&.
1129 \fImonitor_geometry <monitor_name> <monitor_geometry>\fR
1131 The geometry of a monitor changed\&.
1134 \fIdesktop_add <monitor_name> <desktop_name>\fR
1136 A desktop is added\&.
1139 \fIdesktop_rename <monitor_name> <old_name> <new_name>\fR
1141 A desktop is renamed\&.
1144 \fIdesktop_remove <monitor_name> <desktop_name>\fR
1146 A desktop is removed\&.
1149 \fIdesktop_swap <src_monitor_name> <src_desktop_name> <dst_monitor_name> <dst_desktop_name>\fR
1151 A desktop is swapped\&.
1154 \fIdesktop_transfer <src_monitor_name> <src_desktop_name> <dst_monitor_name>\fR
1156 A desktop is transferred\&.
1159 \fIdesktop_focus <monitor_name> <desktop_name>\fR
1161 A desktop is focused\&.
1164 \fIdesktop_activate <monitor_name> <desktop_name>\fR
1166 A desktop is activated\&.
1169 \fIdesktop_layout <monitor_name> <desktop_name> tiled|monocle\fR
1171 The layout of a desktop changed\&.
1174 \fInode_manage <monitor_name> <desktop_name> <node_id> <ip_id>\fR
1176 A window is managed\&.
1179 \fInode_unmanage <monitor_name> <desktop_name> <node_id>\fR
1181 A window is unmanaged\&.
1184 \fInode_swap <src_monitor_name> <src_desktop_name> <src_node_id> <dst_monitor_name> <dst_desktop_name> <dst_node_id>\fR
1186 A node is swapped\&.
1189 \fInode_transfer <src_monitor_name> <src_desktop_name> <src_node_id> <dst_monitor_name> <dst_desktop_name> <dst_node_id>\fR
1191 A node is transferred\&.
1194 \fInode_focus <monitor_name> <desktop_name> <node_id>\fR
1196 A node is focused\&.
1199 \fInode_activate <monitor_name> <desktop_name> <node_id>\fR
1201 A node is activated\&.
1204 \fInode_presel <monitor_name> <desktop_name> <node_id> (dir DIR|ratio RATIO|cancel)\fR
1206 A node is preselected\&.
1209 \fInode_stack <node_id_1> below|above <node_id_2>\fR
1211 A node is stacked below or above another node\&.
1214 \fInode_geometry <monitor_name> <desktop_name> <node_id> <node_geometry>\fR
1216 The geometry of a window changed\&.
1219 \fInode_state <monitor_name> <desktop_name> <node_id> tiled|pseudo_tiled|floating|fullscreen on|off\fR
1221 The state of a window changed\&.
1224 \fInode_flag <monitor_name> <desktop_name> <node_id> sticky|private|locked|urgent on|off\fR
1226 One of the flags of a node changed\&.
1229 \fInode_layer <monitor_name> <desktop_name> <node_id> below|normal|above\fR
1231 The layer of a window changed\&.
1234 Please note that \fBbspwm\fR initializes monitors before it reads messages on its socket, therefore the initial monitor events can\(cqt be received\&.
1237 Each report event message is composed of items separated by colons\&.
1239 Each item has the form \fI<type><value>\fR where \fI<type>\fR is the first character of the item\&.
1241 \fIM<monitor_name>\fR
1246 \fIm<monitor_name>\fR
1248 Unfocused monitor\&.
1251 \fIO<desktop_name>\fR
1253 Occupied focused desktop\&.
1256 \fIo<desktop_name>\fR
1258 Occupied unfocused desktop\&.
1261 \fIF<desktop_name>\fR
1263 Free focused desktop\&.
1266 \fIf<desktop_name>\fR
1268 Free unfocused desktop\&.
1271 \fIU<desktop_name>\fR
1273 Urgent focused desktop\&.
1276 \fIu<desktop_name>\fR
1278 Urgent unfocused desktop\&.
1283 Layout of the focused desktop of a monitor\&.
1288 State of the focused node of a focused desktop\&.
1293 Active flags of the focused node of a focused desktop\&.
1295 .SH "ENVIRONMENT VARIABLES"
1299 The path of the socket used for the communication between
1302 \fBbspwm\fR\&. If it isn\(cqt defined, then the following path is used:
1303 \fI/tmp/bspwm<host_name>_<display_number>_<screen_number>\-socket\fR\&.
1309 \h'-04'\(bu\h'+03'\c
1315 Steven Allen <steven at stebalien\&.com>
1320 \h'-04'\(bu\h'+03'\c
1326 Thomas Adam <thomas at xteddy\&.org>
1331 \h'-04'\(bu\h'+03'\c
1337 Ivan Kanakarakis <ivan\&.kanak at gmail\&.com>
1341 Bastien Dejean <nihilhill at gmail\&.com>