]> git.lizzy.rs Git - bspwm.git/commitdiff
Clarify and expand the configuration documentation
authorBastien Dejean <nihilhill@gmail.com>
Sat, 16 Mar 2013 11:29:24 +0000 (12:29 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Sat, 16 Mar 2013 11:29:24 +0000 (12:29 +0100)
README.md
bspwm.1
examples/autostart [new file with mode: 0755]
examples/panel/autostart [new file with mode: 0755]
examples/panel/panel [new file with mode: 0755]
examples/panel/panel_bar [new file with mode: 0755]
examples/panel/profile [new file with mode: 0644]
examples/panel/xinitrc [new file with mode: 0644]
examples/panel_bar [deleted file]
examples/sxhkdrc [new file with mode: 0644]

index 10b4b78d76f2dabf5bd81db411c608e4456c427b..f2472ae6de33cb23beb44208014fba0f32aad04a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,24 +1,26 @@
 ![logo](https://github.com/baskerville/bspwm/raw/master/logo/bspwm-logo.png)
 
+## Synopsis
+
+    bspwm [-v|-s STATUS_FIFO]
+
+    bspc MESSAGE [ARGUMENTS] [OPTIONS]
+
 ## Description
 
-`bspwm` is a tiling window manager based on binary space partitioning.
+`bspwm` is a tiling window manager where each window is represented as the leaf of a binary tree.
 
-The windows are represented as the leaves of a binary tree.
+It is controlled and configured via `bspc`.
 
 ## 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`.
-
-If the `BSPWM_SOCKET` environment variable is defined, it will be used as the socket path, otherwise `/tmp/bspwm-socket` is used.
+Its configuration file is `$XDG_CONFIG_HOME/bspwm/autostart`.
 
 The recommended way of defining keyboard shortcuts is to use [sxhkd](https://github.com/baskerville/sxhkd).
 
-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/`.
-
-Example configurations: [autostart](https://github.com/baskerville/bin/blob/master/bspwm_autostart) and [sxhkdrc](https://github.com/baskerville/dotfiles/blob/master/sxhkdrc).
+Example configuration files can be found in the `examples` directory.
 
 ## Splitting Modes
 
@@ -65,12 +67,6 @@ was sent beforehand:
         |            |            |         |            |            |
         +-------------------------+         +-------------------------+
 
-## Synopsis
-
-    bspwm [-v|-s STATUS_FIFO]
-
-    bspc MESSAGE [ARGUMENTS] [OPTIONS]
-
 ## Messages
 
 The syntax for the client is `bspc MESSAGE [ARGUMENTS ...]`.
@@ -221,19 +217,22 @@ Colors are either [X color names](http://en.wikipedia.org/wiki/X11_color_names)
 
 - `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`.
+
 ## Key Features
 
-- Configured and controlled through messages
-- Multiple monitors support (via *Xinerama*)
-- EWMH support (`tint2` works)
-- Automatic and manual modes
+- Configured and controlled through messages.
+- Multiple monitors support (via *Xinerama*).
+- EWMH support (`tint2` works).
+- Automatic and manual modes.
 
-## Panel
+## Panels
 
-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.).
+- 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).
 
 ## Required Libraries:
 
diff --git a/bspwm.1 b/bspwm.1
index 23671559decf5731db5d9c9df8a1e468021756eb..f6c6a6c6a39d16e2bebb44f2b5405fb754374325 100644 (file)
--- a/bspwm.1
+++ b/bspwm.1
@@ -10,7 +10,9 @@ bspwm \- Tiling window manager based on binary space partitioning
 .RI [ OPTIONS ]
 .SH DESCRIPTION
 .B bspwm
-is a tiling window manager where each window is represented as the leaf of a binary tree. It is controlled and configured via
+is a tiling window manager where each window is represented as the leaf of a binary tree.
+.P
+It is controlled and configured via
 .BR bspc .
 .SH CONFIGURATION
 .B bspwm
@@ -18,28 +20,15 @@ have only two sources of informations: the
 .B X
 events it receives and the messages it reads on a dedicated socket.
 .P
-Those messages are sent via
-.BR bspc .
-.P
-If the
-.I BSPWM_SOCKET
-environment variable is defined, it will be used as the socket path, otherwise
-.I /tmp/bspwm-socket
-is used.
+Its configuration file is
+.IR $XDG_CONFIG_HOME/bspwm/autostart .
 .P
 The recommended way of defining keyboard shortcuts is to use
 .BR sxhkd .
 .P
-The only way to configure
-.B bspwm
-is by sending
-.I set
-messages via the client, hence
-.BR bspwm \'s
-configuration file is an executable called
-.I autostart
-which lives in
-.IR $XDG_CONFIG_HOME/bspwm/ .
+Example configuration files can be found in the
+.I examples
+directory.
 .SH SPLITTING MODES
 There is only two splitting modes:
 .IR automatic " and " manual .
@@ -336,6 +325,11 @@ Prevent floating windows from being raised when they might cover other floating
 Enable shadows for floating windows via the
 .B _COMPTON_SHADOW
 property.
+.SH ENVIRONMENT VARIABLES
+.TP
+.I BSPWM_SOCKET
+The path of the socket used for the communication between
+.BR bspc " and " bspwm .
 .SH AUTHOR
 .EX
 Bastien Dejean <baskerville at lavabit.com>
diff --git a/examples/autostart b/examples/autostart
new file mode 100755 (executable)
index 0000000..fa6d446
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+FIRST_DESK=One
+REMAINING_DESKS='Two Three Four Five Six Seven Eight Nine Ten'
+bspc rename Desktop01 $FIRST_DESK
+bspc add $REMAINING_DESKS
+bspc layout monocle $FIRST_DESK $REMAINING_DESKS
+
+bspc rule Gimp Eight floating
+
+bspc set border_width  1
+bspc set window_gap    6
+
+bspc set borderless_monocle  true
+bspc set gapless_monocle     true
+bspc set adaptative_raise    true
diff --git a/examples/panel/autostart b/examples/panel/autostart
new file mode 100755 (executable)
index 0000000..66d5be4
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+panel &
diff --git a/examples/panel/panel b/examples/panel/panel
new file mode 100755 (executable)
index 0000000..f51f080
--- /dev/null
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+xtitle -sf 'T%s' > "$BSPWM_STATUS_FIFO" &
+clock 'S%H:%M' 5 > "$BSPWM_STATUS_FIFO" & 
+cat "$BSPWM_STATUS_FIFO" | panel_bar | bar
diff --git a/examples/panel/panel_bar b/examples/panel/panel_bar
new file mode 100755 (executable)
index 0000000..da3c54f
--- /dev/null
@@ -0,0 +1,47 @@
+#! /bin/sh
+#
+# Example panel for LemonBoy's bar
+
+while read -r line ; do
+    case $line in
+        S*)
+            sys_infos="\\r\\f5${line#?}\\fr"
+            ;;
+        T*)
+            title="\\c${line#?}"
+            ;;
+        *)
+            wm_infos=""
+            IFS=':'
+            set - $line
+            while [ $# -gt 0 ] ; do
+                item=$1
+                case $item in
+                    [Dd_]!*)
+                        # urgent desktop
+                        wm_infos="$wm_infos \\b3\\f0${item#??}\\fr\\br"
+                        ;;
+                    D*)
+                        # active desktop
+                        wm_infos="$wm_infos \\u5\\b2\\f9${item#??}\\fr\\br\\ur"
+                        ;;
+                    d*)
+                        # inactive but occupied desktop
+                        wm_infos="$wm_infos \\f7${item#??}\\fr"
+                        ;;
+                    _*)
+                        # inactive desktop
+                        wm_infos="$wm_infos ${item#??}"
+                        ;;
+                    L*)
+                        # layout
+                        layout=$(printf "%s" "${item#?}" | sed 's/\(.\).*/\U\1/')
+                        wm_infos="$wm_infos \\b4\\f0$layout\\br\\fr"
+                        ;;
+                esac
+                shift
+            done
+            ;;
+    esac
+    printf "%s\n" "$wm_infos $title $sys_infos"
+done
diff --git a/examples/panel/profile b/examples/panel/profile
new file mode 100644 (file)
index 0000000..cfd37fb
--- /dev/null
@@ -0,0 +1 @@
+export BSPWM_STATUS_FIFO=/tmp/bspwm-fifo
diff --git a/examples/panel/xinitrc b/examples/panel/xinitrc
new file mode 100644 (file)
index 0000000..5f37398
--- /dev/null
@@ -0,0 +1,3 @@
+[ -e "$BSPWM_STATUS_FIFO" ] && rm "$BSPWM_STATUS_FIFO"
+mkfifo "$BSPWM_STATUS_FIFO"
+exec bspwm -s "$BSPWM_STATUS_FIFO"
diff --git a/examples/panel_bar b/examples/panel_bar
deleted file mode 100755 (executable)
index 473f356..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh
-#
-# Example panel for LemonBoy's bar
-
-while read -r line ; do
-    case $line in
-        S*)
-            sys_infos="\\r\\f5${line#?}\\fr"
-            ;;
-        *)
-            wm_infos=""
-            IFS=':'
-            set - $line
-            while [ $# -gt 0 ] ; do
-                item=$1
-                case $item in
-                    [Dd_]!*)
-                        # urgent desktop
-                        wm_infos="$wm_infos \\b3\\f0${item#??}\\fr\\br"
-                        ;;
-                    D*)
-                        # active desktop
-                        wm_infos="$wm_infos \\u5\\b2\\f9${item#??}\\fr\\br\\ur"
-                        ;;
-                    d*)
-                        # inactive but occupied desktop
-                        wm_infos="$wm_infos \\f7${item#??}\\fr"
-                        ;;
-                    _*)
-                        # inactive desktop
-                        wm_infos="$wm_infos ${item#??}"
-                        ;;
-                    L*)
-                        # layout
-                        layout=$(printf "%s" "${item#?}" | sed 's/\(.\).*/\U\1/')
-                        wm_infos="$wm_infos \\b4\\f0$layout\\br\\fr"
-                        ;;
-                    W*)
-                        # window id
-                        wid=${item#?}
-                        [ $wid != 0 ] && wm_infos="$wm_infos\\c$(xdotool getwindowname 0x$wid)"
-                        ;;
-                esac
-                shift
-            done
-            ;;
-    esac
-    printf "%s\n" "$wm_infos $sys_infos"
-done
diff --git a/examples/sxhkdrc b/examples/sxhkdrc
new file mode 100644 (file)
index 0000000..c591a9a
--- /dev/null
@@ -0,0 +1,75 @@
+#
+# bspwm hotkeys
+#
+
+super + alt + Escape
+    bspc quit
+
+super + w
+    bspc close
+
+super + t
+    bspc cycle_layout
+
+super + {s,f}
+    bspc toggle_{floating,fullscreen}
+
+super + {grave,Tab}
+    bspc {alternate,alternate_desktop}
+
+super + {h,j,k,l}
+    bspc focus {left,down,up,right}
+
+super + shift + {h,j,k,l}
+    bspc shift {left,down,up,right}
+
+super + {c,shift + c}
+    bspc cycle {next,prev}
+
+super + bracket{left,right}
+    bspc cycle_desktop {prev,next}
+
+super + ctrl + {h,j,k,l}
+    bspc presel {left,down,up,right}
+
+super + alt + {h,j,k,l}
+    bspc push {left,down,up,right}
+
+super + alt + shift + {h,j,k,l}
+    bspc pull {right,up,down,left}
+
+super + ctrl + {1-9}
+    bspc ratio 0.{1-9}
+
+super + {1-9,0}
+    bspc use {One,Two,Three,Four,Five,Six,Seven,Eight,Nine,Ten}
+
+super + shift + {1-9,0}
+    bspc send_to {One,Two,Three,Four,Five,Six,Seven,Eight,Nine,Ten}
+
+super + button{1,2,3}
+    bspc grab_pointer {move,resize_side,resize_corner}
+
+super + !button{1,2,3}
+    bspc {track_pointer,track_pointer,track_pointer} %i %i
+
+super + @button{1,2,3}
+    bspc {ungrab_pointer,ungrab_pointer,ungrab_pointer}
+
+super + alt + button1
+    bspc grab_pointer focus
+
+#
+# wm independent hotkeys
+#
+
+super + Return
+    urxvt
+
+super + space
+    dmenu_run
+
+super + Escape
+    pkill -USR1 -x sxhkd
+
+ vim: set ft=sxhkdrc: