bspwm/README.md

261 lines
9.9 KiB
Markdown
Raw Normal View History

2012-12-05 12:45:12 +01:00
![logo](https://github.com/baskerville/bspwm/raw/master/logo/bspwm-logo.png)
2012-09-22 23:11:57 +02:00
## Synopsis
bspwm [-v|-s STATUS_FIFO]
bspc MESSAGE [ARGUMENTS] [OPTIONS]
2012-09-22 23:11:57 +02:00
## Description
`bspwm` is a tiling window manager where each window is represented as the leaf of a binary tree.
2012-09-22 23:11:57 +02:00
It is controlled and configured via `bspc`.
2012-09-22 23:11:57 +02:00
## Configuration
`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`.
2012-09-22 23:11:57 +02:00
2013-03-20 10:31:40 +01:00
Keyboard and pointer bindings are defined through [sxhkd](https://github.com/baskerville/sxhkd).
2012-09-22 23:11:57 +02:00
Example configuration files can be found in the `examples` directory.
2012-09-22 23:11:57 +02:00
## Splitting Modes
There is only two splitting modes: *automatic* and *manual*.
The default mode is *automatic*. The *manual* mode is entered by sending a *presel* message.
2012-09-27 11:02:42 +02:00
Example: insertion of a new node (number 4) into the given tree in
*automatic* mode:
2012-09-22 23:11:57 +02:00
b c
/ \ / \
3 a --> 4 b
^ / \ ^ / \
2 1 3 a
/ \
2 1
+-------------------------+ +-------------------------+
| | | | | |
| | 2 | | | 3 |
| | | | | |
| 3 |------------| --> | 4 |------------|
| ^ | | | ^ | | |
| | 1 | | | 1 | 2 |
| | | | | | |
+-------------------------+ +-------------------------+
2012-10-24 10:22:18 +02:00
Same departure, but the mode is *manual*, and a `presel up` message
2012-09-27 11:02:42 +02:00
was sent beforehand:
2012-09-22 23:11:57 +02:00
b b
/ \ / \
3 a --> c a
^ / \ / \ / \
2 1 4 3 2 1
^
+-------------------------+ +-------------------------+
| | | | | |
| | 2 | | 4 | 2 |
| | | | ^ | |
| 3 |------------| --> |------------|------------|
| ^ | | | | |
| | 1 | | 3 | 1 |
| | | | | |
+-------------------------+ +-------------------------+
## Messages
The syntax for the client is `bspc MESSAGE [ARGUMENTS ...]`.
2012-09-22 23:11:57 +02:00
The following messages are handled:
- `get SETTING` — Return the value of the given setting.
2012-09-22 23:11:57 +02:00
- `set SETTING VALUE` — Set the value of the given setting.
2012-09-22 23:11:57 +02:00
- `list [DESKTOP_NAME]` — Output the internal representation of the window tree.
2012-09-22 23:11:57 +02:00
- `list_desktops [--quiet]` — Perform a dump of each desktop for the current monitor.
2012-10-23 13:45:47 +02:00
- `list_monitors [--quiet]` — Perform a dump of each monitor.
2012-10-17 16:18:40 +02:00
- `list_windows` — Return the list of managed windows (i.e. their identifiers).
2012-09-22 23:11:57 +02:00
- `list_rules` — Return the list of rules.
2012-12-25 19:03:35 +01:00
- `presel left|right|up|down [SPLIT_RATIO]` — Switch to manual mode and select the splitting direction.
2012-09-22 23:11:57 +02:00
- `cancel` — Switch to automatic mode.
2012-09-22 23:11:57 +02:00
- `ratio VALUE` — Set the splitting ratio of the focused window.
2012-10-23 13:45:47 +02:00
- `pad MONITOR_NAME [TOP_PADDING [RIGHT_PADDING [BOTTOM_PADDING [LEFT_PADDING]]]]` — Set the padding of the given monitor.
2012-12-09 12:01:45 +01:00
- `focus left|right|up|down` — Focus the neighbor window situated in the given direction.
2012-09-22 23:11:57 +02:00
- `shift left|right|up|down` — Exchange the current window with the given neighbor.
2012-09-22 23:11:57 +02:00
- `swap` — Swap the focused window with the last focused window.
2013-01-09 21:45:18 +01:00
- `push left|right|up|down` — Push the fence located in the given direction.
2012-09-22 23:11:57 +02:00
- `pull left|right|up|down` — Pull the fence located in the given direction.
2012-09-22 23:11:57 +02:00
- `cycle next|prev [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ]` — Focus the next or previous window matching the given constraints.
2012-10-23 13:45:47 +02:00
- `nearest older|newer [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ]` — Focus the nearest window matching the given constraints.
- `circulate forward|backward` — Circulate the leaves in the given direction.
2012-11-01 22:47:03 +01:00
- `grab_pointer focus|move|resize_side|resize_corner` — Begin the specified pointer action.
- `track_pointer ROOT_X ROOT_Y` — Pass the pointer root coordinates for the current pointer action.
- `ungrab_pointer` — End the current pointer action.
- `toggle_fullscreen` — Toggle the fullscreen state of the current window.
2012-09-22 23:11:57 +02:00
- `toggle_floating` — Toggle the floating state of the current window.
2012-10-24 10:22:18 +02:00
- `toggle_locked` — Toggle the locked state of the current window (locked windows will not respond to the `close` message).
2012-10-24 10:22:18 +02:00
- `toggle_visibility` — Toggle the visibility of all the managed windows.
2012-12-23 12:11:08 +01:00
- `close` — Close the focused window.
2012-10-24 10:22:18 +02:00
- `kill` — Kill the focused window.
2012-09-26 12:11:45 +02:00
- `send_to DESKTOP_NAME [--follow]` — Send the focused window to the given desktop.
2012-09-22 23:11:57 +02:00
- `drop_to next|prev [--follow]` — Send the focused window to the next or previous desktop.
- `send_to_monitor MONITOR_NAME [--follow]` — Send the focused window to the given monitor.
2012-10-17 16:18:40 +02:00
- `drop_to_monitor next|prev [--follow]` — Send the focused window to the next or previous monitor.
- `use DESKTOP_NAME` — Select the given desktop.
2012-10-17 16:18:40 +02:00
- `use_monitor MONITOR_NAME` — Select the given monitor.
2012-10-23 13:45:47 +02:00
- `alternate` — Alternate between the current and the last focused window.
2012-10-23 12:17:19 +02:00
- `alternate_desktop` — Alternate between the current and the last focused desktop.
2012-09-22 23:11:57 +02:00
- `alternate_monitor` — Alternate between the current and the last focused monitor.
2012-10-23 12:17:19 +02:00
- `add DESKTOP_NAME ...` — Make new desktops with the given names.
2012-09-22 23:11:57 +02:00
- `add_in MONITOR_NAME DESKTOP_NAME ...` — Make new desktops with the given names in the given monitor.
2012-10-23 13:45:47 +02:00
- `rename_monitor CURRENT_NAME NEW_NAME` — Rename the monitor named `CURRENT_NAME` to `NEW_NAME`.
2012-10-17 16:18:40 +02:00
- `rename CURRENT_NAME NEW_NAME` — Rename the desktop named `CURRENT_NAME` to `NEW_NAME`.
2012-09-22 23:11:57 +02:00
- `cycle_monitor next|prev` — Select the next or previous monitor.
2012-10-17 16:18:40 +02:00
- `cycle_desktop next|prev [--skip-free|--skip-occupied]` — Select the next or previous desktop.
- `layout monocle|tiled [DESKTOP_NAME ...]` — Set the layout of the given desktops (current if none given).
2012-09-22 23:11:57 +02:00
- `cycle_layout` — Cycle the layout of the current desktop.
2012-10-05 21:03:38 +02:00
2013-02-26 12:54:01 +01:00
- `rotate clockwise|counter_clockwise|full_cycle` — Rotate the window tree.
- `flip horizontal|vertical` — Flip the window tree.
2012-09-22 23:11:57 +02:00
2013-03-10 18:28:30 +01:00
- `balance` — Adjust the split ratios so that all windows occupy the same area.
- `rule PATTERN [DESKTOP_NAME] [floating] [follow]` — Create a new rule (`PATTERN` must match the class or instance name).
2012-09-22 23:11:57 +02:00
- `remove_rule UID ...` — Remove the rules with the given UIDs.
2012-12-25 19:28:24 +01:00
- `adopt_orphans` — Manage all the unmanaged windows remaining from a previous session.
- `restore FILE_PATH` — Restore the layout of each desktop from the content of `FILE_PATH`.
2012-12-27 22:36:06 +01:00
- `quit [EXIT_STATUS]` — Quit.
2012-10-24 10:22:18 +02:00
2012-09-22 23:11:57 +02:00
## Settings
2012-10-24 10:22:18 +02:00
Colors are either [X color names](http://en.wikipedia.org/wiki/X11_color_names) or *#RRGGBB*, booleans are *true* or *false*.
2012-09-22 23:11:57 +02:00
- `focused_border_color` — Color of the border of a focused window of a focused monitor.
2012-10-17 16:18:40 +02:00
- `active_border_color` — Color of the border of a focused window of an unfocused monitor.
2012-09-22 23:11:57 +02:00
- `normal_border_color` — Color of the border of an unfocused window.
- `presel_border_color` — Color of the `presel` message feedback.
2012-09-22 23:11:57 +02:00
- `focused_locked_border_color` — Color of the border of a focused locked window of a focused monitor.
2012-10-17 16:18:40 +02:00
- `active_locked_border_color` — Color of the border of a focused locked window of an unfocused monitor.
2012-09-22 23:11:57 +02:00
- `normal_locked_border_color` — Color of the border of an unfocused locked window.
2012-09-22 23:11:57 +02:00
- `urgent_border_color` — Color of the border of an urgent window.
2012-09-22 23:11:57 +02:00
- `border_width` — Window border width.
2012-09-22 23:11:57 +02:00
- `window_gap` — Value of the gap that separates windows.
2012-09-22 23:11:57 +02:00
- `{top,right,bottom,left}_padding` — Padding space added at the sides of the current monitor.
2012-09-22 23:11:57 +02:00
- `wm_name` — The value that shall be used for the `_NET_WM_NAME` property of the root window.
2012-09-22 23:11:57 +02:00
- `borderless_monocle` — Whether to remove borders for tiled windows in monocle mode.
2012-09-29 10:10:58 +02:00
- `gapless_monocle` — Whether to remove gaps for tiled windows in monocle mode.
2012-11-04 14:10:08 +01:00
2013-03-21 11:50:38 +01:00
- `focus_follows_pointer` — Whether to focus the window under the pointer.
2013-03-04 11:25:12 +01:00
- `adaptative_raise` — Prevent floating windows from being raised when they might cover other floating windows.
2012-12-13 14:00:45 +01:00
- `apply_shadow_property` — Enable shadows for floating windows via the `_COMPTON_SHADOW` property.
## Environment Variables
- `BSPWM_SOCKET` — The path of the socket used for the communication between `bspc` and `bspwm`.
2012-10-24 10:22:18 +02:00
## Key Features
- Configured and controlled through messages.
- Multiple monitors support (via *Xinerama*).
- EWMH support (`tint2` works).
- Automatic and manual modes.
2012-10-24 10:22:18 +02:00
## Panels
2012-09-29 10:40:50 +02:00
2012-12-19 15:57:16 +01:00
- Any EWMH compliant panel (e.g. `tint2`, `bmpanel2`, etc.).
- A custom panel if the `-s` flag is used (have a look at the files in `examples/panel`).
- `dzen2` fed with the output of `ewmhstatus`. Example: [launchpanel](https://github.com/baskerville/bin/blob/master/launchpanel).
2012-10-24 10:22:18 +02:00
2012-09-23 10:38:23 +02:00
## Required Libraries:
2012-10-23 17:20:52 +02:00
- libxcb
- xcb-util
- xcb-util-wm
2012-09-23 10:38:23 +02:00
## Installation
make
make install
2012-10-23 17:20:52 +02:00
## Contributors
- [Ivan Kanakarakis](https://github.com/c00kiemon5ter)
2012-12-18 12:43:37 +01:00
2013-03-10 23:09:11 +01:00
- [Thomas Adam](https://github.com/ThomasAdam)
2012-12-18 12:43:37 +01:00
## Mailing List
bspwm *at* librelist *dot* com.
2013-02-14 20:05:01 +01:00
## License
BSD.