2 :man version: {revnumber}
3 :man manual: Bspwm Manual
11 bspwm - Binary space partitioning window manager
16 *bspwm* [*-h*|*-v*|*-c* 'CONFIG_PATH']
18 *bspc* 'COMMAND' ['ARGUMENTS']
23 *bspwm* is a tiling window manager that represents windows as the leaves of a full binary tree.
25 It is controlled and configured via *bspc*.
32 Print the synopsis and exit.
35 Print the version and exit.
38 Use the given configuration file.
44 DIR := left | right | up | down
45 CYCLE_DIR := next | prev
51 Selectors are used to select a target window, desktop, or monitor. A selector
52 can either describe the target relatively or name it globally.
54 Descriptive (relative) selectors consist of a primary selector and any number
55 of non-conflicting modifiers as follows:
57 PRIMARY_SELECTOR[.MODIFIER]*
59 For obvious reasons, neither desktop nor monitor names may be valid descriptive
62 An exclamation mark can be prepended to certain modifiers in order to reverse their meaning.
70 WINDOW_SEL := (<window_id>|DIR|CYCLE_DIR|biggest|last|focused|older|newer)[.[!]automatic][.[!](tiled|pseudo_tiled|floating|fullscreen)][.[!](below|normal|above)][.[!]local][.[!]same_class][.[!]focused][.[!](urgent|sticky|private|locked)]
77 Selects the window in the given (spacial) direction relative to the active window.
80 Selects the window in the given (cyclic) direction.
83 Selects the biggest window on the current desktop.
86 Selects the previously focused window.
89 Selects the currently focused window.
92 Selects the window older than the focused window in the history.
95 Selects the window newer than the focused window in the history.
100 [!](tiled|pseudo_tiled|floating|fullscreen)::
101 Only consider windows having or not having the given state.
104 Only consider windows in automatic or manual insertion mode.
107 Only consider focused or unfocused windows.
110 Only consider windows that have or don't have the same class as the current window.
113 Only consider windows in or not in the current desktop.
115 [!](private|urgent|sticky|locked)::
116 Only consider windows that have or don't have the given flag set.
118 [!](below|normal|above)::
119 Only consider windows in or not in the given layer.
127 DESKTOP_SEL := (<desktop_name>|[MONITOR_SEL:](focused|^<n>)CYCLE_DIR|last|older|newer)[.[!]occupied][.[!]urgent][.[!]local]
134 Selects the desktop with the given name.
137 Selects the nth desktop.
140 Selects the desktop in the given direction relative to the active desktop.
143 Selects the previously focused desktop.
146 Selects the currently focused desktop.
149 Selects the desktop older than the focused desktop in the history.
152 Selects the desktop newer than the focused desktop in the history.
158 Only consider occupied or free desktops.
161 Only consider urgent or non urgent desktops.
164 Only consider inside or outside of the current monitor.
172 MONITOR_SEL := (<monitor_name>|^<n>|DIR|CYCLE_DIR|last|primary|focused|older|newer)[.[!]occupied]
179 Selects the monitor with the given name.
182 Selects the nth monitor.
185 Selects the monitor in the given (spacial) direction relative to the active monitor.
188 Selects the monitor in the given (cyclic) direction relative to the active monitor.
191 Selects the primary monitor.
194 Selects the previously focused monitor.
197 Selects the currently focused monitor.
200 Selects the monitor older than the focused monitor in the history.
203 Selects the monitor newer than the focused monitor in the history.
209 Only consider monitors where the focused desktop is occupied or free.
216 Its size and position are determined by the splitting type and ratio of each node of its path in the window tree.
219 Has an unrestricted size while being centered in its tiling space.
222 Can be moved/resized freely. Although it doesn't occupy any tiling space, it is still part of the window tree.
225 Fills its monitor rectangle and has no borders. It is send in the ABOVE layer by default.
232 Ignores the *window --close* message.
235 Stays in the focused desktop of its monitor.
238 Tries to keep the same tiling position/size.
241 Has its urgency hint set. This flag is set externally.
247 There's three stacking layers: BELOW, NORMAL and ABOVE.
249 In each layer, the window are orderered as follow: tiled & pseudo-tiled < fullscreen < floating.
261 window ['WINDOW_SEL'] 'OPTIONS'
265 *-f*, *--focus* ['WINDOW_SEL']::
266 Focus the selected or given window.
268 *-a*, *--activate* ['WINDOW_SEL']::
269 Activate the selected or given window.
271 *-d*, *--to-desktop* 'DESKTOP_SEL'::
272 Send the selected window to the given desktop.
274 *-m*, *--to-monitor* 'MONITOR_SEL'::
275 Send the selected window to the given monitor.
277 *-w*, *--to-window* 'WINDOW_SEL'::
278 Transplant the selected window to the given window.
280 *-s*, *--swap* 'WINDOW_SEL'::
281 Swap the selected window with the given window.
283 *-p*, *--presel* 'DIR'|cancel::
284 Preselect the splitting area of the selected window (or cancel the preselection).
286 *-r*, *--ratio* 'RATIO'::
287 Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
289 *-e*, *--edge* 'DIR' 'RATIO'|±'PIXELS'::
290 Set or change the splitting ratio of the edge located in the given direction in relation to the selected window.
292 *-R*, *--rotate* 'DIR' '90|270|180'::
293 Rotate the tree holding the edge located in the given direction in relation to the selected window.
295 *-t*, *--state* tiled|pseudo_tiled|floating|fullscreen::
296 Set the state of the selected window.
298 *-g*, *--flag* locked|sticky|private[=on|off]::
299 Set or toggle the given flag for the selected window.
301 *-l*, *--layer* below|normal|above::
302 Set the stacking layer of the selected window.
305 Close the selected window.
308 Kill the selected window.
316 desktop ['DESKTOP_SEL'] 'OPTIONS'
320 *-f*, *--focus* ['DESKTOP_SEL']::
321 Focus the selected or given desktop.
323 *-m*, *--to-monitor* 'MONITOR_SEL'::
324 Send the selected desktop to the given monitor.
326 *-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
327 Set or cycle the layout of the selected desktop.
329 *-n*, *--rename* <new_name>::
330 Rename the selected desktop.
332 *-s*, *--swap* 'DESKTOP_SEL'::
333 Swap the selected desktop with the given desktop.
335 *-b*, *--bubble* 'CYCLE_DIR'::
336 Bubble the selected desktop in the given direction.
339 Remove the selected desktop.
341 *-c*, *--cancel-presel*::
342 Cancel the preselection of all the windows of the selected desktop.
344 *-F*, *--flip* 'horizontal|vertical'::
345 Flip the tree of the selected desktop.
347 *-R*, *--rotate* '90|270|180'::
348 Rotate the tree of the selected desktop.
351 Reset the split ratios of the tree of the selected desktop.
354 Adjust the split ratios of the tree of the selected desktop so that all windows occupy the same area.
356 *-C*, *--circulate* forward|backward::
357 Circulate the leaves of the tree of the selected desktop.
366 monitor ['MONITOR_SEL'] 'OPTIONS'
370 *-f*, *--focus* ['MONITOR_SEL']::
371 Focus the selected or given monitor.
373 *-a*, *--add-desktops* <name>...::
374 Create desktops with the given names in the selected monitor.
376 *-r*, *--remove-desktops* <name>...::
377 Remove desktops with the given names.
379 *-o*, *--reorder-desktops* <name>...::
380 Reorder the desktops of the selected monitor to match the given order.
382 *-d*, *--reset-desktops* <name>...::
383 Rename, add or remove desktops depending on whether the number of given names is equal, superior or inferior to the number of existing desktops. Incidentally reset the settings of the existing desktops.
385 *-n*, *--rename* <new_name>::
386 Rename the selected monitor.
388 *-s*, *--swap* 'MONITOR_SEL'::
389 Swap the selected monitor with the given monitor.
402 List the IDs of the matching windows.
405 List the names of the matching desktops.
408 List the names of the matching monitors.
411 Print a JSON representation of the matching item.
414 Print the focus history as it relates to the query.
417 Print the window stacking order.
419 [*-m*,*--monitor* ['MONITOR_SEL']] | [*-d*,*--desktop* ['DESKTOP_SEL']] | [*-w*, *--window* ['WINDOW_SEL']]::
420 Constrain matches to the selected monitor, desktop or window.
433 *-T*, *--tree* <file_path>::
434 Load the desktop trees from the given file.
436 *-H*, *--history* <file_path>::
437 Load the focus history from the given file.
439 *-S*, *--stack* <file_path>::
440 Load the window stacking order from the given file.
454 Manage all the unmanaged windows remaining from a previous session.
456 *--toggle-visibility*::
457 Toggle the visibility of all the windows.
459 *--record-history* on|off::
460 Enable or disable the recording of window focus history.
462 *--subscribe* (all|report|monitor|desktop|window|...)*::
463 Continuously print status information. See the *EVENTS* section for the detailed description of each event.
466 Print the current status information.
479 *-g*, *--grab* focus|move|resize_side|resize_corner::
480 Initiate the given pointer action.
482 *-t*, *--track* <x> <y>::
483 Pass the pointer root coordinates for the current pointer action.
486 Terminate the current pointer action.
499 *-a*, *--add* <class_name>|<instance_name>|* [*-o*|*--one-shot*] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [state=STATE] [layer=LAYER] [split_dir=DIR] [split_ratio=RATIO] [(locked|sticky|private|center|follow|manage|focus|border)=(on|off)]::
502 *-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
503 Remove the given rules.
505 *-l*, *--list* [<class_name>|<instance_name>|*]::
514 config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-w 'WINDOW_SEL'] <key> [<value>]::
515 Get or set the value of <key>.
524 Quit with an optional exit status.
529 If the server can't handle a message, *bspc* will return with one of the following exit codes:
541 Colors are either '#RRGGBB' or http://en.wikipedia.org/wiki/X11_color_names[X color names], booleans are 'true', 'on', 'false' or 'off'.
543 All the boolean settings are 'false' by default unless stated otherwise.
548 'focused_border_color'::
549 Color of the border of a focused window of a focused monitor.
551 'active_border_color'::
552 Color of the border of a focused window of an unfocused monitor.
554 'normal_border_color'::
555 Color of the border of an unfocused window.
557 'presel_border_color'::
558 Color of the *window --presel* message feedback.
560 'focused_locked_border_color'::
561 Color of the border of a focused locked window of a focused monitor.
563 'active_locked_border_color'::
564 Color of the border of a focused locked window of an unfocused monitor.
566 'normal_locked_border_color'::
567 Color of the border of an unfocused locked window.
569 'focused_sticky_border_color'::
570 Color of the border of a focused sticky window of a focused monitor.
572 'active_sticky_border_color'::
573 Color of the border of a focused sticky window of an unfocused monitor.
575 'normal_sticky_border_color'::
576 Color of the border of an unfocused sticky window.
578 'focused_private_border_color'::
579 Color of the border of a focused private window of a focused monitor.
581 'active_private_border_color'::
582 Color of the border of a focused private window of an unfocused monitor.
584 'normal_private_border_color'::
585 Color of the border of an unfocused private window.
587 'urgent_border_color'::
588 Color of the border of an urgent window.
594 Prefix prepended to each of the status lines.
596 'external_rules_command'::
597 External command used to retrieve rule consequences. The command will receive the the ID of the window being processed as its first argument and the class and instance names as second and third arguments. The output of that command must have the following format: *key1=value1 key2=value2 ...* (the valid key/value pairs are given in the description of the 'rule' command).
600 On which child should a new window be attached when adding a window on a single window tree in automatic mode. Accept the following values: *first_child*, *second_child*.
602 'history_aware_focus'::
603 Give priority to the focus history when focusing nodes.
605 'focus_by_distance'::
606 Base focusing on distances between windows.
608 'borderless_monocle'::
609 Remove borders of tiled windows for the *monocle* desktop layout.
612 Remove gaps of tiled windows for the *monocle* desktop layout.
615 Set the desktop layout to *monocle* if there's only one tiled window in the tree.
617 'focus_follows_pointer'::
618 Focus the window under the pointer.
620 'pointer_follows_focus'::
621 When focusing a window, put the pointer at its center.
623 'pointer_follows_monitor'::
624 When focusing a monitor, put the pointer at its center.
627 Interpret consecutive identical *--focus* arguments as the *last* selector for the *monitor* and *desktop* commands.
630 Interpret consecutive identical *--presel* arguments as *--cancel-presel* option.
632 'ignore_ewmh_focus'::
633 Ignore EWMH focus requests coming from applications.
635 'center_pseudo_tiled'::
636 Center pseudo tiled windows into their tiling rectangles. Defaults to 'true'.
638 'remove_disabled_monitors'::
639 Consider disabled monitors as disconnected.
641 'remove_unplugged_monitors'::
642 Remove unplugged monitors.
644 'merge_overlapping_monitors'::
645 Merge overlapping monitors (the bigger remains).
647 Monitor and Desktop Settings
648 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
654 Padding space added at the sides of the monitor or desktop.
656 Default, Desktop Default and Window Settings
657 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
662 Default and Desktop Settings
663 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
666 Size of the gap that separates windows.
673 See the next section for the description of the format.
675 'monitor_add <monitor_name> <monitor_id> <monitor_geometry>'::
678 'monitor_rename <old_name> <new_name>'::
679 A monitor is renamed.
681 'monitor_remove <monitor_name>'::
682 A monitor is removed.
684 'monitor_focus <monitor_name>'::
685 A monitor is focused.
687 'monitor_geometry <monitor_name> <monitor_geometry>'::
688 The geometry of a monitor changed.
690 'desktop_add <monitor_name> <desktop_name>'::
693 'desktop_rename <monitor_name> <old_name> <new_name>'::
694 A desktop is renamed.
696 'desktop_remove <monitor_name> <desktop_name>'::
697 A desktop is removed.
699 'desktop_swap <src_monitor_name> <src_desktop_name> <dst_monitor_name> <dst_desktop_name>'::
700 A desktop is swapped.
702 'desktop_transfer <src_monitor_name> <src_desktop_name> <dst_monitor_name>'::
703 A desktop is transferred.
705 'desktop_focus <monitor_name> <desktop_name>'::
706 A desktop is focused.
708 'desktop_layout <monitor_name> <desktop_name> tiled|monocle'::
709 The layout of a desktop changed.
711 'window_manage <monitor_name> <desktop_name> <window_id> <ip_id>'::
714 'window_unmanage <monitor_name> <desktop_name> <window_id>'::
715 A window is unmanaged.
717 'window_swap <src_monitor_name> <src_desktop_name> <src_window_id> <dst_monitor_name> <dst_desktop_name> <dst_window_id>'::
720 'window_transfer <src_monitor_name> <src_desktop_name> <src_window_id> <dst_monitor_name> <dst_desktop_name> <dst_window_id>'::
721 A window is transferred.
723 'window_focus <monitor_name> <desktop_name> <window_id>'::
726 'window_activate <monitor_name> <desktop_name> <window_id>'::
727 A window is activated.
729 'window_geometry <monitor_name> <desktop_name> <window_id> <window_geometry>'::
730 The geometry of a window changed.
732 'window_state <monitor_name> <desktop_name> <window_id> tiled|pseudo_tiled|floating|fullscreen on|off'::
733 The state of a window changed.
735 'window_flag <monitor_name> <desktop_name> <window_id> sticky|private|locked|urgent on|off'::
736 One of the flags of a window changed.
738 'window_layer <monitor_name> <desktop_name> <window_id> below|normal|above'::
739 The layer of a window changed.
741 Please note that *bspwm* initializes monitors before it reads messages on its socket, therefore the initial monitor events can't be received.
746 Each report event message is composed of items separated by colons.
748 Each item has the form '<type><value>' where '<type>' is the first character of the item.
757 Occupied focused desktop.
760 Occupied unfocused desktop.
763 Free focused desktop.
766 Free unfocused desktop.
769 Urgent focused desktop.
772 Urgent unfocused desktop.
775 Layout of the focused desktop of a monitor.
777 Environment Variables
778 ---------------------
781 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<host_name>_<display_number>_<screen_number>-socket'.
786 * Steven Allen <steven at stebalien.com>
787 * Thomas Adam <thomas at xteddy.org>
788 * Ivan Kanakarakis <ivan.kanak at gmail.com>
793 Bastien Dejean <nihilhill at gmail.com>