]> git.lizzy.rs Git - bspwm.git/blobdiff - doc/bspwm.1.asciidoc
Fix link to Linux coding style
[bspwm.git] / doc / bspwm.1.asciidoc
index 5633716d3581bd917026a4dc12c1b3ac12c96ae9..46a2b829bd2d28244c79e80b09cb99dccc485786 100644 (file)
@@ -53,12 +53,16 @@ Selectors
 Selectors are used to select a target node, desktop, or monitor. A selector
 can either describe the target relatively or name it globally.
 
-Selectors consist of a descriptor and any number of non-conflicting modifiers
-as follows:
+Selectors consist of an optional reference, a descriptor and any number of
+non-conflicting modifiers as follows:
 
-       DESCRIPTOR(.MODIFIER)*
+       [REFERENCE#]DESCRIPTOR(.MODIFIER)*
 
-An exclamation mark can be prepended to certain modifiers in order to reverse their meaning.
+The relative targets are computed in relation to the given reference (the
+default reference value is *focused*).
+
+An exclamation mark can be prepended to any modifier in order to reverse its
+meaning.
 
 Node
 ~~~~
@@ -66,7 +70,7 @@ Node
 Select a node.
 
 ----
-NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[.[!]focused][.[!]automatic][.[!]local][.[!]leaf][.[!]window][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class]
+NODE_SEL := [NODE_SEL#](DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[.[!]focused][.[!]automatic][.[!]local][.[!]active][.[!]leaf][.[!]window][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class][.[!]descendant_of][.[!]ancestor_of]
 
 STATE := tiled|pseudo_tiled|floating|fullscreen
 
@@ -83,22 +87,22 @@ Descriptors
 ^^^^^^^^^^^
 
 'DIR'::
-       Selects the window in the given (spacial) direction relative to the active node.
+       Selects the window in the given (spacial) direction relative to the reference node.
 
 'CYCLE_DIR'::
-       Selects the window in the given (cyclic) direction.
+       Selects the window in the given (cyclic) direction relative to the reference node.
 
 'PATH'::
        Selects the node at the given path.
 
 last::
-       Selects the previously focused node.
+       Selects the previously focused node relative to the reference node.
 
 older::
-       Selects the node older than the focused node in the history.
+       Selects the node older than the reference node in the history.
 
 newer::
-       Selects the node newer than the focused node in the history.
+       Selects the node newer than the reference node in the history.
 
 focused::
        Selects the currently focused node.
@@ -107,7 +111,7 @@ pointed::
        Selects the window under the pointer.
 
 biggest::
-       Selects the biggest window on the current desktop.
+       Selects the biggest window.
 
 <node_id>::
        Selects the node with the given ID.
@@ -115,7 +119,7 @@ biggest::
 Path Jumps
 ^^^^^^^^^^
 
-The initial node is the focused node (or the root if the path starts with '/') of the focused desktop (or the selected desktop if the path has a 'DESKTOP_SEL' prefix).
+The initial node is the focused node (or the root if the path starts with '/') of the reference desktop (or the selected desktop if the path has a 'DESKTOP_SEL' prefix).
 
 1|first::
        Jumps to the first child.
@@ -139,10 +143,13 @@ Modifiers
        Only consider focused or unfocused nodes.
 
 [!]automatic::
-       Only consider nodes in automatic or manual insertion mode.
+       Only consider nodes in automatic or manual insertion mode. See also *--presel-dir* under *Node* in the *DOMAINS* section below.
 
 [!]local::
-       Only consider nodes in or not in the current desktop.
+       Only consider nodes in or not in the reference desktop.
+
+[!]active::
+       Only consider nodes in or not in the active desktop of their monitor.
 
 [!]leaf::
        Only consider leaves or internal nodes.
@@ -154,7 +161,13 @@ Modifiers
        Only consider windows in or not in the given state.
 
 [!]same_class::
-       Only consider windows that have or don't have the same class as the current window.
+       Only consider windows that have or don't have the same class as the reference window.
+
+[!]descendant_of::
+       Only consider nodes that are or aren't descendants of the reference node.
+
+[!]ancestor_of::
+       Only consider nodes that are or aren't ancestors of the reference node.
 
 [!](hidden|sticky|private|locked|urgent)::
        Only consider windows that have or don't have the given flag set.
@@ -168,23 +181,23 @@ Desktop
 Select a desktop.
 
 ----
-DESKTOP_SEL := (CYCLE_DIR|last|older|newer|[MONITOR_SEL:](focused|^<n>)|<desktop_id>|<desktop_name>)[.[!]occupied][.[!]focused][.[!]urgent][.[!]local]
+DESKTOP_SEL := [DESKTOP_SEL#](CYCLE_DIR|last|older|newer|[MONITOR_SEL:](focused|^<n>)|<desktop_id>|<desktop_name>)[.[!]occupied][.[!]focused][.[!]urgent][.[!]local]
 ----
 
 Descriptors
 ^^^^^^^^^^^
 
 'CYCLE_DIR'::
-       Selects the desktop in the given direction relative to the active desktop.
+       Selects the desktop in the given direction relative to the reference desktop.
 
 last::
-       Selects the previously focused desktop.
+       Selects the previously focused desktop relative to the reference desktop.
 
 older::
-       Selects the desktop older than the focused desktop in the history.
+       Selects the desktop older than the reference desktop in the history.
 
 newer::
-       Selects the desktop newer than the focused desktop in the history.
+       Selects the desktop newer than the reference desktop in the history.
 
 focused::
        Selects the currently focused desktop.
@@ -211,7 +224,7 @@ Modifiers
        Only consider urgent or non urgent desktops.
 
 [!]local::
-       Only consider inside or outside of the current monitor.
+       Only consider desktops inside or outside of the reference monitor.
 
 Monitor
 ~~~~~~~
@@ -219,26 +232,26 @@ Monitor
 Select a monitor.
 
 ----
-MONITOR_SEL := (DIR|CYCLE_DIR|last|older|newer|focused|primary|^<n>|<monitor_id>|<monitor_name>)[.[!]occupied][.[!]focused]
+MONITOR_SEL := [MONITOR_SEL#](DIR|CYCLE_DIR|last|older|newer|focused|primary|^<n>|<monitor_id>|<monitor_name>)[.[!]occupied][.[!]focused]
 ----
 
 Descriptors
 ^^^^^^^^^^^
 
 'DIR'::
-       Selects the monitor in the given (spacial) direction relative to the active monitor.
+       Selects the monitor in the given (spacial) direction relative to the reference monitor.
 
 'CYCLE_DIR'::
-       Selects the monitor in the given (cyclic) direction relative to the active monitor.
+       Selects the monitor in the given (cyclic) direction relative to the reference monitor.
 
 last::
-       Selects the previously focused monitor.
+       Selects the previously focused monitor relative to the reference monitor.
 
 older::
-       Selects the monitor older than the focused monitor in the history.
+       Selects the monitor older than the reference monitor in the history.
 
 newer::
-       Selects the monitor newer than the focused monitor in the history.
+       Selects the monitor newer than the reference monitor in the history.
 
 focused::
        Selects the currently focused monitor.
@@ -320,6 +333,8 @@ General Syntax
 
 node ['NODE_SEL'] 'COMMANDS'
 
+If 'NODE_SEL' is omitted, *focused* is assumed.
+
 Commands
 ^^^^^^^^
 *-f*, *--focus* ['NODE_SEL']::
@@ -341,7 +356,7 @@ Commands
        Swap the selected node with the given node.
 
 *-p*, *--presel-dir* \[~]'DIR'|cancel::
-       Preselect the splitting area of the selected node (or cancel the preselection). If *~* is prepended to 'DIR' and the current preselection direction matches 'DIR', then the argument is interpreted as *cancel*.
+       Preselect the splitting area of the selected node (or cancel the preselection). If *~* is prepended to 'DIR' and the current preselection direction matches 'DIR', then the argument is interpreted as *cancel*. A node with a preselected area is said to be in "manual insertion mode".
 
 *-o*, *--presel-ratio* 'RATIO'::
        Set the splitting ratio of the preselection area.
@@ -352,7 +367,7 @@ Commands
 *-z*, *--resize* top|left|bottom|right|top_left|top_right|bottom_right|bottom_left 'dx' 'dy'::
        Resize the selected window by moving the given handle by 'dx' pixels horizontally and 'dy' pixels vertically.
 
-*-r*, *--ratio* 'RATIO'|(+|-)'PIXELS'::
+*-r*, *--ratio* 'RATIO'|(+|-)('PIXELS'|'FRACTION')::
        Set the splitting ratio of the selected node (0 < 'RATIO' < 1).
 
 *-R*, *--rotate* '90|270|180'::
@@ -396,6 +411,8 @@ General Syntax
 
 desktop ['DESKTOP_SEL'] 'COMMANDS'
 
+If 'DESKTOP_SEL' is omitted, *focused* is assumed.
+
 COMMANDS
 ^^^^^^^^
 *-f*, *--focus* ['DESKTOP_SEL']::
@@ -430,11 +447,16 @@ General Syntax
 
 monitor ['MONITOR_SEL'] 'COMMANDS'
 
+If 'MONITOR_SEL' is omitted, *focused* is assumed.
+
 Commands
 ^^^^^^^^
 *-f*, *--focus* ['MONITOR_SEL']::
        Focus the selected or given monitor.
 
+*-s*, *--swap* 'MONITOR_SEL'::
+       Swap the selected monitor with the given monitor.
+
 *-a*, *--add-desktops* <name>...::
        Create desktops with the given names in the selected monitor.
 
@@ -450,9 +472,6 @@ Commands
 *-n*, *--rename* <new_name>::
        Rename the selected monitor.
 
-*-s*, *--swap* 'MONITOR_SEL'::
-       Swap the selected monitor with the given monitor.
-
 *-r*, *--remove*::
        Remove the selected monitor.
 
@@ -467,14 +486,16 @@ query 'COMMANDS' ['OPTIONS']
 Commands
 ^^^^^^^^
 
-*-N*, *--nodes*::
+The optional selectors are references.
+
+*-N*, *--nodes* ['NODE_SEL']::
        List the IDs of the matching nodes.
 
-*-D*, *--desktops*::
-       List the IDs of the matching desktops.
+*-D*, *--desktops* ['DESKTOP_SEL']::
+       List the IDs (or names) of the matching desktops.
 
-*-M*, *--monitors*::
-       List the IDs of the matching monitors.
+*-M*, *--monitors* ['MONITOR_SEL']::
+       List the IDs (or names) of the matching monitors.
 
 *-T*, *--tree*::
        Print a JSON representation of the matching item.
@@ -487,6 +508,9 @@ Options
 *-n*, *--node* ['NODE_SEL']::
        Constrain matches to the selected monitor, desktop or node. The descriptor can be omitted for '-M', '-D' and '-N'.
 
+*--names*::
+       Print names instead of IDs.
+
 Wm
 ~~
 
@@ -542,8 +566,8 @@ Config
 General Syntax
 ^^^^^^^^^^^^^^
 
-config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-n 'NODE_SEL'] <key> [<value>]::
-       Get or set the value of <key>.
+config [-m 'MONITOR_SEL'|-d 'DESKTOP_SEL'|-n 'NODE_SEL'] <setting> [<value>]::
+       Get or set the value of <setting>.
 
 Subscribe
 ~~~~~~~~~
@@ -595,14 +619,11 @@ Global Settings
        Prefix prepended to each of the status lines.
 
 'external_rules_command'::
-       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).
+       External command used to retrieve rule consequences. The command will receive the following arguments: window ID, class and instance names, monitor, desktop and node selectors. 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).
 
 'initial_polarity'::
        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*.
 
-'history_aware_focus'::
-       Give priority to the focus history when focusing nodes.
-
 'borderless_monocle'::
        Remove borders of tiled windows for the *monocle* desktop layout.
 
@@ -615,17 +636,23 @@ Global Settings
 'single_monocle'::
        Set the desktop layout to *monocle* if there's only one tiled window in the tree.
 
+'pointer_motion_interval'::
+       The minimum interval, in milliseconds, between two motion notify events.
+
 'pointer_modifier'::
        Keyboard modifier used for moving or resizing windows. Accept the following values: *shift*, *control*, *lock*, *mod1*, *mod2*, *mod3*, *mod4*, *mod5*.
 
 'pointer_action1'::
 'pointer_action2'::
 'pointer_action3'::
-       Action performed when pressing 'pointer_modifier' + 'button<n>'. Accept the following values: *move*, *resize_side*, *resize_corner*, *focus*.
+       Action performed when pressing 'pointer_modifier' + 'button<n>'. Accept the following values: *move*, *resize_side*, *resize_corner*, *focus*, *none*.
 
 'click_to_focus'::
        Focus a window (or a monitor) by clicking it.
 
+'swallow_first_click'::
+       Don't replay the click that makes a window focused when 'click_to_focus' is set.
+
 'focus_follows_pointer'::
        Focus the window under the pointer.
 
@@ -775,6 +802,9 @@ Events
 'node_layer <monitor_id> <desktop_id> <node_id> below|normal|above'::
        The layer of a window changed.
 
+'pointer_action <monitor_id> <desktop_id> <node_id> move|resize_corner|resize_side begin|end'::
+       A pointer action occured.
+
 Please note that *bspwm* initializes monitors before it reads messages on its socket, therefore the initial monitor events can't be received.
 
 Report Format