]> git.lizzy.rs Git - bspwm.git/blob - doc/bspwm.1
5946f76dcb7ff6f191c26992e04f4b9d8d212e6b
[bspwm.git] / doc / bspwm.1
1 '\" t
2 .\"     Title: bspwm
3 .\"    Author: [see the "Author" section]
4 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5 .\"      Date: 05/09/2016
6 .\"    Manual: Bspwm Manual
7 .\"    Source: Bspwm 0.9.1-56-gbbc3406
8 .\"  Language: English
9 .\"
10 .TH "BSPWM" "1" "05/09/2016" "Bspwm 0\&.9\&.1\-56\-gbbc3406" "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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 bspwm \- Binary space partitioning window manager
32 .SH "SYNOPSIS"
33 .sp
34 \fBbspwm\fR [\fB\-h\fR|\fB\-v\fR|\fB\-c\fR \fICONFIG_PATH\fR]
35 .sp
36 \fBbspc\fR \fIDOMAIN\fR [\fISELECTOR\fR] \fICOMMANDS\fR
37 .sp
38 \fBbspc\fR \fICOMMAND\fR [\fIOPTIONS\fR] [\fIARGUMENTS\fR]
39 .SH "DESCRIPTION"
40 .sp
41 \fBbspwm\fR is a tiling window manager that represents windows as the leaves of a full binary tree\&.
42 .sp
43 It is controlled and configured via \fBbspc\fR\&.
44 .SH "OPTIONS"
45 .PP
46 \fB\-h\fR
47 .RS 4
48 Print the synopsis and exit\&.
49 .RE
50 .PP
51 \fB\-v\fR
52 .RS 4
53 Print the version and exit\&.
54 .RE
55 .PP
56 \fB\-c\fR \fICONFIG_PATH\fR
57 .RS 4
58 Use the given configuration file\&.
59 .RE
60 .SH "COMMON DEFINITIONS"
61 .sp
62 .if n \{\
63 .RS 4
64 .\}
65 .nf
66 DIR         := north | west | south | east
67 CYCLE_DIR   := next | prev
68 .fi
69 .if n \{\
70 .RE
71 .\}
72 .SH "SELECTORS"
73 .sp
74 Selectors are used to select a target node, desktop, or monitor\&. A selector can either describe the target relatively or name it globally\&.
75 .sp
76 Selectors consist of a descriptor and any number of non\-conflicting modifiers as follows:
77 .sp
78 .if n \{\
79 .RS 4
80 .\}
81 .nf
82 DESCRIPTOR(\&.MODIFIER)*
83 .fi
84 .if n \{\
85 .RE
86 .\}
87 .sp
88 An exclamation mark can be prepended to certain modifiers in order to reverse their meaning\&.
89 .SS "Node"
90 .sp
91 Select a node\&.
92 .sp
93 .if n \{\
94 .RS 4
95 .\}
96 .nf
97 NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]leaf][\&.[!]window][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class][\&.[!]descendant_of][\&.[!]ancestor_of]
98
99 STATE := tiled|pseudo_tiled|floating|fullscreen
100
101 FLAG := hidden|sticky|private|locked|urgent
102
103 LAYER := below|normal|above
104
105 PATH := @[DESKTOP_SEL:][[/]JUMP](/JUMP)*
106
107 JUMP := first|1|second|2|brother|parent|DIR
108 .fi
109 .if n \{\
110 .RE
111 .\}
112 .sp
113 .it 1 an-trap
114 .nr an-no-space-flag 1
115 .nr an-break-flag 1
116 .br
117 .ps +1
118 \fBDescriptors\fR
119 .RS 4
120 .PP
121 \fIDIR\fR
122 .RS 4
123 Selects the window in the given (spacial) direction relative to the reference node\&.
124 .RE
125 .PP
126 \fICYCLE_DIR\fR
127 .RS 4
128 Selects the window in the given (cyclic) direction relative to the reference node\&.
129 .RE
130 .PP
131 \fIPATH\fR
132 .RS 4
133 Selects the node at the given path\&.
134 .RE
135 .PP
136 last
137 .RS 4
138 Selects the previously focused node relative to the reference node\&.
139 .RE
140 .PP
141 older
142 .RS 4
143 Selects the node older than the reference node in the history\&.
144 .RE
145 .PP
146 newer
147 .RS 4
148 Selects the node newer than the reference node in the history\&.
149 .RE
150 .PP
151 focused
152 .RS 4
153 Selects the currently focused node\&.
154 .RE
155 .PP
156 pointed
157 .RS 4
158 Selects the window under the pointer\&.
159 .RE
160 .PP
161 biggest
162 .RS 4
163 Selects the biggest window\&.
164 .RE
165 .PP
166 <node_id>
167 .RS 4
168 Selects the node with the given ID\&.
169 .RE
170 .RE
171 .sp
172 .it 1 an-trap
173 .nr an-no-space-flag 1
174 .nr an-break-flag 1
175 .br
176 .ps +1
177 \fBPath Jumps\fR
178 .RS 4
179 .sp
180 The initial node is the focused node (or the root if the path starts with \fI/\fR) of the reference desktop (or the selected desktop if the path has a \fIDESKTOP_SEL\fR prefix)\&.
181 .PP
182 1|first
183 .RS 4
184 Jumps to the first child\&.
185 .RE
186 .PP
187 2|second
188 .RS 4
189 Jumps to the second child\&.
190 .RE
191 .PP
192 brother
193 .RS 4
194 Jumps to the brother node\&.
195 .RE
196 .PP
197 parent
198 .RS 4
199 Jumps to the parent node\&.
200 .RE
201 .PP
202 \fIDIR\fR
203 .RS 4
204 Jumps to the node holding the edge in the given direction\&.
205 .RE
206 .RE
207 .sp
208 .it 1 an-trap
209 .nr an-no-space-flag 1
210 .nr an-break-flag 1
211 .br
212 .ps +1
213 \fBModifiers\fR
214 .RS 4
215 .PP
216 [!]focused
217 .RS 4
218 Only consider focused or unfocused nodes\&.
219 .RE
220 .PP
221 [!]automatic
222 .RS 4
223 Only consider nodes in automatic or manual insertion mode\&.
224 .RE
225 .PP
226 [!]local
227 .RS 4
228 Only consider nodes in or not in the current desktop\&.
229 .RE
230 .PP
231 [!]leaf
232 .RS 4
233 Only consider leaves or internal nodes\&.
234 .RE
235 .PP
236 [!]window
237 .RS 4
238 Only consider nodes that hold or don\(cqt hold a window\&.
239 .RE
240 .PP
241 [!](tiled|pseudo_tiled|floating|fullscreen)
242 .RS 4
243 Only consider windows in or not in the given state\&.
244 .RE
245 .PP
246 [!]same_class
247 .RS 4
248 Only consider windows that have or don\(cqt have the same class as the reference window\&.
249 .RE
250 .PP
251 [!]descendant_of
252 .RS 4
253 Only consider nodes that are or aren\(cqt descendants of the reference node\&.
254 .RE
255 .PP
256 [!]ancestor_of
257 .RS 4
258 Only consider nodes that are or aren\(cqt ancestors of the reference node\&.
259 .RE
260 .PP
261 [!](hidden|sticky|private|locked|urgent)
262 .RS 4
263 Only consider windows that have or don\(cqt have the given flag set\&.
264 .RE
265 .PP
266 [!](below|normal|above)
267 .RS 4
268 Only consider windows in or not in the given layer\&.
269 .RE
270 .RE
271 .SS "Desktop"
272 .sp
273 Select a desktop\&.
274 .sp
275 .if n \{\
276 .RS 4
277 .\}
278 .nf
279 DESKTOP_SEL := (CYCLE_DIR|last|older|newer|[MONITOR_SEL:](focused|^<n>)|<desktop_id>|<desktop_name>)[\&.[!]occupied][\&.[!]focused][\&.[!]urgent][\&.[!]local]
280 .fi
281 .if n \{\
282 .RE
283 .\}
284 .sp
285 .it 1 an-trap
286 .nr an-no-space-flag 1
287 .nr an-break-flag 1
288 .br
289 .ps +1
290 \fBDescriptors\fR
291 .RS 4
292 .PP
293 \fICYCLE_DIR\fR
294 .RS 4
295 Selects the desktop in the given direction relative to the active desktop\&.
296 .RE
297 .PP
298 last
299 .RS 4
300 Selects the previously focused desktop\&.
301 .RE
302 .PP
303 older
304 .RS 4
305 Selects the desktop older than the focused desktop in the history\&.
306 .RE
307 .PP
308 newer
309 .RS 4
310 Selects the desktop newer than the focused desktop in the history\&.
311 .RE
312 .PP
313 focused
314 .RS 4
315 Selects the currently focused desktop\&.
316 .RE
317 .PP
318 ^<n>
319 .RS 4
320 Selects the nth desktop\&.
321 .RE
322 .PP
323 <desktop_id>
324 .RS 4
325 Selects the desktop with the given ID\&.
326 .RE
327 .PP
328 <desktop_name>
329 .RS 4
330 Selects the desktop with the given name\&.
331 .RE
332 .RE
333 .sp
334 .it 1 an-trap
335 .nr an-no-space-flag 1
336 .nr an-break-flag 1
337 .br
338 .ps +1
339 \fBModifiers\fR
340 .RS 4
341 .PP
342 [!]occupied
343 .RS 4
344 Only consider occupied or free desktops\&.
345 .RE
346 .PP
347 [!]focused
348 .RS 4
349 Only consider focused or unfocused desktops\&.
350 .RE
351 .PP
352 [!]urgent
353 .RS 4
354 Only consider urgent or non urgent desktops\&.
355 .RE
356 .PP
357 [!]local
358 .RS 4
359 Only consider inside or outside of the current monitor\&.
360 .RE
361 .RE
362 .SS "Monitor"
363 .sp
364 Select a monitor\&.
365 .sp
366 .if n \{\
367 .RS 4
368 .\}
369 .nf
370 MONITOR_SEL := (DIR|CYCLE_DIR|last|older|newer|focused|primary|^<n>|<monitor_id>|<monitor_name>)[\&.[!]occupied][\&.[!]focused]
371 .fi
372 .if n \{\
373 .RE
374 .\}
375 .sp
376 .it 1 an-trap
377 .nr an-no-space-flag 1
378 .nr an-break-flag 1
379 .br
380 .ps +1
381 \fBDescriptors\fR
382 .RS 4
383 .PP
384 \fIDIR\fR
385 .RS 4
386 Selects the monitor in the given (spacial) direction relative to the active monitor\&.
387 .RE
388 .PP
389 \fICYCLE_DIR\fR
390 .RS 4
391 Selects the monitor in the given (cyclic) direction relative to the active monitor\&.
392 .RE
393 .PP
394 last
395 .RS 4
396 Selects the previously focused monitor\&.
397 .RE
398 .PP
399 older
400 .RS 4
401 Selects the monitor older than the focused monitor in the history\&.
402 .RE
403 .PP
404 newer
405 .RS 4
406 Selects the monitor newer than the focused monitor in the history\&.
407 .RE
408 .PP
409 focused
410 .RS 4
411 Selects the currently focused monitor\&.
412 .RE
413 .PP
414 primary
415 .RS 4
416 Selects the primary monitor\&.
417 .RE
418 .PP
419 ^<n>
420 .RS 4
421 Selects the nth monitor\&.
422 .RE
423 .PP
424 <monitor_id>
425 .RS 4
426 Selects the monitor with the given ID\&.
427 .RE
428 .PP
429 <monitor_name>
430 .RS 4
431 Selects the monitor with the given name\&.
432 .RE
433 .RE
434 .sp
435 .it 1 an-trap
436 .nr an-no-space-flag 1
437 .nr an-break-flag 1
438 .br
439 .ps +1
440 \fBModifiers\fR
441 .RS 4
442 .PP
443 [!]occupied
444 .RS 4
445 Only consider monitors where the focused desktop is occupied or free\&.
446 .RE
447 .PP
448 [!]focused
449 .RS 4
450 Only consider focused or unfocused monitors\&.
451 .RE
452 .RE
453 .SH "WINDOW STATES"
454 .PP
455 tiled
456 .RS 4
457 Its size and position are determined by the splitting type and ratio of each node of its path in the window tree\&.
458 .RE
459 .PP
460 pseudo_tiled
461 .RS 4
462 Has an unrestricted size while being centered in its tiling space\&.
463 .RE
464 .PP
465 floating
466 .RS 4
467 Can be moved/resized freely\&. Although it doesn\(cqt occupy any tiling space, it is still part of the window tree\&.
468 .RE
469 .PP
470 fullscreen
471 .RS 4
472 Fills its monitor rectangle and has no borders\&. It is send in the ABOVE layer by default\&.
473 .RE
474 .SH "NODE FLAGS"
475 .PP
476 hidden
477 .RS 4
478 Is hidden and doesn\(cqt occupy any tiling space\&.
479 .RE
480 .PP
481 sticky
482 .RS 4
483 Stays in the focused desktop of its monitor\&.
484 .RE
485 .PP
486 private
487 .RS 4
488 Tries to keep the same tiling position/size\&.
489 .RE
490 .PP
491 locked
492 .RS 4
493 Ignores the
494 \fBnode \-\-close\fR
495 message\&.
496 .RE
497 .PP
498 urgent
499 .RS 4
500 Has its urgency hint set\&. This flag is set externally\&.
501 .RE
502 .SH "STACKING LAYERS"
503 .sp
504 There\(cqs three stacking layers: BELOW, NORMAL and ABOVE\&.
505 .sp
506 In each layer, the window are orderered as follow: tiled & pseudo\-tiled < fullscreen < floating\&.
507 .SH "DOMAINS"
508 .SS "Node"
509 .sp
510 .it 1 an-trap
511 .nr an-no-space-flag 1
512 .nr an-break-flag 1
513 .br
514 .ps +1
515 \fBGeneral Syntax\fR
516 .RS 4
517 .sp
518 node [\fINODE_SEL\fR] \fICOMMANDS\fR
519 .sp
520 If \fINODE_SEL\fR is omitted, \fBfocused\fR is assumed\&.
521 .RE
522 .sp
523 .it 1 an-trap
524 .nr an-no-space-flag 1
525 .nr an-break-flag 1
526 .br
527 .ps +1
528 \fBCommands\fR
529 .RS 4
530 .PP
531 \fB\-f\fR, \fB\-\-focus\fR [\fINODE_SEL\fR]
532 .RS 4
533 Focus the selected or given node\&.
534 .RE
535 .PP
536 \fB\-a\fR, \fB\-\-activate\fR [\fINODE_SEL\fR]
537 .RS 4
538 Activate the selected or given node\&.
539 .RE
540 .PP
541 \fB\-d\fR, \fB\-\-to\-desktop\fR \fIDESKTOP_SEL\fR
542 .RS 4
543 Send the selected node to the given desktop\&.
544 .RE
545 .PP
546 \fB\-m\fR, \fB\-\-to\-monitor\fR \fIMONITOR_SEL\fR
547 .RS 4
548 Send the selected node to the given monitor\&.
549 .RE
550 .PP
551 \fB\-n\fR, \fB\-\-to\-node\fR \fINODE_SEL\fR
552 .RS 4
553 Transplant the selected node to the given node\&.
554 .RE
555 .PP
556 \fB\-s\fR, \fB\-\-swap\fR \fINODE_SEL\fR
557 .RS 4
558 Swap the selected node with the given node\&.
559 .RE
560 .PP
561 \fB\-p\fR, \fB\-\-presel\-dir\fR [~]\fIDIR\fR|cancel
562 .RS 4
563 Preselect the splitting area of the selected node (or cancel the preselection)\&. If
564 \fB~\fR
565 is prepended to
566 \fIDIR\fR
567 and the current preselection direction matches
568 \fIDIR\fR, then the argument is interpreted as
569 \fBcancel\fR\&.
570 .RE
571 .PP
572 \fB\-o\fR, \fB\-\-presel\-ratio\fR \fIRATIO\fR
573 .RS 4
574 Set the splitting ratio of the preselection area\&.
575 .RE
576 .PP
577 \fB\-v\fR, \fB\-\-move\fR \fIdx\fR \fIdy\fR
578 .RS 4
579 Move the selected window by
580 \fIdx\fR
581 pixels horizontally and
582 \fIdy\fR
583 pixels vertically\&.
584 .RE
585 .PP
586 \fB\-z\fR, \fB\-\-resize\fR top|left|bottom|right|top_left|top_right|bottom_right|bottom_left \fIdx\fR \fIdy\fR
587 .RS 4
588 Resize the selected window by moving the given handle by
589 \fIdx\fR
590 pixels horizontally and
591 \fIdy\fR
592 pixels vertically\&.
593 .RE
594 .PP
595 \fB\-r\fR, \fB\-\-ratio\fR \fIRATIO\fR|(+|\-)\fIPIXELS\fR
596 .RS 4
597 Set the splitting ratio of the selected node (0 <
598 \fIRATIO\fR
599 < 1)\&.
600 .RE
601 .PP
602 \fB\-R\fR, \fB\-\-rotate\fR \fI90|270|180\fR
603 .RS 4
604 Rotate the tree rooted at the selected node\&.
605 .RE
606 .PP
607 \fB\-F\fR, \fB\-\-flip\fR \fIhorizontal|vertical\fR
608 .RS 4
609 Flip the the tree rooted at selected node\&.
610 .RE
611 .PP
612 \fB\-E\fR, \fB\-\-equalize\fR
613 .RS 4
614 Reset the split ratios of the tree rooted at the selected node to their default value\&.
615 .RE
616 .PP
617 \fB\-B\fR, \fB\-\-balance\fR
618 .RS 4
619 Adjust the split ratios of the tree rooted at the selected node so that all windows occupy the same area\&.
620 .RE
621 .PP
622 \fB\-C\fR, \fB\-\-circulate\fR forward|backward
623 .RS 4
624 Circulate the windows of the tree rooted at the selected node\&.
625 .RE
626 .PP
627 \fB\-t\fR, \fB\-\-state\fR [~](tiled|pseudo_tiled|floating|fullscreen)
628 .RS 4
629 Set the state of the selected window\&. If
630 \fB~\fR
631 is present and the current state matches the given state, then the argument is interpreted as the last state\&.
632 .RE
633 .PP
634 \fB\-g\fR, \fB\-\-flag\fR hidden|sticky|private|locked[=on|off]
635 .RS 4
636 Set or toggle the given flag for the selected node\&.
637 .RE
638 .PP
639 \fB\-l\fR, \fB\-\-layer\fR below|normal|above
640 .RS 4
641 Set the stacking layer of the selected window\&.
642 .RE
643 .PP
644 \fB\-i\fR, \fB\-\-insert\-receptacle\fR
645 .RS 4
646 Insert a receptacle node at the selected node\&.
647 .RE
648 .PP
649 \fB\-c\fR, \fB\-\-close\fR
650 .RS 4
651 Close the windows rooted at the selected node\&.
652 .RE
653 .PP
654 \fB\-k\fR, \fB\-\-kill\fR
655 .RS 4
656 Kill the windows rooted at the selected node\&.
657 .RE
658 .RE
659 .SS "Desktop"
660 .sp
661 .it 1 an-trap
662 .nr an-no-space-flag 1
663 .nr an-break-flag 1
664 .br
665 .ps +1
666 \fBGeneral Syntax\fR
667 .RS 4
668 .sp
669 desktop [\fIDESKTOP_SEL\fR] \fICOMMANDS\fR
670 .sp
671 If \fIDESKTOP_SEL\fR is omitted, \fBfocused\fR is assumed\&.
672 .RE
673 .sp
674 .it 1 an-trap
675 .nr an-no-space-flag 1
676 .nr an-break-flag 1
677 .br
678 .ps +1
679 \fBCOMMANDS\fR
680 .RS 4
681 .PP
682 \fB\-f\fR, \fB\-\-focus\fR [\fIDESKTOP_SEL\fR]
683 .RS 4
684 Focus the selected or given desktop\&.
685 .RE
686 .PP
687 \fB\-a\fR, \fB\-\-activate\fR [\fIDESKTOP_SEL\fR]
688 .RS 4
689 Activate the selected or given desktop\&.
690 .RE
691 .PP
692 \fB\-m\fR, \fB\-\-to\-monitor\fR \fIMONITOR_SEL\fR
693 .RS 4
694 Send the selected desktop to the given monitor\&.
695 .RE
696 .PP
697 \fB\-l\fR, \fB\-\-layout\fR \fICYCLE_DIR\fR|monocle|tiled
698 .RS 4
699 Set or cycle the layout of the selected desktop\&.
700 .RE
701 .PP
702 \fB\-n\fR, \fB\-\-rename\fR <new_name>
703 .RS 4
704 Rename the selected desktop\&.
705 .RE
706 .PP
707 \fB\-s\fR, \fB\-\-swap\fR \fIDESKTOP_SEL\fR
708 .RS 4
709 Swap the selected desktop with the given desktop\&.
710 .RE
711 .PP
712 \fB\-b\fR, \fB\-\-bubble\fR \fICYCLE_DIR\fR
713 .RS 4
714 Bubble the selected desktop in the given direction\&.
715 .RE
716 .PP
717 \fB\-r\fR, \fB\-\-remove\fR
718 .RS 4
719 Remove the selected desktop\&.
720 .RE
721 .RE
722 .SS "Monitor"
723 .sp
724 .it 1 an-trap
725 .nr an-no-space-flag 1
726 .nr an-break-flag 1
727 .br
728 .ps +1
729 \fBGeneral Syntax\fR
730 .RS 4
731 .sp
732 monitor [\fIMONITOR_SEL\fR] \fICOMMANDS\fR
733 .sp
734 If \fIMONITOR_SEL\fR is omitted, \fBfocused\fR is assumed\&.
735 .RE
736 .sp
737 .it 1 an-trap
738 .nr an-no-space-flag 1
739 .nr an-break-flag 1
740 .br
741 .ps +1
742 \fBCommands\fR
743 .RS 4
744 .PP
745 \fB\-f\fR, \fB\-\-focus\fR [\fIMONITOR_SEL\fR]
746 .RS 4
747 Focus the selected or given monitor\&.
748 .RE
749 .PP
750 \fB\-a\fR, \fB\-\-add\-desktops\fR <name>\&...
751 .RS 4
752 Create desktops with the given names in the selected monitor\&.
753 .RE
754 .PP
755 \fB\-o\fR, \fB\-\-reorder\-desktops\fR <name>\&...
756 .RS 4
757 Reorder the desktops of the selected monitor to match the given order\&.
758 .RE
759 .PP
760 \fB\-d\fR, \fB\-\-reset\-desktops\fR <name>\&...
761 .RS 4
762 Rename, add or remove desktops depending on whether the number of given names is equal, superior or inferior to the number of existing desktops\&.
763 .RE
764 .PP
765 \fB\-g\fR, \fB\-\-rectangle\fR WxH+X+Y
766 .RS 4
767 Set the rectangle of the selected monitor\&.
768 .RE
769 .PP
770 \fB\-n\fR, \fB\-\-rename\fR <new_name>
771 .RS 4
772 Rename the selected monitor\&.
773 .RE
774 .PP
775 \fB\-s\fR, \fB\-\-swap\fR \fIMONITOR_SEL\fR
776 .RS 4
777 Swap the selected monitor with the given monitor\&.
778 .RE
779 .PP
780 \fB\-r\fR, \fB\-\-remove\fR
781 .RS 4
782 Remove the selected monitor\&.
783 .RE
784 .RE
785 .SS "Query"
786 .sp
787 .it 1 an-trap
788 .nr an-no-space-flag 1
789 .nr an-break-flag 1
790 .br
791 .ps +1
792 \fBGeneral Syntax\fR
793 .RS 4
794 .sp
795 query \fICOMMANDS\fR [\fIOPTIONS\fR]
796 .RE
797 .sp
798 .it 1 an-trap
799 .nr an-no-space-flag 1
800 .nr an-break-flag 1
801 .br
802 .ps +1
803 \fBCommands\fR
804 .RS 4
805 .PP
806 \fB\-N\fR, \fB\-\-nodes\fR [\fINODE_SEL\fR]
807 .RS 4
808 List the IDs of the matching nodes\&.
809 .RE
810 .PP
811 \fB\-D\fR, \fB\-\-desktops\fR [\fIDESKTOP_SEL\fR]
812 .RS 4
813 List the IDs of the matching desktops\&.
814 .RE
815 .PP
816 \fB\-M\fR, \fB\-\-monitors\fR [\fIMONITOR_SEL\fR]
817 .RS 4
818 List the IDs of the matching monitors\&.
819 .RE
820 .PP
821 \fB\-T\fR, \fB\-\-tree\fR
822 .RS 4
823 Print a JSON representation of the matching item\&.
824 .RE
825 .RE
826 .sp
827 .it 1 an-trap
828 .nr an-no-space-flag 1
829 .nr an-break-flag 1
830 .br
831 .ps +1
832 \fBOptions\fR
833 .RS 4
834 .PP
835 \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]
836 .RS 4
837 Constrain matches to the selected monitor, desktop or node\&. The descriptor can be omitted for
838 \fI\-M\fR,
839 \fI\-D\fR
840 and
841 \fI\-N\fR\&.
842 .RE
843 .RE
844 .SS "Wm"
845 .sp
846 .it 1 an-trap
847 .nr an-no-space-flag 1
848 .nr an-break-flag 1
849 .br
850 .ps +1
851 \fBGeneral Syntax\fR
852 .RS 4
853 .sp
854 wm \fICOMMANDS\fR
855 .RE
856 .sp
857 .it 1 an-trap
858 .nr an-no-space-flag 1
859 .nr an-break-flag 1
860 .br
861 .ps +1
862 \fBCommands\fR
863 .RS 4
864 .PP
865 \fB\-d\fR, \fB\-\-dump\-state\fR
866 .RS 4
867 Dump the current world state on standard output\&.
868 .RE
869 .PP
870 \fB\-l\fR, \fB\-\-load\-state\fR <file_path>
871 .RS 4
872 Load a world state from the given file\&.
873 .RE
874 .PP
875 \fB\-a\fR, \fB\-\-add\-monitor\fR <name> WxH+X+Y
876 .RS 4
877 Add a monitor for the given name and rectangle\&.
878 .RE
879 .PP
880 \fB\-o\fR, \fB\-\-adopt\-orphans\fR
881 .RS 4
882 Manage all the unmanaged windows remaining from a previous session\&.
883 .RE
884 .PP
885 \fB\-h\fR, \fB\-\-record\-history\fR on|off
886 .RS 4
887 Enable or disable the recording of node focus history\&.
888 .RE
889 .PP
890 \fB\-g\fR, \fB\-\-get\-status\fR
891 .RS 4
892 Print the current status information\&.
893 .RE
894 .RE
895 .SS "Rule"
896 .sp
897 .it 1 an-trap
898 .nr an-no-space-flag 1
899 .nr an-break-flag 1
900 .br
901 .ps +1
902 \fBGeneral Syntax\fR
903 .RS 4
904 .sp
905 rule \fICOMMANDS\fR
906 .RE
907 .sp
908 .it 1 an-trap
909 .nr an-no-space-flag 1
910 .nr an-break-flag 1
911 .br
912 .ps +1
913 \fBCommands\fR
914 .RS 4
915 .PP
916 \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] [(hidden|sticky|private|locked|center|follow|manage|focus|border)=(on|off)]
917 .RS 4
918 Create a new rule\&.
919 .RE
920 .PP
921 \fB\-r\fR, \fB\-\-remove\fR ^<n>|head|tail|(<class_name>|*)[:(<instance_name>|*)]\&...
922 .RS 4
923 Remove the given rules\&.
924 .RE
925 .PP
926 \fB\-l\fR, \fB\-\-list\fR
927 .RS 4
928 List the rules\&.
929 .RE
930 .RE
931 .SS "Config"
932 .sp
933 .it 1 an-trap
934 .nr an-no-space-flag 1
935 .nr an-break-flag 1
936 .br
937 .ps +1
938 \fBGeneral Syntax\fR
939 .RS 4
940 .PP
941 config [\-m \fIMONITOR_SEL\fR|\-d \fIDESKTOP_SEL\fR|\-n \fINODE_SEL\fR] <key> [<value>]
942 .RS 4
943 Get or set the value of <key>\&.
944 .RE
945 .RE
946 .SS "Subscribe"
947 .sp
948 .it 1 an-trap
949 .nr an-no-space-flag 1
950 .nr an-break-flag 1
951 .br
952 .ps +1
953 \fBGeneral Syntax\fR
954 .RS 4
955 .PP
956 subscribe (all|report|monitor|desktop|node|\&...)*
957 .RS 4
958 Continuously print status information\&. See the
959 \fBEVENTS\fR
960 section for the detailed description of each event\&.
961 .RE
962 .RE
963 .SS "Quit"
964 .sp
965 .it 1 an-trap
966 .nr an-no-space-flag 1
967 .nr an-break-flag 1
968 .br
969 .ps +1
970 \fBGeneral Syntax\fR
971 .RS 4
972 .PP
973 quit [<status>]
974 .RS 4
975 Quit with an optional exit status\&.
976 .RE
977 .RE
978 .SH "EXIT CODES"
979 .sp
980 If the server can\(cqt handle a message, \fBbspc\fR will return with a non\-zero exit code\&.
981 .SH "SETTINGS"
982 .sp
983 Colors are in the form \fI#RRGGBB\fR, booleans are \fItrue\fR, \fIon\fR, \fIfalse\fR or \fIoff\fR\&.
984 .sp
985 All the boolean settings are \fIfalse\fR by default unless stated otherwise\&.
986 .SS "Global Settings"
987 .PP
988 \fInormal_border_color\fR
989 .RS 4
990 Color of the border of an unfocused window\&.
991 .RE
992 .PP
993 \fIactive_border_color\fR
994 .RS 4
995 Color of the border of a focused window of an unfocused monitor\&.
996 .RE
997 .PP
998 \fIfocused_border_color\fR
999 .RS 4
1000 Color of the border of a focused window of a focused monitor\&.
1001 .RE
1002 .PP
1003 \fIpresel_feedback_color\fR
1004 .RS 4
1005 Color of the
1006 \fBnode \-\-presel\-{dir,ratio}\fR
1007 message feedback area\&.
1008 .RE
1009 .PP
1010 \fIsplit_ratio\fR
1011 .RS 4
1012 Default split ratio\&.
1013 .RE
1014 .PP
1015 \fIstatus_prefix\fR
1016 .RS 4
1017 Prefix prepended to each of the status lines\&.
1018 .RE
1019 .PP
1020 \fIexternal_rules_command\fR
1021 .RS 4
1022 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:
1023 \fBkey1=value1 key2=value2 \&...\fR
1024 (the valid key/value pairs are given in the description of the
1025 \fIrule\fR
1026 command)\&.
1027 .RE
1028 .PP
1029 \fIinitial_polarity\fR
1030 .RS 4
1031 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:
1032 \fBfirst_child\fR,
1033 \fBsecond_child\fR\&.
1034 .RE
1035 .PP
1036 \fIborderless_monocle\fR
1037 .RS 4
1038 Remove borders of tiled windows for the
1039 \fBmonocle\fR
1040 desktop layout\&.
1041 .RE
1042 .PP
1043 \fIgapless_monocle\fR
1044 .RS 4
1045 Remove gaps of tiled windows for the
1046 \fBmonocle\fR
1047 desktop layout\&.
1048 .RE
1049 .PP
1050 \fIpaddingless_monocle\fR
1051 .RS 4
1052 Remove padding space for the
1053 \fBmonocle\fR
1054 desktop layout\&.
1055 .RE
1056 .PP
1057 \fIsingle_monocle\fR
1058 .RS 4
1059 Set the desktop layout to
1060 \fBmonocle\fR
1061 if there\(cqs only one tiled window in the tree\&.
1062 .RE
1063 .PP
1064 \fIpointer_modifier\fR
1065 .RS 4
1066 Keyboard modifier used for moving or resizing windows\&. Accept the following values:
1067 \fBshift\fR,
1068 \fBcontrol\fR,
1069 \fBlock\fR,
1070 \fBmod1\fR,
1071 \fBmod2\fR,
1072 \fBmod3\fR,
1073 \fBmod4\fR,
1074 \fBmod5\fR\&.
1075 .RE
1076 .PP
1077 \fIpointer_action1\fR, \fIpointer_action2\fR, \fIpointer_action3\fR
1078 .RS 4
1079 Action performed when pressing
1080 \fIpointer_modifier\fR
1081 +
1082 \fIbutton<n>\fR\&. Accept the following values:
1083 \fBmove\fR,
1084 \fBresize_side\fR,
1085 \fBresize_corner\fR,
1086 \fBfocus\fR\&.
1087 .RE
1088 .PP
1089 \fIclick_to_focus\fR
1090 .RS 4
1091 Focus a window (or a monitor) by clicking it\&.
1092 .RE
1093 .PP
1094 \fIfocus_follows_pointer\fR
1095 .RS 4
1096 Focus the window under the pointer\&.
1097 .RE
1098 .PP
1099 \fIpointer_follows_focus\fR
1100 .RS 4
1101 When focusing a window, put the pointer at its center\&.
1102 .RE
1103 .PP
1104 \fIpointer_follows_monitor\fR
1105 .RS 4
1106 When focusing a monitor, put the pointer at its center\&.
1107 .RE
1108 .PP
1109 \fIignore_ewmh_focus\fR
1110 .RS 4
1111 Ignore EWMH focus requests coming from applications\&.
1112 .RE
1113 .PP
1114 \fIcenter_pseudo_tiled\fR
1115 .RS 4
1116 Center pseudo tiled windows into their tiling rectangles\&. Defaults to
1117 \fItrue\fR\&.
1118 .RE
1119 .PP
1120 \fIhonor_size_hints\fR
1121 .RS 4
1122 Apply ICCCM window size hints\&.
1123 .RE
1124 .PP
1125 \fIremove_disabled_monitors\fR
1126 .RS 4
1127 Consider disabled monitors as disconnected\&.
1128 .RE
1129 .PP
1130 \fIremove_unplugged_monitors\fR
1131 .RS 4
1132 Remove unplugged monitors\&.
1133 .RE
1134 .PP
1135 \fImerge_overlapping_monitors\fR
1136 .RS 4
1137 Merge overlapping monitors (the bigger remains)\&.
1138 .RE
1139 .SS "Monitor and Desktop Settings"
1140 .PP
1141 \fItop_padding\fR, \fIright_padding\fR, \fIbottom_padding\fR, \fIleft_padding\fR
1142 .RS 4
1143 Padding space added at the sides of the monitor or desktop\&.
1144 .RE
1145 .SS "Desktop Settings"
1146 .PP
1147 \fIwindow_gap\fR
1148 .RS 4
1149 Size of the gap that separates windows\&.
1150 .RE
1151 .SS "Node Settings"
1152 .PP
1153 \fIborder_width\fR
1154 .RS 4
1155 Window border width\&.
1156 .RE
1157 .SH "POINTER BINDINGS"
1158 .PP
1159 \fIbutton1\fR
1160 .RS 4
1161 Focus the window under the pointer if
1162 \fIclick_to_focus\fR
1163 is set\&.
1164 .RE
1165 .PP
1166 \fIpointer_modifier\fR + \fIbutton1\fR
1167 .RS 4
1168 Move the window under the pointer\&.
1169 .RE
1170 .PP
1171 \fIpointer_modifier\fR + \fIbutton2\fR
1172 .RS 4
1173 Resize the window under the pointer by dragging the nearest side\&.
1174 .RE
1175 .PP
1176 \fIpointer_modifier\fR + \fIbutton3\fR
1177 .RS 4
1178 Resize the window under the pointer by dragging the nearest corner\&.
1179 .RE
1180 .sp
1181 The behavior of \fIpointer_modifier\fR + \fIbutton<n>\fR can be modified through the \fIpointer_action<n>\fR setting\&.
1182 .SH "EVENTS"
1183 .PP
1184 \fIreport\fR
1185 .RS 4
1186 See the next section for the description of the format\&.
1187 .RE
1188 .PP
1189 \fImonitor_add <monitor_id> <monitor_name> <monitor_geometry>\fR
1190 .RS 4
1191 A monitor is added\&.
1192 .RE
1193 .PP
1194 \fImonitor_rename <monitor_id> <old_name> <new_name>\fR
1195 .RS 4
1196 A monitor is renamed\&.
1197 .RE
1198 .PP
1199 \fImonitor_remove <monitor_id>\fR
1200 .RS 4
1201 A monitor is removed\&.
1202 .RE
1203 .PP
1204 \fImonitor_swap <src_monitor_id> <dst_monitor_id>\fR
1205 .RS 4
1206 A monitor is swapped\&.
1207 .RE
1208 .PP
1209 \fImonitor_focus <monitor_id>\fR
1210 .RS 4
1211 A monitor is focused\&.
1212 .RE
1213 .PP
1214 \fImonitor_geometry <monitor_id> <monitor_geometry>\fR
1215 .RS 4
1216 The geometry of a monitor changed\&.
1217 .RE
1218 .PP
1219 \fIdesktop_add <monitor_id> <desktop_id> <desktop_name>\fR
1220 .RS 4
1221 A desktop is added\&.
1222 .RE
1223 .PP
1224 \fIdesktop_rename <monitor_id> <desktop_id> <old_name> <new_name>\fR
1225 .RS 4
1226 A desktop is renamed\&.
1227 .RE
1228 .PP
1229 \fIdesktop_remove <monitor_id> <desktop_id>\fR
1230 .RS 4
1231 A desktop is removed\&.
1232 .RE
1233 .PP
1234 \fIdesktop_swap <src_monitor_id> <src_desktop_id> <dst_monitor_id> <dst_desktop_id>\fR
1235 .RS 4
1236 A desktop is swapped\&.
1237 .RE
1238 .PP
1239 \fIdesktop_transfer <src_monitor_id> <src_desktop_id> <dst_monitor_id>\fR
1240 .RS 4
1241 A desktop is transferred\&.
1242 .RE
1243 .PP
1244 \fIdesktop_focus <monitor_id> <desktop_id>\fR
1245 .RS 4
1246 A desktop is focused\&.
1247 .RE
1248 .PP
1249 \fIdesktop_activate <monitor_id> <desktop_id>\fR
1250 .RS 4
1251 A desktop is activated\&.
1252 .RE
1253 .PP
1254 \fIdesktop_layout <monitor_id> <desktop_id> tiled|monocle\fR
1255 .RS 4
1256 The layout of a desktop changed\&.
1257 .RE
1258 .PP
1259 \fInode_manage <monitor_id> <desktop_id> <node_id> <ip_id>\fR
1260 .RS 4
1261 A window is managed\&.
1262 .RE
1263 .PP
1264 \fInode_unmanage <monitor_id> <desktop_id> <node_id>\fR
1265 .RS 4
1266 A window is unmanaged\&.
1267 .RE
1268 .PP
1269 \fInode_swap <src_monitor_id> <src_desktop_id> <src_node_id> <dst_monitor_id> <dst_desktop_id> <dst_node_id>\fR
1270 .RS 4
1271 A node is swapped\&.
1272 .RE
1273 .PP
1274 \fInode_transfer <src_monitor_id> <src_desktop_id> <src_node_id> <dst_monitor_id> <dst_desktop_id> <dst_node_id>\fR
1275 .RS 4
1276 A node is transferred\&.
1277 .RE
1278 .PP
1279 \fInode_focus <monitor_id> <desktop_id> <node_id>\fR
1280 .RS 4
1281 A node is focused\&.
1282 .RE
1283 .PP
1284 \fInode_activate <monitor_id> <desktop_id> <node_id>\fR
1285 .RS 4
1286 A node is activated\&.
1287 .RE
1288 .PP
1289 \fInode_presel <monitor_id> <desktop_id> <node_id> (dir DIR|ratio RATIO|cancel)\fR
1290 .RS 4
1291 A node is preselected\&.
1292 .RE
1293 .PP
1294 \fInode_stack <node_id_1> below|above <node_id_2>\fR
1295 .RS 4
1296 A node is stacked below or above another node\&.
1297 .RE
1298 .PP
1299 \fInode_geometry <monitor_id> <desktop_id> <node_id> <node_geometry>\fR
1300 .RS 4
1301 The geometry of a window changed\&.
1302 .RE
1303 .PP
1304 \fInode_state <monitor_id> <desktop_id> <node_id> tiled|pseudo_tiled|floating|fullscreen on|off\fR
1305 .RS 4
1306 The state of a window changed\&.
1307 .RE
1308 .PP
1309 \fInode_flag <monitor_id> <desktop_id> <node_id> hidden|sticky|private|locked|urgent on|off\fR
1310 .RS 4
1311 One of the flags of a node changed\&.
1312 .RE
1313 .PP
1314 \fInode_layer <monitor_id> <desktop_id> <node_id> below|normal|above\fR
1315 .RS 4
1316 The layer of a window changed\&.
1317 .RE
1318 .sp
1319 Please note that \fBbspwm\fR initializes monitors before it reads messages on its socket, therefore the initial monitor events can\(cqt be received\&.
1320 .SH "REPORT FORMAT"
1321 .sp
1322 Each report event message is composed of items separated by colons\&.
1323 .sp
1324 Each item has the form \fI<type><value>\fR where \fI<type>\fR is the first character of the item\&.
1325 .PP
1326 \fIM<monitor_name>\fR
1327 .RS 4
1328 Focused monitor\&.
1329 .RE
1330 .PP
1331 \fIm<monitor_name>\fR
1332 .RS 4
1333 Unfocused monitor\&.
1334 .RE
1335 .PP
1336 \fIO<desktop_name>\fR
1337 .RS 4
1338 Occupied focused desktop\&.
1339 .RE
1340 .PP
1341 \fIo<desktop_name>\fR
1342 .RS 4
1343 Occupied unfocused desktop\&.
1344 .RE
1345 .PP
1346 \fIF<desktop_name>\fR
1347 .RS 4
1348 Free focused desktop\&.
1349 .RE
1350 .PP
1351 \fIf<desktop_name>\fR
1352 .RS 4
1353 Free unfocused desktop\&.
1354 .RE
1355 .PP
1356 \fIU<desktop_name>\fR
1357 .RS 4
1358 Urgent focused desktop\&.
1359 .RE
1360 .PP
1361 \fIu<desktop_name>\fR
1362 .RS 4
1363 Urgent unfocused desktop\&.
1364 .RE
1365 .PP
1366 \fIL(T|M)\fR
1367 .RS 4
1368 Layout of the focused desktop of a monitor\&.
1369 .RE
1370 .PP
1371 \fIT(T|P|F|=|@)\fR
1372 .RS 4
1373 State of the focused node of a focused desktop\&.
1374 .RE
1375 .PP
1376 \fIG(S?P?L?)\fR
1377 .RS 4
1378 Active flags of the focused node of a focused desktop\&.
1379 .RE
1380 .SH "ENVIRONMENT VARIABLES"
1381 .PP
1382 \fIBSPWM_SOCKET\fR
1383 .RS 4
1384 The path of the socket used for the communication between
1385 \fBbspc\fR
1386 and
1387 \fBbspwm\fR\&. If it isn\(cqt defined, then the following path is used:
1388 \fI/tmp/bspwm<host_name>_<display_number>_<screen_number>\-socket\fR\&.
1389 .RE
1390 .SH "CONTRIBUTORS"
1391 .sp
1392 .RS 4
1393 .ie n \{\
1394 \h'-04'\(bu\h'+03'\c
1395 .\}
1396 .el \{\
1397 .sp -1
1398 .IP \(bu 2.3
1399 .\}
1400 Steven Allen <steven at stebalien\&.com>
1401 .RE
1402 .sp
1403 .RS 4
1404 .ie n \{\
1405 \h'-04'\(bu\h'+03'\c
1406 .\}
1407 .el \{\
1408 .sp -1
1409 .IP \(bu 2.3
1410 .\}
1411 Thomas Adam <thomas at xteddy\&.org>
1412 .RE
1413 .sp
1414 .RS 4
1415 .ie n \{\
1416 \h'-04'\(bu\h'+03'\c
1417 .\}
1418 .el \{\
1419 .sp -1
1420 .IP \(bu 2.3
1421 .\}
1422 Ivan Kanakarakis <ivan\&.kanak at gmail\&.com>
1423 .RE
1424 .SH "AUTHOR"
1425 .sp
1426 Bastien Dejean <nihilhill at gmail\&.com>