aboutsummaryrefslogtreecommitdiffstats
path: root/herbstluftwm
diff options
context:
space:
mode:
Diffstat (limited to 'herbstluftwm')
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/autostart203
-rw-r--r--herbstluftwm/.config/herbstluftwm/dependencylist12
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/lock.sh7
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/notify.sh30
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/panel.sh219
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/popup.sh60
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/start.sh13
7 files changed, 544 insertions, 0 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart
new file mode 100755
index 0000000..109ea43
--- /dev/null
+++ b/herbstluftwm/.config/herbstluftwm/autostart
@@ -0,0 +1,203 @@
1#!/bin/bash
2
3# this is a simple config for herbstluftwm
4
5hc() {
6 herbstclient "$@"
7}
8
9get_x_color() {
10 xresources=$(cat ~/.Xresources)
11 color=$(echo $xresources | sed "s/.*\*color$1: \(#[0-9A-Fa-f]*\).*/\1/")
12 echo $color
13}
14
15hlwm_scripts="$HOME/.config/herbstluftwm"
16
17#wallpaper
18wallpaper=/home/tom/Pictures/fall1.jpg
19
20#Numix color palette
21export WM_LIGHT=$(get_x_color 15)
22export WM_LLIGHT=$(get_x_color 7)
23export WM_ACCENT=$(get_x_color 9)
24export WM_LDARK=$(get_x_color 8)
25export WM_DARK=$(get_x_color 0)
26
27#Panel and window_p
28window_p=20
29monitor_w=$(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')
30panel_h=24
31panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc)
32dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $WM_DARK -nf $WM_LIGHT -sb $WM_ACCENT -sf $WM_DARK"
33
34hc emir_hook reload
35
36# remove all existing keybindings
37hc keyunbind --all
38
39# keybindings
40Mod=Mod4 # Use the super key as the main modifier
41
42hc keybind $Mod-Shift-q quit
43hc keybind $Mod-Shift-r reload
44hc keybind $Mod-Shift-c close
45hc keybind $Mod-Return spawn xterm
46hc keybind $Mod-grave spawn dmenu_run $dmenu_opts
47hc keybind XF86AudioLowerVolume spawn amixer set Master 5%-
48hc keybind XF86AudioRaiseVolume spawn amixer set Master 5%+
49
50# basic movement
51# focusing clients
52hc keybind $Mod-Left focus left
53hc keybind $Mod-Down focus down
54hc keybind $Mod-Up focus up
55hc keybind $Mod-Right focus right
56hc keybind $Mod-h focus left
57hc keybind $Mod-j focus down
58hc keybind $Mod-k focus up
59hc keybind $Mod-l focus right
60
61# moving clients
62hc keybind $Mod-Shift-Left shift left
63hc keybind $Mod-Shift-Down shift down
64hc keybind $Mod-Shift-Up shift up
65hc keybind $Mod-Shift-Right shift right
66hc keybind $Mod-Shift-h shift left
67hc keybind $Mod-Shift-j shift down
68hc keybind $Mod-Shift-k shift up
69hc keybind $Mod-Shift-l shift right
70
71# splitting frames
72# create an empty frame at the specified direction
73hc keybind $Mod-u split bottom 0.5
74hc keybind $Mod-o split right 0.5
75# let the current frame explode into subframes
76hc keybind $Mod-Control-space split explode
77
78# resizing frames
79resizestep=0.05
80hc keybind $Mod-Control-h resize left +$resizestep
81hc keybind $Mod-Control-j resize down +$resizestep
82hc keybind $Mod-Control-k resize up +$resizestep
83hc keybind $Mod-Control-l resize right +$resizestep
84hc keybind $Mod-Control-Left resize left +$resizestep
85hc keybind $Mod-Control-Down resize down +$resizestep
86hc keybind $Mod-Control-Up resize up +$resizestep
87hc keybind $Mod-Control-Right resize right +$resizestep
88
89# tags
90tag_names=( I II III IV V VI VII VIII IX X )
91tag_keys=( {1..9} 0 )
92
93# Selecting workspaces
94hc keybind Alt-Control-Left use_index -1
95hc keybind Alt-Control-Right use_index +1
96hc rename default "${tag_names[0]}" || true
97for i in ${!tag_names[@]} ; do
98 hc add "${tag_names[$i]}"
99 key="${tag_keys[$i]}"
100 if ! [ -z "$key" ] ; then
101 hc keybind "$Mod-$key" use_index "$i"
102 hc keybind "$Mod-Shift-$key" move_index "$i"
103 fi
104done
105
106# cycle through tags
107hc keybind $Mod-period use_index +1 --skip-visible
108hc keybind $Mod-comma use_index -1 --skip-visible
109
110# layouting
111hc keybind $Mod-r remove
112hc keybind $Mod-space cycle_layout 1
113hc keybind $Mod-s floating toggle
114hc keybind $Mod-f fullscreen toggle
115hc keybind $Mod-p pseudotile toggle
116
117# mouse
118hc mouseunbind --all
119hc mousebind $Mod-Button1 move
120hc mousebind $Mod-Button2 zoom
121hc mousebind $Mod-Button3 resize
122
123# focus
124hc keybind $Mod-BackSpace cycle_monitor
125hc keybind $Mod-Tab cycle_all +1
126hc keybind $Mod-Shift-Tab cycle_all -1
127hc keybind $Mod-c cycle
128hc keybind $Mod-i jumpto urgent
129hc set focus_follows_mouse 1
130
131# theme
132hc attr theme.tiling.reset 1
133hc attr theme.floating.reset 1
134hc set frame_border_active_color $WM_LDARK
135hc set frame_border_normal_color $WM_DARK
136hc set frame_bg_normal_color $WM_LDARK
137hc set frame_bg_active_color $WM_DARK
138hc set frame_border_width 0
139hc set always_show_frame 0
140hc set frame_bg_transparent 1
141hc set frame_transparent_width 0
142hc set frame_gap 0
143
144hc attr theme.active.color $WM_ACCENT
145hc attr theme.normal.color $WM_DARK
146hc attr theme.urgent.color orange
147hc attr theme.inner_width 1
148hc attr theme.inner_color $WM_DARK
149hc attr theme.border_width 3
150hc attr theme.floating.border_width 4
151hc attr theme.floating.outer_width 1
152hc attr theme.floating.outer_color $WM_DARK
153hc attr theme.active.inner_color $WM_DARK
154hc attr theme.active.outer_color $WM_DARK
155hc attr theme.background_color $WM_DARK
156
157hc set window_gap $window_p
158hc set frame_padding 0
159hc set smart_window_surroundings 0
160hc set smart_frame_surroundings 1
161hc set mouse_recenter_gap 1
162
163# rules
164hc unrule -F
165#hc rule class=XTerm tag=3 # move all xterms to tag 3
166hc rule focus=on # normally focus new clients
167#hc rule focus=off # normally do not focus new clients
168# give focus to most common terminals
169#hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
170hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
171hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
172hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
173
174# unlock, just to be sure
175hc unlock
176
177herbstclient set tree_style '╾│ ├└╼─┐'
178
179#Start panel in all monitors
180start_panel() {
181 for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
182 "$1" $monitor $panel_h $window_p &
183 done
184}
185
186# find the panel
187panel=$hlwm_scripts/panel.sh
188[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
189if pgrep panel.sh >> /dev/null
190then
191 kill $(pgrep panel.sh)
192 start_panel $panel
193else
194 start_panel $panel
195fi
196
197$hlwm_scripts/start.sh "xautolock -time 5 -locker $hlwm_scripts/lock.sh"
198$hlwm_scripts/start.sh "feh --bg-fill $wallpaper"
199$hlwm_scripts/start.sh "compton --config $HOME/.compton"
200$hlwm_scripts/start.sh "xrdb -load $HOME/.Xresources"
201$hlwm_scripts/start.sh "pulseaudio --start"
202$hlwm_scripts/start.sh "dropboxd"
203$hlwm_scripts/start.sh "$hlwm_scripts/notify.sh $monitor_w $window_p $panel_h $hlwm_scripts/popup.sh"
diff --git a/herbstluftwm/.config/herbstluftwm/dependencylist b/herbstluftwm/.config/herbstluftwm/dependencylist
new file mode 100644
index 0000000..a18055d
--- /dev/null
+++ b/herbstluftwm/.config/herbstluftwm/dependencylist
@@ -0,0 +1,12 @@
1compton
2bar-aint-recursive
3bc
4wireless_tools
5dmenu2
6feh
7pulseaudio
8alsa-utils
9sed
10i3lock
11scrot
12xautolock
diff --git a/herbstluftwm/.config/herbstluftwm/lock.sh b/herbstluftwm/.config/herbstluftwm/lock.sh
new file mode 100755
index 0000000..04c4638
--- /dev/null
+++ b/herbstluftwm/.config/herbstluftwm/lock.sh
@@ -0,0 +1,7 @@