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