1 image:https://github.com/baskerville/bspwm/raw/master/logo/bspwm-logo.png[logo]
4 :man version: {revnumber}
5 :man manual: Bspwm Manual
13 bspwm - Tiling window manager based on binary space partitioning
18 *bspwm* [*-h*|*-v*|*-s* 'PANEL_FIFO'|*-p* 'PANEL_PREFIX']
20 *bspc* 'COMMAND' ['ARGUMENTS']
25 *bspwm* is a tiling window manager that represents windows as the leaves of a full binary tree.
27 It is controlled and configured via *bspc*.
34 Print the synopsis and exit.
37 Print the version and exit.
40 Write the internal state to the given FIFO.
43 Start every line written to the 'PANEL_FIFO' with the given prefix.
49 *bspwm* have only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
51 Its configuration file is '$XDG_CONFIG_HOME/bspwm/autostart'.
53 Keyboard and pointer bindings are defined with https://github.com/baskerville/sxhkd[sxhkd].
55 Example configuration files can be found in the *examples* directory.
60 New windows are inserted in the tree as close as possible to the focused window.
62 There is only two splitting modes: 'automatic' and 'manual'.
64 The default mode is 'automatic'. The 'manual' mode is entered by sending a *preselection* message.
66 Example: insertion of a new node (number 4) into the given tree in 'automatic' mode:
76 +-------------------------+ +-------------------------+
80 | 3 |------------| --> | 4 |------------|
84 +-------------------------+ +-------------------------+
87 Same departure, but the mode is 'manual', and a *window --presel up* message was sent beforehand:
96 +-------------------------+ +-------------------------+
100 | 3 |------------| --> |------------|------------|
104 +-------------------------+ +-------------------------+
110 Each monitor contains at least one desktop.
112 Each desktop contains at most one tree.
118 DIR := left | right | up | down
119 CYCLE_DIR := next | prev
125 Selectors are used to select a target window, desktop, or monitor. A selector
126 can either describe the target relatively or name it globally.
128 Descriptive (relative) selectors consist of a primary selector and any number
129 of non-conflicting modifiers as follows:
131 PRIMARY_SELECTOR[.MODIFIER]*
133 For obvious reasons, neither desktops nor monitors names may be valid
134 descriptive selectors.
142 WINDOW_SEL := <window_id>
143 | (DIR|CYCLE_DIR|biggest|last|focused)[.floating|.tiled][.like|.unlike]
150 Selects the window in the given (spacial) direction relative to the active
154 Selects the window in the given (cyclic) direction.
157 Selects the biggest window on the current desktop.
160 Selects the previously focused window on the current desktop.
163 Selects the currently focused window.
169 Only consider floating windows.
172 Only consider tiled windows.
175 Only consider windows that have the same class as the current window.
178 Only consider windows that have a different class than the current window.
181 Only consider windows in automatic splitting mode.
184 Only consider windows in manual splitting mode (see *--presel*).
192 DESKTOP_SEL := <desktop_name>
193 | (CYCLE_DIR|last|focused)[.occupied|.free]
200 Selects the desktop in the given direction relative to the active desktop.
203 Selects the previously focused desktop.
206 Selects the currently focused desktop.
212 Only consider occupied desktops.
215 Only consider free desktops.
223 MONITOR_SEL := <monitor_name>
224 | (DIR|CYCLE_DIR|last|focused)[.occupied|.free]
231 Selects the monitor in the given (spacial) direction relative to the active monitor.
234 Selects the monitor in the given (cyclic) direction relative to the active monitor.
237 Selects the previously focused monitor.
240 Selects the currently focused monitor.
246 Only consider monitors where the focused desktop is occupied.
249 Only consider monitors where the focused desktop is free.
261 window ['WINDOW_SEL'] 'OPTIONS'
265 *-f*, *--focus* ['WINDOW_SEL']::
266 Focus the selected or given window.
268 *-d*, *--to-desktop* 'DESKTOP_SEL'::
269 Send the selected window to the given desktop.
271 *-m*, *--to-monitor* 'MONITOR_SEL'::
272 Send the selected window to the given monitor.
274 *-w*, *--to-window* 'WINDOW_SEL'::
275 Transplant the selected window to the given window.
277 *-s*, *--swap* 'WINDOW_SEL'::
278 Swap the selected window with the given window.
280 *-p*, *--presel* 'DIR'|cancel::
281 Preselect the splitting area of the selected window (or cancel the preselection).
283 *-r*, *--ratio* 'RATIO'::
284 Set the splitting ratio of the selected window.
286 *-e*, *--edge* 'DIR' 'RATIO'|pull|push::
287 Set the splitting ratio (or pull, or push) the edge located in the given direction in relation to the selected window.
289 *-t*, *--toggle* floating|fullscreen|locked[=on|off]::
290 Set or toggle the given state for the selected window.
293 Close the selected window.
296 Kill the selected window.
304 desktop ['DESKTOP_SEL'] 'OPTIONS'
308 *-f*, *--focus* ['DESKTOP_SEL']::
309 Focus the selected or given desktop.
311 *-m*, *--to-monitor* 'MONITOR_SEL'::
312 Send the selected desktop to the given monitor.
314 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
315 Set or cycle the layout of the selected desktop.
317 *-n*, *--rename* <new_name>::
318 Rename the selected desktop.
321 Remove the selected desktop.
323 *-c*, *--cancel-presel*::
324 Cancel the preselection of all the windows of the selected desktop.
326 *-F*, *--flip* 'horizontal|vertical'::
327 Flip the tree of the selected desktop.
329 *-R*, *--rotate* '90|270|180'::
330 Rotate the tree of the selected desktop.
333 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
335 *-C*, *--circulate* forward|backward::
336 Circulate the leaves of the tree of the selected desktop.
344 monitor ['MONITOR_SEL'] 'OPTIONS'
348 *-f*, *--focus* ['MONITOR_SEL']::
349 Focus the selected or given monitor.
351 *-a*, *--add-desktops* <name>...::
352 Create desktops with the given names in the selected monitor.
354 *-r*, *--remove-desktops* <name>...::
355 Remove desktops with the given names.
357 *-p*, *--pad* [<top> <right> <bottom> <left>]::
358 Set or get the padding of the selected monitor.
360 *-n*, *--rename* <new_name>::
361 Rename the selected monitor.
374 List matching windows.
377 List matching desktops.
380 List matching monitors.
383 Print tree rooted at query.
386 Print the history as it relates to the query.
388 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
389 Constrain matches to the selected monitor, desktop or window.
402 *-T*, *--tree* <file_path>::
403 Load the desktop trees from the given file.
405 *-H*, *--history* <file_path>::
406 Load the focus history from the given file.
420 Manage all the unmanaged windows remaining from a previous session.
423 Write the current internal state to the panel FIFO.
425 *--toggle-visibility*::
426 Toggle the visibility of all the managed windows.
439 *-t*, *--track* <x> <y>::
440 Pass the pointer root coordinates for the current pointer action.
442 *-g*, *--grab* focus|move|resize_side|resize_corner::
443 Perform the given pointer action.
456 *-a*, *--add* <pattern> [-d 'DESKTOP_SEL'] [--floating] [--follow]::
457 Create a new rule (<pattern> must match the class or instance name).
459 *-r*, *--rm* <rule_uid>...::
460 Remove the rules with the given UIDs.
462 *-l*, *--list* [<pattern>]::
471 config <key> [<value>]::
472 Get or set the value of <key>.
481 Quit with an optional exit status.
485 Colors are either http://en.wikipedia.org/wiki/X11_color_names[X color names] or '#RRGGBB', booleans are 'true' or 'false'.
487 All the boolean settings are 'false' by default.
490 'focused_border_color'::
491 Color of the border of a focused window of a focused monitor.
493 'active_border_color'::
494 Color of the border of a focused window of an unfocused monitor.
496 'normal_border_color'::
497 Color of the border of an unfocused window.
499 'presel_border_color'::
500 Color of the *presel* message feedback.
502 'focused_locked_border_color'::
503 Color of the border of a focused locked window of a focused monitor.
505 'active_locked_border_color'::
506 Color of the border of a focused locked window of an unfocused monitor.
508 'normal_locked_border_color'::
509 Color of the border of an unfocused locked window.
511 'urgent_border_color'::
512 Color of the border of an urgent window.
518 Value of the gap that separates windows.
524 The value that shall be used for the '_NET_WM_NAME' property of the root window.
526 'borderless_monocle'::
527 Remove borders for tiled windows in monocle mode.
530 Remove gaps for tiled windows in monocle mode.
532 'focus_follows_pointer'::
533 Focus the window under the pointer.
535 'pointer_follows_monitor'::
536 When focusing a monitor, put the pointer at its center.
539 Prevent floating windows from being raised when they might cover other floating windows.
541 'apply_shadow_property'::
542 Enable shadows for floating windows via the '_COMPTON_SHADOW' property.
545 Interpret two consecutive identical *use* messages as an *alternate* message.
548 Interpret two consecutive identical *presel* messages as a *cancel* message.
550 'history_aware_focus'::
551 Give priority to the focus history when focusing nodes.
553 Environment Variables
554 ---------------------
557 The path of the socket used for the communication between *bspc* and *bspwm*.
562 * Any EWMH compliant panel (e.g.: 'tint2', 'bmpanel2', etc.).
563 * A custom panel if the '-s' flag is used (have a look at the files in 'examples/panel').
568 * Configured and controlled through messages.
569 * Multiple monitors support (via 'RandR').
570 * EWMH support (*tint2* works).
576 * Steven Allen <steven at stebalien.com>
577 * Thomas Adam <thomas at xteddy.org>
578 * Ivan Kanakarakis <ivan.kanak at gmail.com>
583 Bastien Dejean <baskerville at lavabit.com>
588 bspwm at librelist.com
591 vim: set ft=asciidoc: