]> git.lizzy.rs Git - bspwm.git/blob - doc/bspwm.1.txt
Document mode modifier.
[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]
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 Desktop
185 ~~~~~~~
186
187 Select a desktop.
188
189 ----
190 DESKTOP_SEL := <desktop_name>
191              | (CYCLE_DIR|last|focused)[.occupied|.free]
192 ----
193
194 Primary Selectors
195 ^^^^^^^^^^^^^^^^^
196
197 'CYCLE_DIR'::
198     Selects the desktop in the given direction relative to the active desktop.
199
200 last::
201     Selects the previously focused desktop.
202
203 focused::
204     Selects the currently focused desktop.
205
206 Modifiers
207 ^^^^^^^^^
208
209 occupied::
210     Only consider occupied desktops.
211
212 free::
213     Only consider free desktops.
214
215 Monitor
216 ~~~~~~~
217
218 Select a monitor.
219
220 ----
221 MONITOR_SEL := <monitor_name>
222              | (DIR|CYCLE_DIR|last|focused)[.occupied|.free]
223 ----
224
225 Primary Selectors
226 ^^^^^^^^^^^^^^^^^
227
228 'DIR'::
229     Selects the monitor in the given (spacial) direction relative to the active monitor.
230
231 'CYCLE_DIR'::
232     Selects the monitor in the given (cyclic) direction relative to the active monitor.
233
234 last::
235     Selects the previously focused monitor.
236
237 focused::
238     Selects the currently focused monitor.
239
240 Modifiers
241 ^^^^^^^^^
242
243 occupied::
244     Only consider monitors where the focused desktop is occupied.
245
246 free::
247     Only consider monitors where the focused desktop is free.
248
249
250 Commands
251 --------
252
253 Window
254 ~~~~~~
255
256 General Syntax
257 ^^^^^^^^^^^^^^
258
259 window ['WINDOW_SEL'] 'OPTIONS'
260
261 Options
262 ^^^^^^^
263 *-f*, *--focus* ['WINDOW_SEL']::
264     Focus the selected or given window.
265
266 *-d*, *--to-desktop* 'DESKTOP_SEL'::
267     Send the selected window to the given desktop.
268
269 *-m*, *--to-monitor* 'MONITOR_SEL'::
270     Send the selected window to the given monitor.
271
272 *-w*, *--to-window* 'WINDOW_SEL'::
273     Transplant the selected window to the given window.
274
275 *-s*, *--swap* 'WINDOW_SEL'::
276     Swap the selected window with the given window.
277
278 *-p*, *--presel* 'DIR'|cancel::
279     Preselect the splitting area of the selected window (or cancel the preselection).
280
281 *-r*, *--ratio* 'RATIO'::
282     Set the splitting ratio of the selected window.
283
284 *-e*, *--edge* 'DIR' 'RATIO'|pull|push::
285     Set the splitting ratio (or pull, or push) the edge located in the given direction in relation to the selected window.
286
287 *-t*, *--toggle* floating|fullscreen|locked[=on|off]::
288     Set or toggle the given state for the selected window.
289
290 *-c*, *--close*::
291     Close the selected window.
292
293 *-k*, *--kill*::
294     Kill the selected window.
295
296 Desktop
297 ~~~~~~~
298
299 General Syntax
300 ^^^^^^^^^^^^^^
301
302 desktop ['DESKTOP_SEL'] 'OPTIONS'
303
304 Options
305 ^^^^^^^
306 *-f*, *--focus* ['DESKTOP_SEL']::
307     Focus the selected or given desktop.
308
309 *-m*, *--to-monitor* 'MONITOR_SEL'::
310     Send the selected desktop to the given monitor.
311
312 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
313     Set or cycle the layout of the selected desktop.
314
315 *-n*, *--rename* <new_name>::
316     Rename the selected desktop.
317
318 *-r*, *--remove*::
319     Remove the selected desktop.
320
321 *-c*, *--cancel-presel*::
322     Cancel the preselection of all the windows of the selected desktop.
323
324 *-F*, *--flip* 'horizontal|vertical'::
325     Flip the tree of the selected desktop.
326
327 *-R*, *--rotate* '90|270|180'::
328     Rotate the tree of the selected desktop.
329
330 *-B*, *--balance*::
331     Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
332
333 *-C*, *--circulate* forward|backward::
334     Circulate the leaves of the tree of the selected desktop.
335
336 Monitor
337 ~~~~~~~
338
339 General Syntax
340 ^^^^^^^^^^^^^^
341
342 monitor ['MONITOR_SEL'] 'OPTIONS'
343
344 Options
345 ^^^^^^^
346 *-f*, *--focus* ['MONITOR_SEL']::
347     Focus the selected or given monitor.
348
349 *-a*, *--add-desktops* <name>...::
350     Create desktops with the given names in the selected monitor.
351
352 *-r*, *--remove-desktops* <name>...::
353     Remove desktops with the given names.
354
355 *-p*, *--pad* [<top> <right> <bottom> <left>]::
356     Set or get the padding of the selected monitor.
357
358 *-n*, *--rename* <new_name>::
359     Rename the selected monitor.
360
361 Query
362 ~~~~~
363
364 General Syntax
365 ^^^^^^^^^^^^^^
366
367 query 'OPTIONS'
368
369 Options
370 ^^^^^^^
371 *-W*, *--windows*::
372     List matching windows.
373
374 *-D*, *--desktops*::
375     List matching desktops.
376
377 *-M*, *--monitors*::
378     List matching monitors.
379
380 *-T*, *--tree*::
381     Print tree rooted at query.
382
383 *-H*, *--history*::
384     Print the history as it relates to the query.
385
386 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
387     Constrain matches to the selected monitor, desktop or window.
388
389 Restore
390 ~~~~~~~
391
392 General Syntax
393 ^^^^^^^^^^^^^^
394
395 restore 'OPTIONS'
396
397 Options
398 ^^^^^^^
399
400 *-T*, *--tree* <file_path>::
401     Load the desktop trees from the given file.
402
403 *-H*, *--history* <file_path>::
404     Load the focus history from the given file.
405
406 Control
407 ~~~~~~~
408
409 General Syntax
410 ^^^^^^^^^^^^^^
411
412 control 'OPTIONS'
413
414 Options
415 ^^^^^^^
416
417 *--adopt-orphans*::
418    Manage all the unmanaged windows remaining from a previous session.
419
420 *--put-status*::
421     Write the current internal state to the panel FIFO.
422
423 *--toggle-visibility*::
424     Toggle the visibility of all the managed windows.
425
426 Pointer
427 ~~~~~~~
428
429 General Syntax
430 ^^^^^^^^^^^^^^
431
432 pointer 'OPTIONS'
433
434 Options
435 ^^^^^^^
436
437 *-t*, *--track* <x> <y>::
438     Pass the pointer root coordinates for the current pointer action.
439
440 *-g*, *--grab* focus|move|resize_side|resize_corner::
441     Perform the given pointer action.
442
443 Rule
444 ~~~~
445
446 General Syntax
447 ^^^^^^^^^^^^^^
448
449 rule 'OPTIONS'
450
451 Options
452 ^^^^^^^
453
454 *-a*, *--add* <pattern> [-d 'DESKTOP_SEL'] [--floating] [--follow]::
455     Create a new rule (<pattern> must match the class or instance name).
456
457 *-r*, *--rm* <rule_uid>...::
458     Remove the rules with the given UIDs.
459
460 *-l*, *--list* [<pattern>]::
461     List the rules.
462
463 Config
464 ~~~~~~
465
466 General Syntax
467 ^^^^^^^^^^^^^^
468
469 config <key> [<value>]::
470     Get or set the value of <key>.
471
472 Quit
473 ~~~~
474
475 General Syntax
476 ^^^^^^^^^^^^^^
477
478 quit [<status>]::
479     Quit with an optional exit status.
480
481 Settings
482 --------
483 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
484
485 All the boolean settings are 'false' by default.
486
487
488 'focused_border_color'::
489     Color of the border of a focused window of a focused monitor.
490
491 'active_border_color'::
492     Color of the border of a focused window of an unfocused monitor.
493
494 'normal_border_color'::
495     Color of the border of an unfocused window.
496
497 'presel_border_color'::
498     Color of the *presel* message feedback.
499
500 'focused_locked_border_color'::
501     Color of the border of a focused locked window of a focused monitor.
502
503 'active_locked_border_color'::
504     Color of the border of a focused locked window of an unfocused monitor.
505
506 'normal_locked_border_color'::
507     Color of the border of an unfocused locked window.
508
509 'urgent_border_color'::
510     Color of the border of an urgent window.
511
512 'border_width'::
513     Window border width.
514
515 'window_gap'::
516     Value of the gap that separates windows.
517
518 'split_ratio'::
519     Default split ratio.
520
521 'wm_name'::
522     The value that shall be used for the '_NET_WM_NAME' property of the root window.
523
524 'borderless_monocle'::
525     Remove borders for tiled windows in monocle mode.
526
527 'gapless_monocle'::
528     Remove gaps for tiled windows in monocle mode.
529
530 'focus_follows_pointer'::
531     Focus the window under the pointer.
532
533 'pointer_follows_monitor'::
534     When focusing a monitor, put the pointer at its center.
535
536 'adaptative_raise'::
537     Prevent floating windows from being raised when they might cover other floating windows.
538
539 'apply_shadow_property'::
540     Enable shadows for floating windows via the '_COMPTON_SHADOW' property.
541
542 'auto_alternate'::
543     Interpret two consecutive identical *use* messages as an *alternate* message.
544
545 'auto_cancel'::
546     Interpret two consecutive identical *presel* messages as a *cancel* message.
547
548 'history_aware_focus'::
549     Give priority to the focus history when focusing nodes.
550
551 Environment Variables
552 ---------------------
553
554 'BSPWM_SOCKET'::
555   The path of the socket used for the communication between *bspc* and *bspwm*.
556
557 Panels
558 ------
559
560 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
561 * A custom panel if the '-s' flag is used (have a look at the files in 'examples/panel').
562
563 Key Features
564 ------------
565
566 * Configured and controlled through messages.
567 * Multiple monitors support (via 'RandR').
568 * EWMH support (*tint2* works).
569 * Hybrid tiling.
570
571 Contributors
572 ------------
573
574 * Steven Allen <steven at stebalien.com>
575 * Thomas Adam <thomas at xteddy.org>
576 * Ivan Kanakarakis <ivan.kanak at gmail.com>
577
578 Author
579 ------
580
581 Bastien Dejean <baskerville at lavabit.com>
582
583 Mailing List
584 ------------
585
586 bspwm at librelist.com
587
588 ////
589 vim: set ft=asciidoc:
590 ////