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-125-g74166b0
10 .TH "BSPWM" "1" "01/10/2016" "Bspwm 0\&.9\-125\-g74166b0" "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)\&. If
528 and the current preselection direction matches
529 \fIDIR\fR, then the argument is interpreted as
533 \fB\-o\fR, \fB\-\-presel\-ratio\fR \fIRATIO\fR
535 Set the splitting ratio of the preselection area\&.
538 \fB\-r\fR, \fB\-\-ratio\fR \fIRATIO\fR|(+|\-)\fIPIXELS\fR
540 Set the splitting ratio of the selected node (0 <
545 \fB\-R\fR, \fB\-\-rotate\fR \fI90|270|180\fR
547 Rotate the tree rooted at the selected node\&.
550 \fB\-F\fR, \fB\-\-flip\fR \fIhorizontal|vertical\fR
552 Flip the the tree rooted at selected node\&.
555 \fB\-E\fR, \fB\-\-equalize\fR
557 Reset the split ratios of the tree rooted at the selected node to their default value\&.
560 \fB\-B\fR, \fB\-\-balance\fR
562 Adjust the split ratios of the tree rooted at the selected node so that all windows occupy the same area\&.
565 \fB\-C\fR, \fB\-\-circulate\fR forward|backward
567 Circulate the windows of the tree rooted at the selected node\&.
570 \fB\-t\fR, \fB\-\-state\fR [~](tiled|pseudo_tiled|floating|fullscreen)
572 Set the state of the selected window\&. If
574 is present and the current state matches the given state, then the argument is interpreted as the last state\&.
577 \fB\-g\fR, \fB\-\-flag\fR locked|sticky|private[=on|off]
579 Set or toggle the given flag for the selected node\&.
582 \fB\-l\fR, \fB\-\-layer\fR below|normal|above
584 Set the stacking layer of the selected window\&.
587 \fB\-c\fR, \fB\-\-close\fR
589 Close the windows rooted at the selected node\&.
592 \fB\-k\fR, \fB\-\-kill\fR
594 Kill the windows rooted at the selected node\&.
600 .nr an-no-space-flag 1
607 desktop [\fIDESKTOP_SEL\fR] \fICOMMANDS\fR
611 .nr an-no-space-flag 1
618 \fB\-f\fR, \fB\-\-focus\fR [\fIDESKTOP_SEL\fR]
620 Focus the selected or given desktop\&.
623 \fB\-a\fR, \fB\-\-activate\fR [\fIDESKTOP_SEL\fR]
625 Activate the selected or given desktop\&.
628 \fB\-m\fR, \fB\-\-to\-monitor\fR \fIMONITOR_SEL\fR
630 Send the selected desktop to the given monitor\&.
633 \fB\-l\fR, \fB\-\-layout\fR \fICYCLE_DIR\fR|monocle|tiled
635 Set or cycle the layout of the selected desktop\&.
638 \fB\-n\fR, \fB\-\-rename\fR <new_name>
640 Rename the selected desktop\&.
643 \fB\-s\fR, \fB\-\-swap\fR \fIDESKTOP_SEL\fR
645 Swap the selected desktop with the given desktop\&.
648 \fB\-b\fR, \fB\-\-bubble\fR \fICYCLE_DIR\fR
650 Bubble the selected desktop in the given direction\&.
653 \fB\-r\fR, \fB\-\-remove\fR
655 Remove the selected desktop\&.
661 .nr an-no-space-flag 1
668 monitor [\fIMONITOR_SEL\fR] \fICOMMANDS\fR
672 .nr an-no-space-flag 1
679 \fB\-f\fR, \fB\-\-focus\fR [\fIMONITOR_SEL\fR]
681 Focus the selected or given monitor\&.
684 \fB\-a\fR, \fB\-\-add\-desktops\fR <name>\&...
686 Create desktops with the given names in the selected monitor\&.
689 \fB\-r\fR, \fB\-\-remove\-desktops\fR <name>\&...
691 Remove desktops with the given names\&.
694 \fB\-o\fR, \fB\-\-reorder\-desktops\fR <name>\&...
696 Reorder the desktops of the selected monitor to match the given order\&.
699 \fB\-d\fR, \fB\-\-reset\-desktops\fR <name>\&...
701 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\&.
704 \fB\-g\fR, \fB\-\-rectangle\fR WxH+X+Y
706 Set the rectangle of the selected monitor\&.
709 \fB\-n\fR, \fB\-\-rename\fR <new_name>
711 Rename the selected monitor\&.
714 \fB\-s\fR, \fB\-\-swap\fR \fIMONITOR_SEL\fR
716 Swap the selected monitor with the given monitor\&.
722 .nr an-no-space-flag 1
729 query \fICOMMANDS\fR [\fIOPTIONS\fR]
733 .nr an-no-space-flag 1
740 \fB\-N\fR, \fB\-\-nodes\fR
742 List the IDs of the matching nodes\&.
745 \fB\-D\fR, \fB\-\-desktops\fR
747 List the names of the matching desktops\&.
750 \fB\-M\fR, \fB\-\-monitors\fR
752 List the names of the matching monitors\&.
755 \fB\-T\fR, \fB\-\-tree\fR
757 Print a JSON representation of the matching item\&.
762 .nr an-no-space-flag 1
769 [\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]]
771 Constrain matches to the selected monitor, desktop or node\&. The descriptor can be omitted for
781 .nr an-no-space-flag 1
792 .nr an-no-space-flag 1
799 \fB\-d\fR, \fB\-\-dump\-state\fR
801 Dump the current world state on standard output\&.
804 \fB\-l\fR, \fB\-\-load\-state\fR <file_path>
806 Load a world state from the given file\&.
809 \fB\-a\fR, \fB\-\-add\-monitor\fR <name> WxH+X+Y
811 Add a monitor for the given name and rectangle\&.
814 \fB\-r\fR, \fB\-\-remove\-monitor\fR <name>
816 Remove the monitor with the given name\&.
819 \fB\-o\fR, \fB\-\-adopt\-orphans\fR
821 Manage all the unmanaged windows remaining from a previous session\&.
824 \fB\-h\fR, \fB\-\-record\-history\fR on|off
826 Enable or disable the recording of node focus history\&.
829 \fB\-g\fR, \fB\-\-get\-status\fR
831 Print the current status information\&.
837 .nr an-no-space-flag 1
844 pointer \fICOMMANDS\fR
848 .nr an-no-space-flag 1
855 \fB\-g\fR, \fB\-\-grab\fR focus|move|resize_side|resize_corner
857 Initiate the given pointer action\&.
860 \fB\-t\fR, \fB\-\-track\fR <x> <y>
862 Pass the pointer root coordinates for the current pointer action\&.
865 \fB\-u\fR, \fB\-\-ungrab\fR
867 Terminate the current pointer action\&.
873 .nr an-no-space-flag 1
884 .nr an-no-space-flag 1
891 \fB\-a\fR, \fB\-\-add\fR (<class_name>|*)[:(<instance_name>|*)] [\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)]
896 \fB\-r\fR, \fB\-\-remove\fR ^<n>|head|tail|(<class_name>|*)[:(<instance_name>|*)]\&...
898 Remove the given rules\&.
901 \fB\-l\fR, \fB\-\-list\fR
909 .nr an-no-space-flag 1
916 config [\-m \fIMONITOR_SEL\fR|\-d \fIDESKTOP_SEL\fR|\-n \fINODE_SEL\fR] <key> [<value>]
918 Get or set the value of <key>\&.
924 .nr an-no-space-flag 1
931 subscribe (all|report|monitor|desktop|node|\&...)*
933 Continuously print status information\&. See the
935 section for the detailed description of each event\&.
941 .nr an-no-space-flag 1
950 Quit with an optional exit status\&.
955 If the server can\(cqt handle a message, \fBbspc\fR will return with one of the following exit codes:
973 Colors are in the form \fI#RRGGBB\fR, booleans are \fItrue\fR, \fIon\fR, \fIfalse\fR or \fIoff\fR\&.
975 All the boolean settings are \fIfalse\fR by default unless stated otherwise\&.
976 .SS "Global Settings"
978 \fInormal_border_color\fR
980 Color of the border of an unfocused window\&.
983 \fIactive_border_color\fR
985 Color of the border of a focused window of an unfocused monitor\&.
988 \fIfocused_border_color\fR
990 Color of the border of a focused window of a focused monitor\&.
993 \fIpresel_feedback_color\fR
996 \fBnode \-\-presel\-{dir,ratio}\fR
997 message feedback area\&.
1002 Default split ratio\&.
1007 Prefix prepended to each of the status lines\&.
1010 \fIexternal_rules_command\fR
1012 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:
1013 \fBkey1=value1 key2=value2 \&...\fR
1014 (the valid key/value pairs are given in the description of the
1019 \fIinitial_polarity\fR
1021 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:
1023 \fBsecond_child\fR\&.
1026 \fIhistory_aware_focus\fR
1028 Give priority to the focus history when focusing nodes\&.
1031 \fIfocus_by_distance\fR
1033 Base focusing on distances between windows\&.
1036 \fIborderless_monocle\fR
1038 Remove borders of tiled windows for the
1043 \fIgapless_monocle\fR
1045 Remove gaps of tiled windows for the
1050 \fIpaddingless_monocle\fR
1052 Remove padding space for the
1057 \fIsingle_monocle\fR
1059 Set the desktop layout to
1061 if there\(cqs only one tiled window in the tree\&.
1064 \fIfocus_follows_pointer\fR
1066 Focus the window under the pointer\&.
1069 \fIpointer_follows_focus\fR
1071 When focusing a window, put the pointer at its center\&.
1074 \fIpointer_follows_monitor\fR
1076 When focusing a monitor, put the pointer at its center\&.
1079 \fIignore_ewmh_focus\fR
1081 Ignore EWMH focus requests coming from applications\&.
1084 \fIcenter_pseudo_tiled\fR
1086 Center pseudo tiled windows into their tiling rectangles\&. Defaults to
1090 \fIremove_disabled_monitors\fR
1092 Consider disabled monitors as disconnected\&.
1095 \fIremove_unplugged_monitors\fR
1097 Remove unplugged monitors\&.
1100 \fImerge_overlapping_monitors\fR
1102 Merge overlapping monitors (the bigger remains)\&.
1104 .SS "Monitor and Desktop Settings"
1106 \fItop_padding\fR, \fIright_padding\fR, \fIbottom_padding\fR, \fIleft_padding\fR
1108 Padding space added at the sides of the monitor or desktop\&.
1110 .SS "Default, Desktop Default and Window Settings"
1114 Window border width\&.
1116 .SS "Default and Desktop Settings"
1120 Size of the gap that separates windows\&.
1126 See the next section for the description of the format\&.
1129 \fImonitor_add <monitor_name> <monitor_id> <monitor_geometry>\fR
1131 A monitor is added\&.
1134 \fImonitor_rename <old_name> <new_name>\fR
1136 A monitor is renamed\&.
1139 \fImonitor_remove <monitor_name>\fR
1141 A monitor is removed\&.
1144 \fImonitor_focus <monitor_name>\fR
1146 A monitor is focused\&.
1149 \fImonitor_geometry <monitor_name> <monitor_geometry>\fR
1151 The geometry of a monitor changed\&.
1154 \fIdesktop_add <monitor_name> <desktop_name>\fR
1156 A desktop is added\&.
1159 \fIdesktop_rename <monitor_name> <old_name> <new_name>\fR
1161 A desktop is renamed\&.
1164 \fIdesktop_remove <monitor_name> <desktop_name>\fR
1166 A desktop is removed\&.
1169 \fIdesktop_swap <src_monitor_name> <src_desktop_name> <dst_monitor_name> <dst_desktop_name>\fR
1171 A desktop is swapped\&.
1174 \fIdesktop_transfer <src_monitor_name> <src_desktop_name> <dst_monitor_name>\fR
1176 A desktop is transferred\&.
1179 \fIdesktop_focus <monitor_name> <desktop_name>\fR
1181 A desktop is focused\&.
1184 \fIdesktop_activate <monitor_name> <desktop_name>\fR
1186 A desktop is activated\&.
1189 \fIdesktop_layout <monitor_name> <desktop_name> tiled|monocle\fR
1191 The layout of a desktop changed\&.
1194 \fInode_manage <monitor_name> <desktop_name> <node_id> <ip_id>\fR
1196 A window is managed\&.
1199 \fInode_unmanage <monitor_name> <desktop_name> <node_id>\fR
1201 A window is unmanaged\&.
1204 \fInode_swap <src_monitor_name> <src_desktop_name> <src_node_id> <dst_monitor_name> <dst_desktop_name> <dst_node_id>\fR
1206 A node is swapped\&.
1209 \fInode_transfer <src_monitor_name> <src_desktop_name> <src_node_id> <dst_monitor_name> <dst_desktop_name> <dst_node_id>\fR
1211 A node is transferred\&.
1214 \fInode_focus <monitor_name> <desktop_name> <node_id>\fR
1216 A node is focused\&.
1219 \fInode_activate <monitor_name> <desktop_name> <node_id>\fR
1221 A node is activated\&.
1224 \fInode_presel <monitor_name> <desktop_name> <node_id> (dir DIR|ratio RATIO|cancel)\fR
1226 A node is preselected\&.
1229 \fInode_stack <node_id_1> below|above <node_id_2>\fR
1231 A node is stacked below or above another node\&.
1234 \fInode_geometry <monitor_name> <desktop_name> <node_id> <node_geometry>\fR
1236 The geometry of a window changed\&.
1239 \fInode_state <monitor_name> <desktop_name> <node_id> tiled|pseudo_tiled|floating|fullscreen on|off\fR
1241 The state of a window changed\&.
1244 \fInode_flag <monitor_name> <desktop_name> <node_id> sticky|private|locked|urgent on|off\fR
1246 One of the flags of a node changed\&.
1249 \fInode_layer <monitor_name> <desktop_name> <node_id> below|normal|above\fR
1251 The layer of a window changed\&.
1254 Please note that \fBbspwm\fR initializes monitors before it reads messages on its socket, therefore the initial monitor events can\(cqt be received\&.
1257 Each report event message is composed of items separated by colons\&.
1259 Each item has the form \fI<type><value>\fR where \fI<type>\fR is the first character of the item\&.
1261 \fIM<monitor_name>\fR
1266 \fIm<monitor_name>\fR
1268 Unfocused monitor\&.
1271 \fIO<desktop_name>\fR
1273 Occupied focused desktop\&.
1276 \fIo<desktop_name>\fR
1278 Occupied unfocused desktop\&.
1281 \fIF<desktop_name>\fR
1283 Free focused desktop\&.
1286 \fIf<desktop_name>\fR
1288 Free unfocused desktop\&.
1291 \fIU<desktop_name>\fR
1293 Urgent focused desktop\&.
1296 \fIu<desktop_name>\fR
1298 Urgent unfocused desktop\&.
1303 Layout of the focused desktop of a monitor\&.
1308 State of the focused node of a focused desktop\&.
1313 Active flags of the focused node of a focused desktop\&.
1315 .SH "ENVIRONMENT VARIABLES"
1319 The path of the socket used for the communication between
1322 \fBbspwm\fR\&. If it isn\(cqt defined, then the following path is used:
1323 \fI/tmp/bspwm<host_name>_<display_number>_<screen_number>\-socket\fR\&.
1329 \h'-04'\(bu\h'+03'\c
1335 Steven Allen <steven at stebalien\&.com>
1340 \h'-04'\(bu\h'+03'\c
1346 Thomas Adam <thomas at xteddy\&.org>
1351 \h'-04'\(bu\h'+03'\c
1357 Ivan Kanakarakis <ivan\&.kanak at gmail\&.com>
1361 Bastien Dejean <nihilhill at gmail\&.com>