bspwm/README.md

323 lines
10 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
## 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
2013-01-03 20:23:52 +01:00
The recommended way of defining keyboard shortcuts is to use [sxhkd](https://github.com/baskerville/sxhkd).
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
2013-01-03 20:23:52 +01:00
Example configurations: [autostart](https://github.com/baskerville/bin/blob/master/bspwm_autostart) and [sxhkdrc](https://github.com/baskerville/dotfiles/blob/master/sxhkdrc).
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 |
| | | | | |
+-------------------------+ +-------------------------+
## Synopsis
bspwm [-v|-s STATUS_FIFO]
bspc MESSAGE [ARGUMENTS] [OPTIONS]
2012-09-22 23:11:57 +02:00
## 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-11-11 19:05:12 +01:00
list [DESKTOP_NAME]
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-12-25 19:03:35 +01:00
list_rules
Return the list of rules.
presel left|right|up|down [SPLIT_RATIO]
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.
2012-12-09 12:01:45 +01:00
pad MONITOR_NAME [TOP_PADDING [RIGHT_PADDING [BOTTOM_PADDING [LEFT_PADDING]]]]
Set the padding of the given monitor.
2012-10-23 13:45:47 +02:00
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-11-01 22:47:03 +01:00
circulate forward|backward
Circulate the leaves in the given direction.
grab_pointer move|resize|focus
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.
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
2012-12-23 12:11:08 +01:00
toggle_visibility
Toggle the visibility of all the managed windows.
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
send_to DESKTOP_NAME [--follow]
2012-09-22 23:11:57 +02:00
Send the focused window to the given desktop.
send_to_monitor MONITOR_NAME [--follow]
2012-10-23 13:45:47 +02:00
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.
layout monocle|tiled [DESKTOP_NAME ...]
Set the layout of the given desktops (current if none given).
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
rule PATTERN [DESKTOP_NAME] [floating]
Create a new rule (PATTERN must match the class or instance name).
2012-09-22 23:11:57 +02:00
2012-12-25 19:28:24 +01:00
remove_rule UID ...
Remove the rules with the given UIDs.
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
2012-12-27 22:36:06 +01:00
restore FILE_PATH
Restore the layout of each desktop from the content of FILE_PATH.
quit [EXIT_STATUS]
2012-10-24 10:22:18 +02:00
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.
2012-12-09 12:01:45 +01: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.
borderless_monocle
2012-09-29 10:10:58 +02:00
Whether to remove borders for tiled windows in monocle mode.
2012-11-04 14:10:08 +01:00
gapless_monocle
Whether to remove gaps for tiled windows in monocle mode.
focus_follows_pointer
Wether to focus the window under the pointer.
2012-10-22 12:21:12 +02:00
2012-12-13 14:00:45 +01:00
adaptative_raise
Prevent floating windows from being raised when they might cover other floating windows.
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-12-19 15:57:16 +01:00
Multiple choices:
- `dzen2` fed with the output of `ewmhstatus`. Example: [launchpanel](https://github.com/baskerville/bin/blob/master/launchpanel).
- A custom panel if the `-s` flag is used (have a look at the files in `examples/`).
- Any EWMH compliant panel (e.g. `tint2`, `bmpanel2`, etc.).
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
## Mailing List
bspwm *at* librelist *dot* com.