]> git.lizzy.rs Git - bspwm.git/blob - README.md
Remove useless `reload_*` messages
[bspwm.git] / README.md
1 ![logo](https://github.com/baskerville/bspwm/raw/master/logo/bspwm-logo.png)
2
3 ## Description
4
5 `bspwm` is a tiling window manager based on binary space partitioning.
6
7 The windows are represented as the leaves of a binary tree.
8
9 ## Configuration
10
11 `bspwm` have only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
12
13 Those messages are sent via `bspc`.
14
15 If the `BSPWM_SOCKET` environment variable is defined, it will be used as the socket path, otherwise `/tmp/bspwm-socket` is used.
16
17 The recommended way of defining keyboard shortcuts is to use [sxhkd](https://github.com/baskerville/sxhkd).
18
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/`.
20
21 Example configurations: [autostart](https://github.com/baskerville/bin/blob/master/bspwm_autostart) and [sxhkdrc](https://github.com/baskerville/dotfiles/blob/master/sxhkdrc).
22
23 ## Splitting Modes
24
25 There is only two splitting modes: *automatic* and *manual*.
26
27 The default mode is *automatic*. The *manual* mode is entered by sending a *presel* message.
28
29 Example: insertion of a new node (number 4) into the given tree in
30 *automatic* mode:
31
32                      b                                   c
33                     / \                                 / \
34                    3   a              -->              4   b
35                    ^  / \                              ^  / \
36                      2   1                               3   a
37                                                             / \
38                                                            2   1
39         +-------------------------+         +-------------------------+
40         |            |            |         |            |            |
41         |            |     2      |         |            |     3      |
42         |            |            |         |            |            |
43         |     3      |------------|   -->   |     4      |------------|
44         |     ^      |            |         |     ^      |     |      |
45         |            |     1      |         |            |  1  |  2   |
46         |            |            |         |            |     |      |
47         +-------------------------+         +-------------------------+
48
49 Same departure, but the mode is *manual*, and a `presel up` message
50 was sent beforehand:
51
52                      b                                   b
53                     / \                                 / \
54                    3   a              -->              c   a
55                    ^  / \                             / \ / \
56                      2   1                           4  3 2  1
57                                                      ^
58         +-------------------------+         +-------------------------+
59         |            |            |         |            |            |
60         |            |     2      |         |     4      |     2      |
61         |            |            |         |     ^      |            |
62         |     3      |------------|   -->   |------------|------------|
63         |     ^      |            |         |            |            |
64         |            |     1      |         |     3      |     1      |
65         |            |            |         |            |            |
66         +-------------------------+         +-------------------------+
67
68 ## Synopsis
69
70     bspwm [-v|-s STATUS_FIFO]
71
72     bspc MESSAGE [ARGUMENTS] [OPTIONS]
73
74 ## Messages
75
76 The syntax for the client is `bspc MESSAGE [ARGUMENTS ...]`.
77
78 The following messages are handled:
79
80 - `get SETTING` — Return the value of the given setting.
81
82 - `set SETTING VALUE` — Set the value of the given setting.
83
84 - `list [DESKTOP_NAME]` — Output the internal representation of the window tree.
85
86 - `list_desktops [--quiet]` — Perform a dump of each desktop for the current monitor.
87
88 - `list_monitors [--quiet]` — Perform a dump of each monitor.
89
90 - `list_windows` — Return the list of managed windows (i.e. their identifiers).
91
92 - `list_rules` — Return the list of rules.
93
94 - `presel left|right|up|down [SPLIT_RATIO]` — Switch to manual mode and select the splitting direction.
95
96 - `cancel` — Switch to automatic mode.
97
98 - `ratio VALUE` — Set the splitting ratio of the focused window.
99
100 - `pad MONITOR_NAME [TOP_PADDING [RIGHT_PADDING [BOTTOM_PADDING [LEFT_PADDING]]]]` — Set the padding of the given monitor.
101
102 - `focus left|right|up|down` — Focus the neighbor window situated in the given direction.
103
104 - `shift left|right|up|down` — Exchange the current window with the given neighbor.
105
106 - `swap` — Swap the focused window with the last focused window.
107
108 - `push left|right|up|down` — Push the fence located in the given direction.
109
110 - `pull left|right|up|down` — Pull the fence located in the given direction.
111
112 - `cycle next|prev [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ]` — Focus the next or previous window matching the given constraints.
113
114 - `nearest older|newer [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ]` — Focus the nearest window matching the given constraints.
115
116 - `circulate forward|backward` — Circulate the leaves in the given direction.
117
118 - `grab_pointer focus|move|resize_side|resize_corner` — Begin the specified pointer action.
119
120 - `track_pointer ROOT_X ROOT_Y` — Pass the pointer root coordinates for the current pointer action.
121
122 - `ungrab_pointer` — End the current pointer action.
123
124 - `toggle_fullscreen` — Toggle the fullscreen state of the current window.
125
126 - `toggle_floating` — Toggle the floating state of the current window.
127
128 - `toggle_locked` — Toggle the locked state of the current window (locked windows will not respond to the `close` message).
129
130 - `toggle_visibility` — Toggle the visibility of all the managed windows.
131
132 - `close` — Close the focused window.
133
134 - `kill` — Kill the focused window.
135
136 - `send_to DESKTOP_NAME [--follow]` — Send the focused window to the given desktop.
137
138 - `drop_to next|prev [--follow]` — Send the focused window to the next or previous desktop.
139
140 - `send_to_monitor MONITOR_NAME [--follow]` — Send the focused window to the given monitor.
141
142 - `drop_to_monitor next|prev [--follow]` — Send the focused window to the next or previous monitor.
143
144 - `use DESKTOP_NAME` — Select the given desktop.
145
146 - `use_monitor MONITOR_NAME` — Select the given monitor.
147
148 - `alternate` — Alternate between the current and the last focused window.
149
150 - `alternate_desktop` — Alternate between the current and the last focused desktop.
151
152 - `alternate_monitor` — Alternate between the current and the last focused monitor.
153
154 - `add DESKTOP_NAME ...` — Make new desktops with the given names.
155
156 - `add_in MONITOR_NAME DESKTOP_NAME ...` — Make new desktops with the given names in the given monitor.
157
158 - `rename_monitor CURRENT_NAME NEW_NAME` — Rename the monitor named `CURRENT_NAME` to `NEW_NAME`.
159
160 - `rename CURRENT_NAME NEW_NAME` — Rename the desktop named `CURRENT_NAME` to `NEW_NAME`.
161
162 - `cycle_monitor next|prev` — Select the next or previous monitor.
163
164 - `cycle_desktop next|prev [--skip-free|--skip-occupied]` — Select the next or previous desktop.
165
166 - `layout monocle|tiled [DESKTOP_NAME ...]` — Set the layout of the given desktops (current if none given).
167
168 - `cycle_layout` — Cycle the layout of the current desktop.
169
170 - `rotate clockwise|counter_clockwise|full_cycle` — Rotate the window tree.
171
172 - `flip horizontal|vertical` — Flip the window tree.
173
174 - `balance` — Adjust the split ratios so that all windows occupy the same area.
175
176 - `rule PATTERN [DESKTOP_NAME] [floating] [follow]` — Create a new rule (`PATTERN` must match the class or instance name).
177
178 - `remove_rule UID ...` — Remove the rules with the given UIDs.
179
180 - `adopt_orphans` — Manage all the unmanaged windows remaining from a previous session.
181
182 - `restore FILE_PATH` — Restore the layout of each desktop from the content of `FILE_PATH`.
183
184 - `quit [EXIT_STATUS]` — Quit.
185
186 ## Settings
187
188 Colors are either [X color names](http://en.wikipedia.org/wiki/X11_color_names) or *#RRGGBB*, booleans are *true* or *false*.
189
190 - `focused_border_color` — Color of the border of a focused window of a focused monitor.
191
192 - `active_border_color` — Color of the border of a focused window of an unfocused monitor.
193
194 - `normal_border_color` — Color of the border of an unfocused window.
195
196 - `presel_border_color` — Color of the `presel` message feedback.
197
198 - `focused_locked_border_color` — Color of the border of a focused locked window of a focused monitor.
199
200 - `active_locked_border_color` — Color of the border of a focused locked window of an unfocused monitor.
201
202 - `normal_locked_border_color` — Color of the border of an unfocused locked window.
203
204 - `urgent_border_color` — Color of the border of an urgent window.
205
206 - `border_width` — Window border width.
207
208 - `window_gap` — Value of the gap that separates windows.
209
210 - `{top,right,bottom,left}_padding` — Padding space added at the sides of the current monitor.
211
212 - `wm_name` — The value that shall be used for the `_NET_WM_NAME` property of the root window.
213
214 - `borderless_monocle` — Whether to remove borders for tiled windows in monocle mode.
215
216 - `gapless_monocle` — Whether to remove gaps for tiled windows in monocle mode.
217
218 - `focus_follows_pointer` — Wether to focus the window under the pointer.
219
220 - `adaptative_raise` — Prevent floating windows from being raised when they might cover other floating windows.
221
222 - `apply_shadow_property` — Enable shadows for floating windows via the `_COMPTON_SHADOW` property.
223
224 ## Key Features
225
226 - Configured and controlled through messages
227 - Multiple monitors support (via *Xinerama*)
228 - EWMH support (`tint2` works)
229 - Automatic and manual modes
230
231 ## Panel
232
233 Multiple choices:
234 - `dzen2` fed with the output of `ewmhstatus`. Example: [launchpanel](https://github.com/baskerville/bin/blob/master/launchpanel).
235 - A custom panel if the `-s` flag is used (have a look at the files in `examples/`).
236 - Any EWMH compliant panel (e.g. `tint2`, `bmpanel2`, etc.).
237
238 ## Required Libraries:
239
240 - libxcb
241 - xcb-util
242 - xcb-util-wm
243
244 ## Installation
245
246     make
247     make install
248
249 ## Contributors
250
251 - [Ivan Kanakarakis](https://github.com/c00kiemon5ter)
252
253 - [Thomas Adam](https://github.com/ThomasAdam)
254
255 ## Mailing List
256
257 bspwm *at* librelist *dot* com.
258
259 ## License
260
261 BSD.