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