]> git.lizzy.rs Git - bspwm.git/blob - doc/bspwm.1.txt
21cfccaf45a06c33f124986504b84671d1bf2a98
[bspwm.git] / doc / bspwm.1.txt
1 :man source:   Bspwm
2 :man version:  {revnumber}
3 :man manual:   Bspwm Manual
4
5 bspwm(1)
6 ========
7
8 Name
9 ----
10
11 bspwm - Binary space partitioning window manager
12
13 Synopsis
14 --------
15
16 *bspwm* [*-h*|*-v*|*-c* 'CONFIG_PATH']
17
18 *bspc* 'COMMAND' ['ARGUMENTS']
19
20 Description
21 -----------
22
23 *bspwm* is a tiling window manager that represents windows as the leaves of a full binary tree.
24
25 It is controlled and configured via *bspc*.
26
27
28 Options
29 -------
30
31 *-h*::
32         Print the synopsis and exit.
33
34 *-v*::
35         Print the version and exit.
36
37 *-c* 'CONFIG_PATH'::
38         Use the given configuration file.
39
40 Configuration
41 -------------
42
43 *bspwm* has only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
44
45 The default configuration file is '$XDG_CONFIG_HOME/bspwm/bspwmrc'.
46
47 Keyboard and pointer bindings are defined with https://github.com/baskerville/sxhkd[sxhkd].
48
49 Example configuration files can be found in the *examples* directory.
50
51 Splitting Modes
52 ---------------
53
54 New windows are inserted in the tree as close as possible to the focused window.
55
56 There are only two splitting modes: 'automatic' and 'manual'.
57
58 The default mode is 'automatic'. The 'manual' mode is entered by sending a *preselection* message.
59
60 Example: insertion of a new node (number 4) into the given tree in 'automatic' mode:
61
62 ----
63               b                                   c
64              / \                                 / \
65             3   a              -->              4   b
66             ^  / \                              ^  / \
67               2   1                               3   a
68                                                      / \
69                                                     2   1
70  +-------------------------+         +-------------------------+
71  |            |            |         |            |            |
72  |            |     2      |         |            |     3      |
73  |            |            |         |            |            |
74  |     3      |------------|   -->   |     4      |------------|
75  |     ^      |            |         |     ^      |     |      |
76  |            |     1      |         |            |  1  |  2   |
77  |            |            |         |            |     |      |
78  +-------------------------+         +-------------------------+
79 ----
80
81 Same action, but the mode is 'manual', and a *window --presel up* message was sent beforehand:
82
83 ----
84              b                                   b
85             / \                                 / \
86            3   a              -->              c   a
87            ^  / \                             / \ / \
88              2   1                           4  3 2  1
89                                              ^
90 +-------------------------+         +-------------------------+
91 |            |            |         |            |            |
92 |            |     2      |         |     4      |     2      |
93 |            |            |         |     ^      |            |
94 |     3      |------------|   -->   |------------|------------|
95 |     ^      |            |         |            |            |
96 |            |     1      |         |     3      |     1      |
97 |            |            |         |            |            |
98 +-------------------------+         +-------------------------+
99 ----
100
101 Containers
102 ----------
103
104 Each monitor contains at least one desktop.
105
106 Each desktop contains at most one tree.
107
108 Common Definitions
109 ------------------
110
111 ----
112 DIR         := left | right | up | down
113 CYCLE_DIR   := next | prev
114 ----
115
116 Selectors
117 ---------
118
119 Selectors are used to select a target window, desktop, or monitor. A selector
120 can either describe the target relatively or name it globally.
121
122 Descriptive (relative) selectors consist of a primary selector and any number
123 of non-conflicting modifiers as follows:
124
125         PRIMARY_SELECTOR[.MODIFIER]*
126
127 For obvious reasons, neither desktop nor monitor names may be valid descriptive
128 selectors.
129
130 Window
131 ~~~~~~
132
133 Select a window.
134
135 ----
136 WINDOW_SEL := <window_id> 
137             | (DIR|CYCLE_DIR|biggest|last|focused|older|newer)[.floating|.tiled][.like|.unlike][.manual|.automatic][.urgent|.nonurgent][.local|.foreign][.focused|.unfocused][.below|.normal|.above][.fullscreen|.nonfullscreen][.sticky|.nonsticky][.public|.private][.locked|.unlocked][.pseudotiled|.nonpseudotiled]
138 ----
139
140 Primary Selectors
141 ^^^^^^^^^^^^^^^^^
142
143 'DIR'::
144         Selects the window in the given (spacial) direction relative to the active window.
145
146 'CYCLE_DIR'::
147         Selects the window in the given (cyclic) direction.
148
149 biggest::
150         Selects the biggest window on the current desktop.
151
152 last::
153         Selects the previously focused window.
154
155 focused::
156         Selects the currently focused window.
157
158 older::
159         Selects the window older than the focused window in the history.
160
161 newer::
162         Selects the window newer than the focused window in the history.
163
164 Modifiers
165 ^^^^^^^^^
166
167 floating::
168         Only consider floating windows.
169
170 tiled::
171         Only consider tiled windows.
172
173 like::
174         Only consider windows that have the same class as the current window.
175
176 unlike::
177         Only consider windows that have a different class than the current window.
178
179 manual::
180         Only consider windows in manual splitting mode.
181
182 automatic::
183         Only consider windows in automatic splitting mode.
184
185 local::
186         Only consider windows of the current desktop.
187
188 foreign::
189         Only consider windows outside of the current desktop.
190
191 private::
192         Only consider private windows.
193
194 public::
195         Only consider non private windows.
196
197 urgent::
198         Only consider urgent windows.
199
200 nonurgent::
201         Only consider non urgent windows.
202
203 pseudotiled::
204         Only consider pseudo-tiled windows.
205
206 nonpseudotiled::
207         Only consider non pseudo-tiled windows.
208
209 sticky::
210         Only consider sticky windows.
211
212 nonsticky::
213         Only consider non sticky windows.
214
215 locked::
216         Only consider locked windows.
217
218 unlocked::
219         Only consider non locked windows.
220
221 nonfullscreen::
222         Only consider non fullscreen windows.
223
224 fullscreen::
225         Only consider fullscreen windows.
226
227 nonfullscreen::
228         Only consider non fullscreen windows.
229
230 focused::
231         Only consider focused windows.
232
233 unfocused::
234         Only consider unfocused windows.
235
236 below::
237         Only consider windows of the BELOW layer.
238
239 normal::
240         Only consider windows of the NORMAL layer.
241
242 above::
243         Only consider windows of the ABOVE layer.
244
245 Desktop
246 ~~~~~~~
247
248 Select a desktop.
249
250 ----
251 DESKTOP_SEL := <desktop_name>
252              | [MONITOR_SEL:]^<n>
253              | (CYCLE_DIR|last|[MONITOR_SEL:]focused|older|newer)[.occupied|.free][.urgent|.nonurgent][.local|.foreign]
254 ----
255
256 Primary Selectors
257 ^^^^^^^^^^^^^^^^^
258
259 <desktop_name>::
260         Selects the desktop with the given name.
261
262 ^<n>::
263         Selects the nth desktop.
264
265 'CYCLE_DIR'::
266         Selects the desktop in the given direction relative to the active desktop.
267
268 last::
269         Selects the previously focused desktop.
270
271 focused::
272         Selects the currently focused desktop.
273
274 older::
275         Selects the desktop older than the focused desktop in the history.
276
277 newer::
278         Selects the desktop newer than the focused desktop in the history.
279
280 Modifiers
281 ^^^^^^^^^
282
283 occupied::
284         Only consider occupied desktops.
285
286 free::
287         Only consider free desktops.
288
289 urgent::
290         Only consider urgent desktops.
291
292 nonurgent::
293         Only consider non urgent desktops.
294
295 local::
296         Only consider desktops of the current monitor.
297
298 foreign::
299         Only consider desktops outside of the current monitor.
300
301 Monitor
302 ~~~~~~~
303
304 Select a monitor.
305
306 ----
307 MONITOR_SEL := <monitor_name>
308              | ^<n>
309              | (DIR|CYCLE_DIR|last|primary|focused|older|newer)[.occupied|.free]
310 ----
311
312 Primary Selectors
313 ^^^^^^^^^^^^^^^^^
314
315 <monitor_name>::
316         Selects the monitor with the given name.
317
318 ^<n>::
319         Selects the nth monitor.
320
321 'DIR'::
322         Selects the monitor in the given (spacial) direction relative to the active monitor.
323
324 'CYCLE_DIR'::
325         Selects the monitor in the given (cyclic) direction relative to the active monitor.
326
327 primary::
328         Selects the primary monitor.
329
330 last::
331         Selects the previously focused monitor.
332
333 focused::
334         Selects the currently focused monitor.
335
336 older::
337         Selects the monitor older than the focused monitor in the history.
338
339 newer::
340         Selects the monitor newer than the focused monitor in the history.
341
342 Modifiers
343 ^^^^^^^^^
344
345 occupied::
346         Only consider monitors where the focused desktop is occupied.
347
348 free::
349         Only consider monitors where the focused desktop is free.
350
351
352 Window States
353 -------------
354
355 floating::
356         Can be moved/resized freely. Although it doesn't occupy any tiling space, it is still part of the window tree.
357
358 pseudo_tiled::
359         Has an unrestricted size while being centered in its tiling space.
360
361 fullscreen::
362         Fills its monitor rectangle and has no borders.
363
364 locked::
365         Ignores the *close* message.
366
367 sticky::
368         Stays in the focused desktop of its monitor.
369
370 private::
371         Tries to keep the same tiling position/size.
372
373 urgent::
374         Has its urgency hint set.
375
376
377 Stacking Layers
378 --------------
379
380 There's three stacking layers: BELOW, NORMAL and ABOVE.
381
382 In each layer, floating windows are stacked above tiled windows.
383
384
385 Commands
386 --------
387
388 Window
389 ~~~~~~
390
391 General Syntax
392 ^^^^^^^^^^^^^^
393
394 window ['WINDOW_SEL'] 'OPTIONS'
395
396 Options
397 ^^^^^^^
398 *-f*, *--focus* ['WINDOW_SEL']::
399         Focus the selected or given window.
400
401 *-d*, *--to-desktop* 'DESKTOP_SEL'::
402         Send the selected window to the given desktop.
403
404 *-m*, *--to-monitor* 'MONITOR_SEL'::
405         Send the selected window to the given monitor.
406
407 *-w*, *--to-window* 'WINDOW_SEL'::
408         Transplant the selected window to the given window.
409
410 *-s*, *--swap* 'WINDOW_SEL'::
411         Swap the selected window with the given window.
412
413 *-p*, *--presel* 'DIR'|cancel::
414         Preselect the splitting area of the selected window (or cancel the preselection).
415
416 *-r*, *--ratio* 'RATIO'::
417         Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
418
419 *-e*, *--edge* 'DIR' 'RATIO'|±'PIXELS'::
420         Set or change the splitting ratio of the edge located in the given direction in relation to the selected window.
421
422 *-R*, *--rotate* 'DIR' '90|270|180'::
423         Rotate the tree holding the edge located in the given direction in relation to the selected window.
424
425 *-t*, *--toggle* floating|fullscreen|pseudo_tiled|locked|sticky|private[=on|off]::
426         Set or toggle the given state for the selected window.
427
428 *-l*, *--layer* below|normal|above::
429         Set the stacking layer of the selected window.
430
431 *-c*, *--close*::
432         Close the selected window.
433
434 *-k*, *--kill*::
435         Kill the selected window.
436
437 Desktop
438 ~~~~~~~
439
440 General Syntax
441 ^^^^^^^^^^^^^^
442
443 desktop ['DESKTOP_SEL'] 'OPTIONS'
444
445 Options
446 ^^^^^^^
447 *-f*, *--focus* ['DESKTOP_SEL']::
448         Focus the selected or given desktop.
449
450 *-m*, *--to-monitor* 'MONITOR_SEL'::
451         Send the selected desktop to the given monitor.
452
453 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
454         Set or cycle the layout of the selected desktop.
455
456 *-n*, *--rename* <new_name>::
457         Rename the selected desktop.
458
459 *-s*, *--swap* 'DESKTOP_SEL'::
460         Swap the selected desktop with the given desktop.
461
462 *-b*, *--bubble* 'CYCLE_DIR'::
463         Bubble the selected desktop in the given direction.
464
465 *-r*, *--remove*::
466         Remove the selected desktop.
467
468 *-c*, *--cancel-presel*::
469         Cancel the preselection of all the windows of the selected desktop.
470
471 *-F*, *--flip* 'horizontal|vertical'::
472         Flip the tree of the selected desktop.
473
474 *-R*, *--rotate* '90|270|180'::
475         Rotate the tree of the selected desktop.
476
477 *-E*, *--equalize*::
478         Reset the split ratios of the tree of the selected desktop.
479
480 *-B*, *--balance*::
481         Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
482
483 *-C*, *--circulate* forward|backward::
484         Circulate the leaves of the tree of the selected desktop.
485
486 *-t*, *--toggle* floating[=on|off]::
487         Set or toggle the given state for the selected desktop.
488
489
490 Monitor
491 ~~~~~~~
492
493 General Syntax
494 ^^^^^^^^^^^^^^
495
496 monitor ['MONITOR_SEL'] 'OPTIONS'
497
498 Options
499 ^^^^^^^
500 *-f*, *--focus* ['MONITOR_SEL']::
501         Focus the selected or given monitor.
502
503 *-a*, *--add-desktops* <name>...::
504         Create desktops with the given names in the selected monitor.
505
506 *-r*, *--remove-desktops* <name>...::
507         Remove desktops with the given names.
508
509 *-o*, *--reorder-desktops* <name>...::
510         Reorder the desktops of the selected monitor to match the given order.
511
512 *-d*, *--reset-desktops* <name>...::
513         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.
514
515 *-n*, *--rename* <new_name>::
516         Rename the selected monitor.
517
518 *-s*, *--swap* 'MONITOR_SEL'::
519         Swap the selected monitor with the given monitor.
520
521 Query
522 ~~~~~
523
524 General Syntax
525 ^^^^^^^^^^^^^^
526
527 query 'OPTIONS'
528
529 Options
530 ^^^^^^^
531 *-W*, *--windows*::
532         List matching windows.
533
534 *-D*, *--desktops*::
535         List matching desktops.
536
537 *-M*, *--monitors*::
538         List matching monitors.
539
540 *-T*, *--tree*::
541         Print tree rooted at query.
542
543 *-H*, *--history*::
544         Print the history as it relates to the query.
545
546 *-S*, *--stack*::
547         Print the window stacking order.
548
549 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
550         Constrain matches to the selected monitor, desktop or window.
551
552 Restore
553 ~~~~~~~
554
555 General Syntax
556 ^^^^^^^^^^^^^^
557
558 restore 'OPTIONS'
559
560 Options
561 ^^^^^^^
562
563 *-T*, *--tree* <file_path>::
564         Load the desktop trees from the given file.
565
566 *-H*, *--history* <file_path>::
567         Load the focus history from the given file.
568
569 *-S*, *--stack* <file_path>::
570         Load the window stacking order from the given file.
571
572 Control
573 ~~~~~~~
574
575 General Syntax
576 ^^^^^^^^^^^^^^
577
578 control 'OPTIONS'
579
580 Options
581 ^^^^^^^
582
583 *--adopt-orphans*::
584         Manage all the unmanaged windows remaining from a previous session.
585
586 *--toggle-visibility*::
587         Toggle the visibility of all the windows.
588
589 *--record-history* on|off::
590         Enable or disable the recording of window focus history.
591
592 *--subscribe* (all|report|monitor|desktop|window|...)*::
593         Continuously print status information.
594
595 *--get-status*::
596         Print the current status information.
597
598 Pointer
599 ~~~~~~~
600
601 General Syntax
602 ^^^^^^^^^^^^^^
603
604 pointer 'OPTIONS'
605
606 Options
607 ^^^^^^^
608
609 *-g*, *--grab* focus|move|resize_side|resize_corner::
610         Initiate the given pointer action.
611
612 *-t*, *--track* <x> <y>::
613         Pass the pointer root coordinates for the current pointer action.
614
615 *-u*, *--ungrab*::
616         Terminate the current pointer action.
617
618 Rule
619 ~~~~
620
621 General Syntax
622 ^^^^^^^^^^^^^^
623
624 rule 'OPTIONS'
625
626 Options
627 ^^^^^^^
628
629 *-a*, *--add* <class_name>|<instance_name>|* [*-o*|*--one-shot*] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [(floating|fullscreen|pseudo_tiled|locked|sticky|private|center|follow|manage|focus|border)=(on|off)] [layer=LAYER] [split_dir=DIR] [split_ratio=RATIO]::
630         Create a new rule.
631
632 *-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
633         Remove the given rules.
634
635 *-l*, *--list* [<class_name>|<instance_name>|*]::
636         List the rules.
637
638 Config
639 ~~~~~~
640
641 General Syntax
642 ^^^^^^^^^^^^^^
643
644 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-w 'WINDOW_SEL'] <key> [<value>]::
645         Get or set the value of <key>.
646
647 Quit
648 ~~~~
649
650 General Syntax
651 ^^^^^^^^^^^^^^
652
653 quit [<status>]::
654         Quit with an optional exit status.
655
656 Exit Codes
657 ----------
658
659 If the server can't handle a message, *bspc* will return with one of the following exit codes:
660
661 1::
662         Failure.
663 2::
664         Syntax error.
665 3::
666         Unknown command.
667
668
669 Settings
670 --------
671 Colors are either '#RRGGBB' or http://en.wikipedia.org/wiki/X11_color_names[X color names], booleans are 'true', 'on', 'false' or 'off'.
672
673 All the boolean settings are 'false' by default unless stated otherwise.
674
675 Global Settings
676 ~~~~~~~~~~~~~~~
677
678 'focused_border_color'::
679         Color of the border of a focused window of a focused monitor.
680
681 'active_border_color'::
682         Color of the border of a focused window of an unfocused monitor.
683
684 'normal_border_color'::
685         Color of the border of an unfocused window.
686
687 'presel_border_color'::
688         Color of the *presel* message feedback.
689
690 'focused_locked_border_color'::
691         Color of the border of a focused locked window of a focused monitor.
692
693 'active_locked_border_color'::
694         Color of the border of a focused locked window of an unfocused monitor.
695
696 'normal_locked_border_color'::
697         Color of the border of an unfocused locked window.
698
699 'focused_sticky_border_color'::
700         Color of the border of a focused sticky window of a focused monitor.
701
702 'active_sticky_border_color'::
703         Color of the border of a focused sticky window of an unfocused monitor.
704
705 'normal_sticky_border_color'::
706         Color of the border of an unfocused sticky window.
707
708 'focused_private_border_color'::
709         Color of the border of a focused private window of a focused monitor.
710
711 'active_private_border_color'::
712         Color of the border of a focused private window of an unfocused monitor.
713
714 'normal_private_border_color'::
715         Color of the border of an unfocused private window.
716
717 'urgent_border_color'::
718         Color of the border of an urgent window.
719
720 'split_ratio'::
721         Default split ratio.
722
723 'status_prefix'::
724         Prefix prepended to each of the status lines.
725
726 'external_rules_command'::
727         External command used to retrieve rule consequences. The command will receive the the ID of the window being processed as its first argument and the class and instance names as second and third arguments. The output of that command must have the following format: *key1=value1 key2=value2 ...* (the valid key/value pairs are given in the description of the 'rule' command).
728
729 'initial_polarity'::
730         On which child should a new window be attached when adding a window on a single window tree in automatic mode. Accept the following values: *first_child*, *second_child*.
731
732 'history_aware_focus'::
733         Give priority to the focus history when focusing nodes.
734
735 'focus_by_distance'::
736         Base focusing on distances between windows.
737
738 'borderless_monocle'::
739         Remove borders of tiled windows for the *monocle* desktop layout.
740
741 'gapless_monocle'::
742         Remove gaps of tiled windows for the *monocle* desktop layout.
743
744 'leaf_monocle'::
745         Set the desktop layout to *monocle* if there's only one tiled window in the tree.
746
747 'focus_follows_pointer'::
748         Focus the window under the pointer.
749
750 'pointer_follows_focus'::
751         When focusing a window, put the pointer at its center.
752
753 'pointer_follows_monitor'::
754         When focusing a monitor, put the pointer at its center.
755
756 'auto_alternate'::
757         Interpret two consecutive identical *use* messages as an *alternate* message.
758
759 'auto_cancel'::
760         Interpret two consecutive identical *presel* messages as a *cancel* message.
761
762 'apply_floating_atom'::
763         Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
764
765 'ignore_ewmh_focus'::
766         Ignore EWMH focus requests coming from applications.
767
768 'center_pseudo_tiled'::
769         Center pseudo tiled windows into their tiling rectangles. Defaults to 'true'.
770
771 'remove_disabled_monitors'::
772         Consider disabled monitors as disconnected.
773
774 'remove_unplugged_monitors'::
775         Remove unplugged monitors.
776
777 'merge_overlapping_monitors'::
778         Merge overlapping monitors (the bigger remains).
779
780 Monitor and Desktop Settings
781 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
782
783 'top_padding'::
784 'right_padding'::
785 'bottom_padding'::
786 'left_padding'::
787         Padding space added at the sides of the monitor or desktop.
788
789 Default, Desktop Default and Window Settings
790 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
791
792 'border_width'::
793         Window border width.
794
795 Default and Desktop Settings
796 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
797
798 'window_gap'::
799         Size of the gap that separates windows.
800
801
802 Status Format
803 -------------
804
805 Status information is composed of items separated by colons.
806
807 Each item has the form '<type><value>' where '<type>' is the first character of the item.
808
809 'M<monitor_name>'::
810         Focused monitor.
811
812 'm<monitor_name>'::
813         Unfocused monitor.
814
815 'O<desktop_name>'::
816         Occupied focused desktop.
817
818 'o<desktop_name>'::
819         Occupied unfocused desktop.
820
821 'F<desktop_name>'::
822         Free focused desktop.
823
824 'f<desktop_name>'::
825         Free unfocused desktop.
826
827 'U<desktop_name>'::
828         Urgent focused desktop.
829
830 'u<desktop_name>'::
831         Urgent unfocused desktop.
832
833 'L(T|M)'::
834         Layout of the focused desktop of a monitor.
835
836 Environment Variables
837 ---------------------
838
839 'BSPWM_SOCKET'::
840         The path of the socket used for the communication between *bspc* and *bspwm*. If it isn't defined, then the following path is used: '/tmp/bspwm<host_name>_<display_number>_<screen_number>-socket'.
841
842 Panels
843 ------
844
845 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
846 * A custom panel (have a look at the files in 'examples/panel').
847
848 Key Features
849 ------------
850
851 * Configured and controlled through messages.
852 * Multiple monitors support.
853 * EWMH support.
854 * Hybrid tiling.
855
856 Contributors
857 ------------
858
859 * Steven Allen <steven at stebalien.com>
860 * Thomas Adam <thomas at xteddy.org>
861 * Ivan Kanakarakis <ivan.kanak at gmail.com>
862
863 Author
864 ------
865
866 Bastien Dejean <nihilhill at gmail.com>
867
868 Mailing List
869 ------------
870
871 bspwm at librelist.com
872
873 ////
874 vim: set ft=asciidoc:
875 ////