aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm/autostart
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2014-09-29 11:32:59 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2014-09-29 11:32:59 +0200
commit46fa9738887f81b3b1b08ccace52f9e63c3f54a5 (patch)
tree97b9e3835bf35767e3d657f7ecac233f05b9f99b /.config/herbstluftwm/autostart
parentc830864c63c362b58adec46121c459578fcead01 (diff)
parent3336b67f7b1daff9fa4e0f8099947b43391e0f8f (diff)
downloaddotfiles-46fa9738887f81b3b1b08ccace52f9e63c3f54a5.tar.gz
dotfiles-46fa9738887f81b3b1b08ccace52f9e63c3f54a5.tar.bz2
dotfiles-46fa9738887f81b3b1b08ccace52f9e63c3f54a5.zip
Added clickable areas
Diffstat (limited to '.config/herbstluftwm/autostart')
-rwxr-xr-x.config/herbstluftwm/autostart40
1 files changed, 25 insertions, 15 deletions
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
index 0fb9ea7..b8f8898 100755
--- a/.config/herbstluftwm/autostart
+++ b/.config/herbstluftwm/autostart
@@ -2,6 +2,10 @@
2 2
3# this is a simple config for herbstluftwm 3# this is a simple config for herbstluftwm
4 4
5hc() {
6 herbstclient "$@"
7}
8
5#get colors from .Xresources 9#get colors from .Xresources
6get_xcolor(){ 10get_xcolor(){
7 xresources=$(\ 11 xresources=$(\
@@ -15,26 +19,23 @@ get_xcolor(){
15} 19}
16 20
17#Wallpaper 21#Wallpaper
18WALLPAPER=/home/tom/Pictures/ThDLxEW.jpg 22WALLPAPER=/home/tom/Pictures/rocks.jpg
19 23
20#Numix color palette 24#Numix color palette
21LIGHT=$(get_xcolor 15) 25LIGHT=$(get_xcolor 15)
22LLIGHT=$(get_xcolor 7) 26LLIGHT=$(get_xcolor 7)
23ACCENT=$(get_xcolor 9) 27ACCENT=$(get_xcolor 12)
24LDARK=$(get_xcolor 8) 28LDARK=$(get_xcolor 8)
25DARK=$(get_xcolor 0) 29DARK=$(get_xcolor 0)
26 30
27#Panel 31#Panel and padding
28PANEL_HEIGHT=24 32padding=20
29 33monitor_width=$(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')
30hc() { 34panel_height=24
31 herbstclient "$@" 35panel_width=$(echo "$monitor_width - (2 * $padding)" | bc)
32}
33 36
34hc emir_hook reload 37hc emir_hook reload
35 38
36xsetroot -solid $ACCENT
37
38# remove all existing keybindings 39# remove all existing keybindings
39hc keyunbind --all 40hc keyunbind --all
40 41
@@ -45,7 +46,7 @@ hc keybind $Mod-Shift-q quit
45hc keybind $Mod-Shift-r reload 46hc keybind $Mod-Shift-r reload
46hc keybind $Mod-Shift-c close 47hc keybind $Mod-Shift-c close
47hc keybind $Mod-Return spawn xterm 48hc keybind $Mod-Return spawn xterm
48hc keybind $Mod-grave spawn dmenu_run -h $PANEL_HEIGHT -p "Run:" -nb $DARK -nf $LIGHT -sb $ACCENT -sf $DARK 49hc keybind $Mod-grave spawn dmenu_run -h $panel_height -w $panel_width -x $padding -y $padding -p "Run:" -nb $DARK -nf $LIGHT -sb $ACCENT -sf $DARK
49hc keybind XF86AudioLowerVolume spawn amixer set Master 5%- 50hc keybind XF86AudioLowerVolume spawn amixer set Master 5%-
50hc keybind XF86AudioRaiseVolume spawn amixer set Master 5%+ 51hc keybind XF86AudioRaiseVolume spawn amixer set Master 5%+
51 52
@@ -94,7 +95,7 @@ tag_keys=( {1..9} 0 )
94 95
95# Selecting workspaces 96# Selecting workspaces
96hc keybind Alt-Control-Left use_index -1 97hc keybind Alt-Control-Left use_index -1
97hc keybind Alt-Control-Right use_index +1 98hc keybind Alt-Control-Right use_index +1
98hc rename default "${tag_names[0]}" || true 99hc rename default "${tag_names[0]}" || true
99for i in ${!tag_names[@]} ; do 100for i in ${!tag_names[@]} ; do
100 hc add "${tag_names[$i]}" 101 hc add "${tag_names[$i]}"
@@ -156,7 +157,7 @@ hc attr theme.active.inner_color $DARK
156hc attr theme.active.outer_color $DARK 157hc attr theme.active.outer_color $DARK
157hc attr theme.background_color $DARK 158hc attr theme.background_color $DARK
158 159
159hc set window_gap 20 160hc set window_gap $padding
160hc set frame_padding 0 161hc set frame_padding 0
161hc set smart_window_surroundings 0 162hc set smart_window_surroundings 0
162hc set smart_frame_surroundings 1 163hc set smart_frame_surroundings 1
@@ -186,7 +187,7 @@ herbstclient set tree_style '╾│ ├└╼─┐'
186#Start panel in all monitors 187#Start panel in all monitors
187start_panel() { 188start_panel() {
188 for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do 189 for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
189 "$1" $monitor $PANEL_HEIGHT $LIGHT $LLIGHT $ACCENT $LDARK $DARK $2& 190 "$1" $monitor $panel_height $padding $LIGHT $LLIGHT $ACCENT $LDARK $DARK $2&
190 done 191 done
191} 192}
192 193
@@ -202,7 +203,7 @@ else
202fi 203fi
203 204
204#Wallpaper 205#Wallpaper
205feh --bg-scale $WALLPAPER 206feh --bg-fill $WALLPAPER
206 207
207#Start compton if not running 208#Start compton if not running
208start_compton(){ compton -c -z & } 209start_compton(){ compton -c -z & }
@@ -225,3 +226,12 @@ then
225else 226else
226 pulseaudio --start 227 pulseaudio --start
227fi 228fi
229
230#Start xscreensaver
231if pgrep xscreensaver >> /dev/null
232then
233 kill $(pgrep xscreensaver)
234 xscreensaver -no-splash&
235else
236 xscreensaver -no-splash&
237fi