1 ![logo](https://github.com/baskerville/bspwm/raw/master/logo/bspwm-logo.png)
5 `bspwm` is a tiling window manager based on binary space partitioning.
7 The windows are represented as the leaves of a binary tree.
11 `bspwm` have only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
13 Those messages are sent via `bspc`.
15 If the `BSPWM_SOCKET` environment variable is defined, it will be used as the socket path, otherwise `/tmp/bspwm-socket` is used.
17 The recommended way of defining keyboard shortcuts is to use [sxhkd](https://github.com/baskerville/sxhkd).
19 The only way to configure `bspwm` is by sending *set* messages via the client, hence `bspwm`'s configuration file is an executable called `autostart` which lives in `$XDG_CONFIG_HOME/bspwm/`.
21 Example configurations: [autostart](https://github.com/baskerville/bin/blob/master/bspwm_autostart) and [sxhkdrc](https://github.com/baskerville/dotfiles/blob/master/sxhkdrc).
25 There is only two splitting modes: *automatic* and *manual*.
27 The default mode is *automatic*. The *manual* mode is entered by sending a *presel* message.
29 Example: insertion of a new node (number 4) into the given tree in
39 +-------------------------+ +-------------------------+
43 | 3 |------------| --> | 4 |------------|
47 +-------------------------+ +-------------------------+
49 Same departure, but the mode is *manual*, and a `presel up` message
58 +-------------------------+ +-------------------------+
62 | 3 |------------| --> |------------|------------|
66 +-------------------------+ +-------------------------+
70 bspwm [-v|-s STATUS_FIFO]
72 bspc MESSAGE [ARGUMENTS] [OPTIONS]
76 The syntax for the client is `bspc MESSAGE [ARGUMENTS ...]`.
78 The following messages are handled:
80 - `get SETTING` — Return the value of the given setting.
82 - `set SETTING VALUE` — Set the value of the given setting.
84 - `list [DESKTOP_NAME]` — Output the internal representation of the window tree.
86 - `list_desktops [--quiet]` — Perform a dump of each desktop for the current monitor.
88 - `list_monitors [--quiet]` — Perform a dump of each monitor.
90 - `list_history [DESKTOP_NAME]` — Return the node focus history.
92 - `list_windows` — Return the list of managed windows (i.e. their identifiers).
94 - `list_rules` — Return the list of rules.
96 - `presel left|right|up|down [SPLIT_RATIO]` — Switch to manual mode and select the splitting direction.
98 - `cancel` — Switch to automatic mode.
100 - `ratio VALUE` — Set the splitting ratio of the focused window.
102 - `pad MONITOR_NAME [TOP_PADDING [RIGHT_PADDING [BOTTOM_PADDING [LEFT_PADDING]]]]` — Set the padding of the given monitor.
104 - `focus left|right|up|down` — Focus the neighbor window situated in the given direction.
106 - `shift left|right|up|down` — Exchange the current window with the given neighbor.
108 - `swap` — Swap the focused window with the last focused window.
110 - `push left|right|up|down` — Push the fence located in the given direction.
112 - `pull left|right|up|down` — Pull the fence located in the given direction.
114 - `cycle next|prev [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ]` — Focus the next or previous window matching the given constraints.
116 - `nearest older|newer [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ]` — Focus the nearest window matching the given constraints.
118 - `circulate forward|backward` — Circulate the leaves in the given direction.
120 - `grab_pointer focus|move|resize_side|resize_corner` — Begin the specified pointer action.
122 - `track_pointer ROOT_X ROOT_Y` — Pass the pointer root coordinates for the current pointer action.
124 - `ungrab_pointer` — End the current pointer action.
126 - `toggle_fullscreen` — Toggle the fullscreen state of the current window.
128 - `toggle_floating` — Toggle the floating state of the current window.
130 - `toggle_locked` — Toggle the locked state of the current window (locked windows will not respond to the `close` message).
132 - `toggle_visibility` — Toggle the visibility of all the managed windows.
134 - `close` — Close the focused window.
136 - `kill` — Kill the focused window.
138 - `send_to DESKTOP_NAME [--follow]` — Send the focused window to the given desktop.
140 - `drop_to next|prev [--follow]` — Send the focused window to the next or previous desktop.
142 - `send_to_monitor MONITOR_NAME [--follow]` — Send the focused window to the given monitor.
144 - `drop_to_monitor next|prev [--follow]` — Send the focused window to the next or previous monitor.
146 - `use DESKTOP_NAME` — Select the given desktop.
148 - `use_monitor MONITOR_NAME` — Select the given monitor.
150 - `alternate` — Alternate between the current and the last focused window.
152 - `alternate_desktop` — Alternate between the current and the last focused desktop.
154 - `alternate_monitor` — Alternate between the current and the last focused monitor.
156 - `add DESKTOP_NAME ...` — Make new desktops with the given names.
158 - `add_in MONITOR_NAME DESKTOP_NAME ...` — Make new desktops with the given names in the given monitor.
160 - `rename_monitor CURRENT_NAME NEW_NAME` — Rename the monitor named `CURRENT_NAME` to `NEW_NAME`.
162 - `rename CURRENT_NAME NEW_NAME` — Rename the desktop named `CURRENT_NAME` to `NEW_NAME`.
164 - `cycle_monitor next|prev` — Select the next or previous monitor.
166 - `cycle_desktop next|prev [--skip-free|--skip-occupied]` — Select the next or previous desktop.
168 - `layout monocle|tiled [DESKTOP_NAME ...]` — Set the layout of the given desktops (current if none given).
170 - `cycle_layout` — Cycle the layout of the current desktop.
172 - `rotate clockwise|counter_clockwise|full_cycle` — Rotate the window tree.
174 - `flip horizontal|vertical` — Flip the window tree.
176 - `rule PATTERN [DESKTOP_NAME] [floating]` — Create a new rule (`PATTERN` must match the class or instance name).
178 - `remove_rule UID ...` — Remove the rules with the given UIDs.
180 - `adopt_orphans` — Manage all the unmanaged windows remaining from a previous session.
182 - `reload_autostart` — Reload the autostart file.
184 - `reload_settings` — Reload the default settings.
186 - `restore FILE_PATH` — Restore the layout of each desktop from the content of `FILE_PATH`.
188 - `quit [EXIT_STATUS]` — Quit.
192 Colors are either [X color names](http://en.wikipedia.org/wiki/X11_color_names) or *#RRGGBB*, booleans are *true* or *false*.
194 - `focused_border_color` — Color of the border of a focused window of a focused monitor.
196 - `active_border_color` — Color of the border of a focused window of an unfocused monitor.
198 - `normal_border_color` — Color of the border of an unfocused window.
200 - `presel_border_color` — Color of the `presel` message feedback.
202 - `focused_locked_border_color` — Color of the border of a focused locked window of a focused monitor.
204 - `active_locked_border_color` — Color of the border of a focused locked window of an unfocused monitor.
206 - `normal_locked_border_color` — Color of the border of an unfocused locked window.
208 - `urgent_border_color` — Color of the border of an urgent window.
210 - `border_width` — Window border width.
212 - `window_gap` — Value of the gap that separates windows.
214 - `{top,right,bottom,left}_padding` — Padding space added at the sides of the current monitor.
216 - `wm_name` — The value that shall be used for the `_NET_WM_NAME` property of the root window.
218 - `borderless_monocle` — Whether to remove borders for tiled windows in monocle mode.
220 - `gapless_monocle` — Whether to remove gaps for tiled windows in monocle mode.
222 - `focus_follows_pointer` — Wether to focus the window under the pointer.
224 - `adaptative_raise` — Prevent floating windows from being raised when they might cover other floating windows.
226 - `apply_shadow_property` — Enable shadows for floating windows via the `_COMPTON_SHADOW` property.
230 - Configured and controlled through messages
231 - Multiple monitors support (via *Xinerama*)
232 - EWMH support (`tint2` works)
233 - Automatic and manual modes
238 - `dzen2` fed with the output of `ewmhstatus`. Example: [launchpanel](https://github.com/baskerville/bin/blob/master/launchpanel).
239 - A custom panel if the `-s` flag is used (have a look at the files in `examples/`).
240 - Any EWMH compliant panel (e.g. `tint2`, `bmpanel2`, etc.).
242 ## Required Libraries:
255 - [Ivan Kanakarakis](https://github.com/c00kiemon5ter)
259 bspwm *at* librelist *dot* com.