bspwm/README.md

302 lines
9.5 KiB
Markdown
Raw Normal View History

2012-09-22 23:11:57 +02:00
![logo](https://github.com/baskerville/bspwm/raw/master/resources/bspwm_logo.png)
## Description
`bspwm` is a tiling window manager based on binary space partitioning.
The windows are represented as the leaves of a binary tree.
## Configuration
`bspwm` have only two sources of informations: the X events it receives and the messages it reads on a dedicated socket.
Those messages are sent via `bspc`.
2012-09-22 23:11:57 +02:00
2012-09-29 10:40:50 +02:00
If the `BSPWM_SOCKET` environment variable is defined, it will be used as the socket path, otherwise `/tmp/bspwm-socket` is used.
2012-09-22 23:11:57 +02:00
2012-09-29 10:40:50 +02:00
The recommended way of defining keyboard shortcuts is to use `xbindkeys`.
2012-09-22 23:11:57 +02:00
2012-09-29 10:40:50 +02:00
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/`.
2012-09-22 23:11:57 +02:00
2012-09-27 10:46:04 +02:00
Example configurations: [autostart](https://github.com/baskerville/bin/blob/master/bspwm_autostart) and [xbindkeysrc](https://github.com/baskerville/dotfiles/blob/master/xbindkeysrc).
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.
set SETTING VALUE
Set the value of the given setting.
2012-10-23 13:45:47 +02:00
list
2012-09-22 23:11:57 +02:00
Output the internal representation of the window tree.
2012-10-23 13:45:47 +02:00
list_desktops [--quiet]
Perform a dump of each desktop for the current monitor.
2012-10-17 16:18:40 +02:00
list_monitors [--quiet]
Perform a dump of each monitor.
2012-10-23 13:45:47 +02:00
list_windows
2012-09-22 23:11:57 +02:00
Return the list of managed windows (i.e. their identifiers).
2012-10-23 13:45:47 +02:00
presel left|right|up|down
2012-09-22 23:11:57 +02:00
Switch to manual mode and select the splitting direction.
cancel
Switch to automatic mode.
2012-10-23 13:45:47 +02:00
ratio VALUE
Set the splitting ratio of the focused window.
focus left|right|up|down
Focus the neighbor window situated in the given direction.
2012-09-22 23:11:57 +02:00
2012-10-23 13:45:47 +02:00
shift left|right|up|down
Exchange the current window with the given neighbor.
2012-09-22 23:11:57 +02:00
2012-10-23 13:45:47 +02:00
push left|right|up|down
2012-09-22 23:11:57 +02:00
Push the fence located in the given direction.
2012-10-23 13:45:47 +02:00
pull left|right|up|down
2012-09-22 23:11:57 +02:00
Pull the fence located in the given direction.
2012-10-23 13:45:47 +02:00
cycle next|prev [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ]
2012-10-24 10:22:18 +02:00
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]
2012-10-24 10:22:18 +02:00
Focus the nearest window matching the given constraints.
2012-10-24 10:22:18 +02:00
toggle_fullscreen
Toggle the fullscreen state of the current window.
2012-09-22 23:11:57 +02:00
2012-10-24 10:22:18 +02:00
toggle_floating
Toggle the floating state of the current window.
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
close
Close the focused window.
kill
Kill the focused window.
2012-09-26 12:11:45 +02:00
2012-09-22 23:11:57 +02:00
send_to DESKTOP_NAME
Send the focused window to the given desktop.
2012-10-23 13:45:47 +02:00
send_to_monitor MONITOR_NAME
Send the focused window to the given monitor.
2012-10-17 16:18:40 +02:00
2012-09-22 23:11:57 +02:00
use DESKTOP_NAME
Select the given desktop.
2012-10-17 16:18:40 +02:00
2012-10-23 13:45:47 +02:00
use_monitor MONITOR_NAME
Select the given monitor.
2012-09-22 23:11:57 +02:00
alternate
2012-10-23 12:17:19 +02:00
Alternate between the current and the last focused window.
alternate_desktop
2012-09-22 23:11:57 +02:00
Alternate between the current and the last focused desktop.
2012-10-23 12:17:19 +02:00
alternate_monitor
Alternate between the current and the last focused monitor.
add DESKTOP_NAME ...
Make new desktops with the given names.
2012-09-22 23:11:57 +02:00
2012-10-23 13:45:47 +02:00
add_in MONITOR_NAME DESKTOP_NAME ...
Make new desktops with the given names in the given monitor.
2012-10-17 16:18:40 +02:00
rename_monitor CURRENT_NAME NEW_NAME
Rename the monitor named CURRENT_NAME to NEW_NAME.
2012-09-22 23:11:57 +02:00
rename CURRENT_NAME NEW_NAME
Rename the desktop named CURRENT_NAME to NEW_NAME.
2012-10-23 13:45:47 +02:00
cycle_monitor next|prev
2012-10-17 16:18:40 +02:00
Select the next or previous monitor.
2012-10-23 13:45:47 +02:00
cycle_desktop next|prev [--skip-free|--skip-occupied]
2012-09-22 23:11:57 +02:00
Select the next or previous desktop.
2012-10-23 13:45:47 +02:00
layout monocle|tiled
Set the layout of the current desktop.
2012-09-22 23:11:57 +02:00
2012-10-05 21:03:38 +02:00
cycle_layout
Cycle the layout of the current desktop.
2012-10-24 10:22:18 +02:00
rotate clockwise|counter_clockwise|full_cycle
Rotate the tree of the current desktop.
2012-09-22 23:11:57 +02:00
2012-10-24 10:22:18 +02:00
magnetise top_left|top_right|bottom_left|bottom_right
Move all the fences toward the given corner.
2012-09-22 23:11:57 +02:00
rule PATTERN floating
Make a new rule that will float the windows whose class name or instance name equals PATTERN.
2012-09-22 23:11:57 +02:00
adopt_orphans
Manage all the unmanaged windows remaining from a previous session.
2012-09-22 23:11:57 +02:00
reload_autostart
Reload the autostart file.
reload_settings
2012-09-27 10:46:04 +02:00
Reload the default settings.
2012-09-22 23:11:57 +02:00
reload
2012-09-27 10:46:04 +02:00
Reload the autostart file and the default settings.
2012-09-22 23:11:57 +02:00
2012-10-24 10:22:18 +02:00
quit
Quit.
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
2012-10-17 16:18:40 +02:00
focused_border_color
Color of the main border of a focused window of a focused monitor.
2012-09-22 23:11:57 +02:00
active_border_color
2012-10-17 16:18:40 +02:00
Color of the main border of a focused window of an unfocused monitor.
2012-09-22 23:11:57 +02:00
normal_border_color
Color of the main border of an unfocused window.
2012-09-22 23:11:57 +02:00
inner_border_color
Color of the inner border of a window.
outer_border_color
Color of the outer border of a window.
2012-09-22 23:11:57 +02:00
presel_border_color
Color of the *presel* message feedback.
2012-10-17 16:18:40 +02:00
focused_locked_border_color
Color of the main border of a focused locked window of a focused monitor.
2012-09-22 23:11:57 +02:00
active_locked_border_color
2012-10-17 16:18:40 +02:00
Color of the main 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 main border of an unfocused locked window.
urgent_border_color
Color of the border of an urgent window.
inner_border_width
main_border_width
outer_border_width
Width of the inner, main and outer borders.
window_gap
Value of the gap that separates windows.
top_padding
bottom_padding
left_padding
right_padding
Padding space added at the sides of the screen.
wm_name
The value that shall be used for the _NET_WM_NAME property of the root window.
2012-10-23 12:42:40 +02:00
button_modifier
The modifier mask used for mouse bindings (possible values: 'mod1' ... 'mod5').
borderless_monocle
2012-09-29 10:10:58 +02:00
Whether to remove borders for tiled windows in monocle mode.
2012-10-22 12:25:58 +02:00
focus_follows_mouse
2012-10-22 12:21:12 +02:00
Wether to focus the window under the mouse pointer.
2012-09-23 09:41:59 +02:00
## Mouse Bindings
2012-10-23 12:42:40 +02:00
button_modifier + left mouse button
2012-09-23 09:41:59 +02:00
Move the window under the pointer.
2012-10-23 12:42:40 +02:00
button_modifier + middle mouse button
2012-09-23 09:41:59 +02:00
Focus the window under the pointer.
2012-10-23 12:42:40 +02:00
button_modifier + right mouse button
2012-09-23 09:41:59 +02:00
Resize the window under the pointer (by moving one of its four corners).
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
- Triple window borders
2012-09-29 10:40:50 +02:00
## Panel
2012-09-29 10:44:58 +02:00
`dzen2` fed with the output of `ewmhstatus`. Example: [launchpanel](https://github.com/baskerville/bin/blob/master/launchpanel).
2012-09-29 10:40:50 +02:00
2012-10-24 10:22:18 +02:00
Or any EWMH compliant panel.
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)