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