Synopsis
--------
-*bspwm* [*-h*|*-v*|*-s* 'PANEL_FIFO'|*-p* 'PANEL_PREFIX']
+*bspwm* [*-h*|*-v*|*-c* 'CONFIG_PATH'|*-s* 'PANEL_FIFO'|*-p* 'PANEL_PREFIX']
*bspc* 'COMMAND' ['ARGUMENTS']
*-v*::
Print the version and exit.
+*-c* 'CONFIG_PATH'::
+ Use the given configuration file.
+
*-s* 'PANEL_FIFO'::
Write the internal state to the given FIFO.
*bspwm* have only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
-Its configuration file is '$XDG_CONFIG_HOME/bspwm/autostart'.
+The default configuration file is '$XDG_CONFIG_HOME/bspwm/bspwmrc'.
Keyboard and pointer bindings are defined with https://github.com/baskerville/sxhkd[sxhkd].
Each desktop contains at most one tree.
+Common Definitions
+------------------
-Definitions
------------
+----
+DIR := left | right | up | down
+CYCLE_DIR := next | prev
+----
+
+Selectors
+---------
+
+Selectors are used to select a target window, desktop, or monitor. A selector
+can either describe the target relatively or name it globally.
+
+Descriptive (relative) selectors consist of a primary selector and any number
+of non-conflicting modifiers as follows:
+
+ PRIMARY_SELECTOR[.MODIFIER]*
+
+For obvious reasons, neither desktops nor monitors names may be valid
+descriptive selectors.
+Window
+~~~~~~
+
+Select a window.
+
+----
+WINDOW_SEL := <window_id>
+ | (DIR|CYCLE_DIR|biggest|last|focused)[.floating|.tiled][.like|.unlike][.automatic|.manual][.urgent|.nonurgent]
----
-WINDOW_SEL := (CYCLE|DIR|biggest|focused|last)[.WINDOW_CLASS] | <window_id>
-DESKTOP_SEL := (CYCLE|focused|last)[.DESKTOP_CLASS] | <desktop_name>
-MONITOR_SEL := (CYCLE|DIR|focused|last)[.DESKTOP_CLASS] | <monitor_name>
-DESKTOP_CLASS := [occupied|free]
-WINDOW_CLASS := [floating|tiled][.][like|unlike]
+Primary Selectors
+^^^^^^^^^^^^^^^^^
+
+'DIR'::
+ Selects the window in the given (spacial) direction relative to the active
+ window.
+
+'CYCLE_DIR'::
+ Selects the window in the given (cyclic) direction.
+
+biggest::
+ Selects the biggest window on the current desktop.
+
+last::
+ Selects the previously focused window on the current desktop.
-DIR := left|right|up|down
-CYCLE := next|prev
-ROTATE := 90|270|180
-FLIP := horizontal|vertical
+focused::
+ Selects the currently focused window.
+
+Modifiers
+^^^^^^^^^
+
+floating::
+ Only consider floating windows.
+
+tiled::
+ Only consider tiled windows.
+
+like::
+ Only consider windows that have the same class as the current window.
+
+unlike::
+ Only consider windows that have a different class than the current window.
+
+automatic::
+ Only consider windows in automatic splitting mode.
+
+manual::
+ Only consider windows in manual splitting mode (see *--presel*).
+
+urgent::
+ Only consider urgent windows.
+
+nonurgent::
+ Only consider nonurgent windows.
+
+Desktop
+~~~~~~~
+
+Select a desktop.
+
+----
+DESKTOP_SEL := <desktop_name>
+ | ^<n>
+ | (CYCLE_DIR|last|focused)[.occupied|.free][.urgent|.nonurgent]
----
+Primary Selectors
+^^^^^^^^^^^^^^^^^
+
+<desktop_name>::
+ Selects the desktop with the given name.
+
+^<n>::
+ Selects the nth desktop.
+
+'CYCLE_DIR'::
+ Selects the desktop in the given direction relative to the active desktop.
+
+last::
+ Selects the previously focused desktop.
+
+focused::
+ Selects the currently focused desktop.
+
+Modifiers
+^^^^^^^^^
+
+occupied::
+ Only consider occupied desktops.
+
+free::
+ Only consider free desktops.
+
+urgent::
+ Only consider urgent desktops.
+
+nonurgent::
+ Only consider nonurgent desktops.
+
+Monitor
+~~~~~~~
+
+Select a monitor.
+
+----
+MONITOR_SEL := <monitor_name>
+ | ^<n>
+ | (DIR|CYCLE_DIR|last|primary|focused)[.occupied|.free]
+----
+
+Primary Selectors
+^^^^^^^^^^^^^^^^^
+
+<monitor_name>::
+ Selects the monitor with the given name.
+
+^<n>::
+ Selects the nth monitor.
+
+'DIR'::
+ Selects the monitor in the given (spacial) direction relative to the active monitor.
+
+'CYCLE_DIR'::
+ Selects the monitor in the given (cyclic) direction relative to the active monitor.
+
+primary::
+ Selects the primary monitor.
+
+last::
+ Selects the previously focused monitor.
+
+focused::
+ Selects the currently focused monitor.
+
+Modifiers
+^^^^^^^^^
+
+occupied::
+ Only consider monitors where the focused desktop is occupied.
+
+free::
+ Only consider monitors where the focused desktop is free.
+
+
Commands
--------
Preselect the splitting area of the selected window (or cancel the preselection).
*-r*, *--ratio* 'RATIO'::
- Set the splitting ratio of the selected window.
+ Set the splitting ratio of the selected window (0 < 'RATIO' < 1).
*-e*, *--edge* 'DIR' 'RATIO'|pull|push::
Set the splitting ratio (or pull, or push) the edge located in the given direction in relation to the selected window.
+*-R*, *--rotate* 'DIR' '90|270|180'::
+ Rotate the tree holding the edge located in the given direction in relation to the selected window.
+
*-t*, *--toggle* floating|fullscreen|locked[=on|off]::
Set or toggle the given state for the selected window.
*-m*, *--to-monitor* 'MONITOR_SEL'::
Send the selected desktop to the given monitor.
-*-l*, *--layout* 'CYCLE'|monocle|tiled::
+*-l*, *--layout* 'CYCLE_DIR'|monocle|tiled::
Set or cycle the layout of the selected desktop.
*-n*, *--rename* <new_name>::
*-c*, *--cancel-presel*::
Cancel the preselection of all the windows of the selected desktop.
-*-F*, *--flip* 'FLIP'::
+*-F*, *--flip* 'horizontal|vertical'::
Flip the tree of the selected desktop.
-*-R*, *--rotate* 'ROTATE'::
+*-R*, *--rotate* '90|270|180'::
Rotate the tree of the selected desktop.
*-B*, *--balance*::
*-n*, *--rename* <new_name>::
Rename the selected monitor.
+*-s*, *--swap* 'MONITOR_SEL'::
+ Swap the selected monitor with the given monitor.
+
Query
~~~~~
Options
^^^^^^^
-*-a*, *--add* <pattern> [-d 'DESKTOP_SEL'] [--floating] [--follow]::
+*-a*, *--add* <pattern> [-d 'DESKTOP_SEL' [--follow]] [--floating] [--focus]::
Create a new rule (<pattern> must match the class or instance name).
*-r*, *--rm* <rule_uid>...::
'split_ratio'::
Default split ratio.
-'top_padding'::
-'right_padding'::
-'bottom_padding'::
-'left_padding'::
- Padding space added at the sides of the current monitor.
-
-'wm_name'::
- The value that shall be used for the '_NET_WM_NAME' property of the root window.
+'history_aware_focus'::
+ Give priority to the focus history when focusing nodes.
'borderless_monocle'::
Remove borders for tiled windows in monocle mode.
'pointer_follows_monitor'::
When focusing a monitor, put the pointer at its center.
-'monitor_focus_fallback'::
- If the focus message fails, try to focus the nearest monitor in the same direction.
-
'adaptative_raise'::
Prevent floating windows from being raised when they might cover other floating windows.
-'apply_shadow_property'::
- Enable shadows for floating windows via the '_COMPTON_SHADOW' property.
-
'auto_alternate'::
Interpret two consecutive identical *use* messages as an *alternate* message.
'auto_cancel'::
Interpret two consecutive identical *presel* messages as a *cancel* message.
-'focus_by_distance'::
- Use window or leaf distance for focus movement.
+'apply_floating_atom'::
+ Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
-'history_aware_focus'::
- Give priority to the focus history when focusing nodes.
Environment Variables
---------------------
'BSPWM_SOCKET'::
- The path of the socket used for the communication between *bspc* and *bspwm*.
+ 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'.
Panels
------