]> git.lizzy.rs Git - bspwm.git/blob - doc/bspwm.1.txt
Add example bindings for history navigation
[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'|*-s* 'PANEL_FIFO'|*-p* 'PANEL_PREFIX']
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 *-s* 'PANEL_FIFO'::
41     Write the internal state to the given FIFO.
42
43 *-p* 'PANEL_PREFIX'::
44     Start every line written to the 'PANEL_FIFO' with the given prefix.
45
46
47 Configuration
48 -------------
49
50 *bspwm* has only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
51
52 The default configuration file is '$XDG_CONFIG_HOME/bspwm/bspwmrc'.
53
54 Keyboard and pointer bindings are defined with https://github.com/baskerville/sxhkd[sxhkd].
55
56 Example configuration files can be found in the *examples* directory.
57
58 Splitting Modes
59 ---------------
60
61 New windows are inserted in the tree as close as possible to the focused window.
62
63 There is only two splitting modes: 'automatic' and 'manual'.
64
65 The default mode is 'automatic'. The 'manual' mode is entered by sending a *preselection* message.
66
67 Example: insertion of a new node (number 4) into the given tree in 'automatic' mode:
68
69 ----
70               b                                   c
71              / \                                 / \
72             3   a              -->              4   b
73             ^  / \                              ^  / \
74               2   1                               3   a
75                                                      / \
76                                                     2   1
77  +-------------------------+         +-------------------------+
78  |            |            |         |            |            |
79  |            |     2      |         |            |     3      |
80  |            |            |         |            |            |
81  |     3      |------------|   -->   |     4      |------------|
82  |     ^      |            |         |     ^      |     |      |
83  |            |     1      |         |            |  1  |  2   |
84  |            |            |         |            |     |      |
85  +-------------------------+         +-------------------------+
86 ----
87
88 Same departure, but the mode is 'manual', and a *window --presel up* message was sent beforehand:
89
90 ----
91              b                                   b
92             / \                                 / \
93            3   a              -->              c   a
94            ^  / \                             / \ / \
95              2   1                           4  3 2  1
96                                              ^
97 +-------------------------+         +-------------------------+
98 |            |            |         |            |            |
99 |            |     2      |         |     4      |     2      |
100 |            |            |         |     ^      |            |
101 |     3      |------------|   -->   |------------|------------|
102 |     ^      |            |         |            |            |
103 |            |     1      |         |     3      |     1      |
104 |            |            |         |            |            |
105 +-------------------------+         +-------------------------+
106 ----
107
108 Containers
109 ----------
110
111 Each monitor contains at least one desktop.
112
113 Each desktop contains at most one tree.
114
115 Common Definitions
116 ------------------
117
118 ----
119 DIR         := left | right | up | down
120 CYCLE_DIR   := next | prev
121 ----
122
123 Selectors
124 ---------
125
126 Selectors are used to select a target window, desktop, or monitor. A selector
127 can either describe the target relatively or name it globally.
128
129 Descriptive (relative) selectors consist of a primary selector and any number
130 of non-conflicting modifiers as follows:
131
132     PRIMARY_SELECTOR[.MODIFIER]*
133
134 For obvious reasons, neither desktops nor monitors names may be valid
135 descriptive selectors.
136
137 Window
138 ~~~~~~
139
140 Select a window.
141
142 ----
143 WINDOW_SEL := <window_id> 
144             | (DIR|CYCLE_DIR|biggest|last|focused|older|newer)[.floating|.tiled][.like|.unlike][.manual][.urgent][.local]
145 ----
146
147 Primary Selectors
148 ^^^^^^^^^^^^^^^^^
149
150 'DIR'::
151     Selects the window in the given (spacial) direction relative to the active
152     window.
153
154 'CYCLE_DIR'::
155     Selects the window in the given (cyclic) direction.
156
157 biggest::
158     Selects the biggest window on the current desktop.
159
160 last::
161     Selects the previously focused window.
162
163 focused::
164     Selects the currently focused window.
165
166 older::
167     Selects the window older than the focused window in the history.
168
169 newer::
170     Selects the window newer than the focused window in the history.
171
172 Modifiers
173 ^^^^^^^^^
174
175 floating::
176     Only consider floating windows.
177
178 tiled::
179     Only consider tiled windows.
180
181 like::
182     Only consider windows that have the same class as the current window.
183     
184 unlike::
185     Only consider windows that have a different class than the current window.
186
187 manual::
188     Only consider windows in manual splitting mode (see *--presel*).
189
190 local::
191     Only consider windows of the current desktop.
192
193 urgent::
194     Only consider urgent windows.
195
196 Desktop
197 ~~~~~~~
198
199 Select a desktop.
200
201 ----
202 DESKTOP_SEL := <desktop_name>
203              | ^<n>
204              | (CYCLE_DIR|last|focused|older|newer)[.occupied|.free][.urgent][.local]
205 ----
206
207 Primary Selectors
208 ^^^^^^^^^^^^^^^^^
209
210 <desktop_name>::
211     Selects the desktop with the given name.
212
213 ^<n>::
214     Selects the nth desktop.
215
216 'CYCLE_DIR'::
217     Selects the desktop in the given direction relative to the active desktop.
218
219 last::
220     Selects the previously focused desktop.
221
222 focused::
223     Selects the currently focused desktop.
224
225 older::
226     Selects the desktop older than the focused desktop in the history.
227
228 newer::
229     Selects the desktop newer than the focused desktop in the history.
230
231 Modifiers
232 ^^^^^^^^^
233
234 occupied::
235     Only consider occupied desktops.
236
237 free::
238     Only consider free desktops.
239
240 urgent::
241     Only consider urgent desktops.
242
243 local::
244     Only consider desktops of the current monitor.
245
246 Monitor
247 ~~~~~~~
248
249 Select a monitor.
250
251 ----
252 MONITOR_SEL := <monitor_name>
253              | ^<n>
254              | (DIR|CYCLE_DIR|last|primary|focused|older|newer)[.occupied|.free]
255 ----
256
257 Primary Selectors
258 ^^^^^^^^^^^^^^^^^
259
260 <monitor_name>::
261     Selects the monitor with the given name.
262
263 ^<n>::
264     Selects the nth monitor.
265
266 'DIR'::
267     Selects the monitor in the given (spacial) direction relative to the active monitor.
268
269 'CYCLE_DIR'::
270     Selects the monitor in the given (cyclic) direction relative to the active monitor.
271
272 primary::
273     Selects the primary monitor.
274
275 last::
276     Selects the previously focused monitor.
277
278 focused::
279     Selects the currently focused monitor.
280
281 older::
282     Selects the monitor older than the focused monitor in the history.
283
284 newer::
285     Selects the monitor newer than the focused monitor in the history.
286
287 Modifiers
288 ^^^^^^^^^
289
290 occupied::
291     Only consider monitors where the focused desktop is occupied.
292
293 free::
294     Only consider monitors where the focused desktop is free.
295
296
297 Commands
298 --------
299
300 Window
301 ~~~~~~
302
303 General Syntax
304 ^^^^^^^^^^^^^^
305
306 window ['WINDOW_SEL'] 'OPTIONS'
307
308 Options
309 ^^^^^^^
310 *-f*, *--focus* ['WINDOW_SEL']::
311     Focus the selected or given window.
312
313 *-d*, *--to-desktop* 'DESKTOP_SEL'::
314     Send the selected window to the given desktop.
315
316 *-m*, *--to-monitor* 'MONITOR_SEL'::
317     Send the selected window to the given monitor.
318
319 *-w*, *--to-window* 'WINDOW_SEL'::
320     Transplant the selected window to the given window.
321
322 *-s*, *--swap* 'WINDOW_SEL'::
323     Swap the selected window with the given window.
324
325 *-p*, *--presel* 'DIR'|cancel::
326     Preselect the splitting area of the selected window (or cancel the preselection).
327
328 *-r*, *--ratio* 'RATIO'::
329     Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
330
331 *-e*, *--edge* 'DIR' 'RATIO'|pull|push::
332     Set the splitting ratio (or pull, or push) the edge located in the given direction in relation to the selected window.
333
334 *-R*, *--rotate* 'DIR' '90|270|180'::
335     Rotate the tree holding the edge located in the given direction in relation to the selected window.
336
337 *-t*, *--toggle* floating|fullscreen|locked|sticky|visible[=on|off]::
338     Set or toggle the given state for the selected window.
339
340 *-c*, *--close*::
341     Close the selected window.
342
343 *-k*, *--kill*::
344     Kill the selected window.
345
346 Desktop
347 ~~~~~~~
348
349 General Syntax
350 ^^^^^^^^^^^^^^
351
352 desktop ['DESKTOP_SEL'] 'OPTIONS'
353
354 Options
355 ^^^^^^^
356 *-f*, *--focus* ['DESKTOP_SEL']::
357     Focus the selected or given desktop.
358
359 *-m*, *--to-monitor* 'MONITOR_SEL'::
360     Send the selected desktop to the given monitor.
361
362 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
363     Set or cycle the layout of the selected desktop.
364
365 *-n*, *--rename* <new_name>::
366     Rename the selected desktop.
367
368 *-s*, *--swap* 'DESKTOP_SEL'::
369     Swap the selected desktop with the given desktop.
370
371 *-r*, *--remove*::
372     Remove the selected desktop.
373
374 *-c*, *--cancel-presel*::
375     Cancel the preselection of all the windows of the selected desktop.
376
377 *-F*, *--flip* 'horizontal|vertical'::
378     Flip the tree of the selected desktop.
379
380 *-R*, *--rotate* '90|270|180'::
381     Rotate the tree of the selected desktop.
382
383 *-B*, *--balance*::
384     Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
385
386 *-C*, *--circulate* forward|backward::
387     Circulate the leaves of the tree of the selected desktop.
388
389 Monitor
390 ~~~~~~~
391
392 General Syntax
393 ^^^^^^^^^^^^^^
394
395 monitor ['MONITOR_SEL'] 'OPTIONS'
396
397 Options
398 ^^^^^^^
399 *-f*, *--focus* ['MONITOR_SEL']::
400     Focus the selected or given monitor.
401
402 *-a*, *--add-desktops* <name>...::
403     Create desktops with the given names in the selected monitor.
404
405 *-r*, *--remove-desktops* <name>...::
406     Remove desktops with the given names.
407
408 *-n*, *--rename* <new_name>::
409     Rename the selected monitor.
410
411 *-d*, *--reset-desktops* <name>...::
412     Rename, add or remove desktops depending on whether the number of given names is equal, superior or inferior to the number of existing desktops.
413
414 *-s*, *--swap* 'MONITOR_SEL'::
415     Swap the selected monitor with the given monitor.
416
417 Tag
418 ~~~
419
420 General Syntax
421 ^^^^^^^^^^^^^^
422
423 tag 'OPTIONS'
424
425 Options
426 ^^^^^^^
427 *-l*, *--list*::
428     List the tags.
429
430 *-a*, *--add* <name>...::
431     Create tags with the given names.
432
433 *-r*, *--remove* <name>|^<n>...::
434     Remove tags with the given names or indexes.
435
436 *-e*, *--enumerate-tags* <name>...::
437     Rename, add or remove tags depending on whether the number of given names is equal, superior or inferior to the number of existing tags.
438
439 *-d*, *--desktop* 'DESKTOP_SEL'::
440     Select the given desktop as target for the *-s* and *-t* options.
441
442 *-w*, *--window* 'WINDOW_SEL'::
443     Select the given window as target for the *-s* and *-t* options.
444
445 *-s*, *--set-tags* (<name>|^<n>...)|all::
446     Set the tags of the selected object.
447
448 *-t*, *--toggle-tags* (<name>|^<n>)[=on|off]...::
449     Toggle the tags of the selected object.
450
451 Query
452 ~~~~~
453
454 General Syntax
455 ^^^^^^^^^^^^^^
456
457 query 'OPTIONS'
458
459 Options
460 ^^^^^^^
461 *-W*, *--windows*::
462     List matching windows.
463
464 *-D*, *--desktops*::
465     List matching desktops.
466
467 *-M*, *--monitors*::
468     List matching monitors.
469
470 *-T*, *--tree*::
471     Print tree rooted at query.
472
473 *-H*, *--history*::
474     Print the history as it relates to the query.
475
476 *-S*, *--stack*::
477     Print the window stacking order.
478
479 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
480     Constrain matches to the selected monitor, desktop or window.
481
482 Restore
483 ~~~~~~~
484
485 General Syntax
486 ^^^^^^^^^^^^^^
487
488 restore 'OPTIONS'
489
490 Options
491 ^^^^^^^
492
493 *-T*, *--tree* <file_path>::
494     Load the desktop trees from the given file.
495
496 *-H*, *--history* <file_path>::
497     Load the focus history from the given file.
498
499 *-S*, *--stack* <file_path>::
500     Load the window stacking order from the given file.
501
502 Control
503 ~~~~~~~
504
505 General Syntax
506 ^^^^^^^^^^^^^^
507
508 control 'OPTIONS'
509
510 Options
511 ^^^^^^^
512
513 *--adopt-orphans*::
514     Manage all the unmanaged windows remaining from a previous session.
515
516 *--put-status*::
517     Write the current internal state to the panel FIFO.
518
519 *--toggle-visibility*::
520     Toggle the visibility of all the windows.
521
522 Pointer
523 ~~~~~~~
524
525 General Syntax
526 ^^^^^^^^^^^^^^
527
528 pointer 'OPTIONS'
529
530 Options
531 ^^^^^^^
532
533 *-t*, *--track* <x> <y>::
534     Pass the pointer root coordinates for the current pointer action.
535
536 *-g*, *--grab* focus|move|resize_side|resize_corner::
537     Perform the given pointer action.
538
539 Rule
540 ~~~~
541
542 General Syntax
543 ^^^^^^^^^^^^^^
544
545 rule 'OPTIONS'
546
547 Options
548 ^^^^^^^
549
550 *-a*, *--add* <class_name>|<instance_name> [-d 'DESKTOP_SEL' [--follow]] [--tags <name>|^<n>[,...]][--floating] [--fullscreen] [--locked] [--sticky] [--focus] [--unmanage] [--one-shot]::
551     Create a new rule.
552
553 *-r*, *--remove* <name>|^<n>|tail|head...::
554     Remove the rules with the given names or indexes.
555
556 *-l*, *--list* [<name>]::
557     List the rules.
558
559 Config
560 ~~~~~~
561
562 General Syntax
563 ^^^^^^^^^^^^^^
564
565 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'] <key> [<value>]::
566     Get or set the value of <key>.
567
568 Quit
569 ~~~~
570
571 General Syntax
572 ^^^^^^^^^^^^^^
573
574 quit [<status>]::
575     Quit with an optional exit status.
576
577 Settings
578 --------
579 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
580
581 All the boolean settings are 'false' by default.
582
583 Global Settings
584 ~~~~~~~~~~~~~~~
585
586 'focused_border_color'::
587     Color of the border of a focused window of a focused monitor.
588
589 'active_border_color'::
590     Color of the border of a focused window of an unfocused monitor.
591
592 'normal_border_color'::
593     Color of the border of an unfocused window.
594
595 'presel_border_color'::
596     Color of the *presel* message feedback.
597
598 'focused_locked_border_color'::
599     Color of the border of a focused locked window of a focused monitor.
600
601 'active_locked_border_color'::
602     Color of the border of a focused locked window of an unfocused monitor.
603
604 'normal_locked_border_color'::
605     Color of the border of an unfocused locked window.
606
607 'focused_sticky_border_color'::
608     Color of the border of a focused sticky window of a focused monitor.
609
610 'active_sticky_border_color'::
611     Color of the border of a focused sticky window of an unfocused monitor.
612
613 'normal_sticky_border_color'::
614     Color of the border of an unfocused sticky window.
615
616 'urgent_border_color'::
617     Color of the border of an urgent window.
618
619 'split_ratio'::
620     Default split ratio.
621
622 'growth_factor'::
623     Intensity of the growth involved in pulling or pushing an edge.
624
625 'history_aware_focus'::
626     Give priority to the focus history when focusing nodes.
627
628 'borderless_monocle'::
629     Remove borders for tiled windows in monocle mode.
630
631 'gapless_monocle'::
632     Remove gaps for tiled windows in monocle mode.
633
634 'focus_follows_pointer'::
635     Focus the window under the pointer.
636
637 'pointer_follows_monitor'::
638     When focusing a monitor, put the pointer at its center.
639
640 'auto_alternate'::
641     Interpret two consecutive identical *use* messages as an *alternate* message.
642
643 'auto_cancel'::
644     Interpret two consecutive identical *presel* messages as a *cancel* message.
645
646 'apply_floating_atom'::
647     Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
648
649 'honor_ewmh_focus'::
650     Honor EWMH requests to focus a window.
651
652 Monitor Settings
653 ~~~~~~~~~~~~~~~~
654
655 'top_padding'::
656 'right_padding'::
657 'bottom_padding'::
658 'left_padding'::
659     Padding space added at the sides of the monitor.
660
661 Desktop Settings
662 ~~~~~~~~~~~~~~~~
663
664 'window_gap'::
665     Size of the gap that separates windows.
666
667 'border_width'::
668     Window border width.
669
670
671 Environment Variables
672 ---------------------
673
674 'BSPWM_SOCKET'::
675   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-socket'.
676
677 Panels
678 ------
679
680 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
681 * A custom panel if the '-s' flag is used (have a look at the files in 'examples/panel').
682
683 Key Features
684 ------------
685
686 * Configured and controlled through messages.
687 * Multiple monitors support (via 'RandR').
688 * EWMH support (*tint2* works).
689 * Hybrid tiling.
690
691 Contributors
692 ------------
693
694 * Steven Allen <steven at stebalien.com>
695 * Thomas Adam <thomas at xteddy.org>
696 * Ivan Kanakarakis <ivan.kanak at gmail.com>
697
698 Author
699 ------
700
701 Bastien Dejean <nihilhill at gmail.com>
702
703 Mailing List
704 ------------
705
706 bspwm at librelist.com
707
708 ////
709 vim: set ft=asciidoc:
710 ////