aboutsummaryrefslogtreecommitdiffstats
path: root/herbstluftwm/.config
diff options
context:
space:
mode:
Diffstat (limited to 'herbstluftwm/.config')
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/autostart63
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/panel.sh72
-rw-r--r--herbstluftwm/.config/herbstluftwm/theme35
3 files changed, 82 insertions, 88 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart
index 1cce1ba..9ec12f8 100755
--- a/herbstluftwm/.config/herbstluftwm/autostart
+++ b/herbstluftwm/.config/herbstluftwm/autostart
@@ -6,36 +6,17 @@ hc() {
6 herbstclient "$@" 6 herbstclient "$@"
7} 7}
8 8
9get_x_color() { 9dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
10 xresources=$(cat ~/.Xresources) 10source "$dir/theme"
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 11
27#Detect monitors 12#Detect monitors
28hc set auto_detect_monitors 1 13hc set auto_detect_monitors 1
29hc detect_monitors 14hc detect_monitors
30 15
31#Panel and window_p 16#Panel and window_p
32window_p=20
33monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) 17monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/'))
34panel_h=24
35panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) 18panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc)
36dmenu_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" 19dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $color_bg -nf $color_fg -sb $color_accent -sf $color_bg"
37
38hc emir_hook reload
39 20
40# remove all existing keybindings 21# remove all existing keybindings
41hc keyunbind --all 22hc keyunbind --all
@@ -135,10 +116,6 @@ hc set focus_follows_mouse 1
135# theme 116# theme
136hc attr theme.tiling.reset 1 117hc attr theme.tiling.reset 1
137hc attr theme.floating.reset 1 118hc attr theme.floating.reset 1
138hc set frame_border_active_color $WM_LDARK
139hc set frame_border_normal_color $WM_DARK
140hc set frame_bg_normal_color $WM_LDARK
141hc set frame_bg_active_color $WM_DARK
142hc set frame_border_width 0 119hc set frame_border_width 0
143hc set always_show_frame 0 120hc set always_show_frame 0
144hc set frame_bg_transparent 1 121hc set frame_bg_transparent 1
@@ -147,18 +124,18 @@ hc set frame_active_opacity 0
147hc set frame_transparent_width 0 124hc set frame_transparent_width 0
148hc set frame_gap 0 125hc set frame_gap 0
149 126
150hc attr theme.active.color $WM_ACCENT 127hc attr theme.active.color $color_accent
151hc attr theme.normal.color $WM_DARK 128hc attr theme.normal.color $color_bg
152hc attr theme.urgent.color orange 129hc attr theme.urgent.color orange
153hc attr theme.inner_width 1 130hc attr theme.inner_width 1
154hc attr theme.inner_color $WM_DARK 131hc attr theme.inner_color $color_bg
155hc attr theme.border_width 3 132hc attr theme.border_width 3
156hc attr theme.floating.border_width 4 133hc attr theme.floating.border_width 4
157hc attr theme.floating.outer_width 1 134hc attr theme.floating.outer_width 1
158hc attr theme.floating.outer_color $WM_DARK 135hc attr theme.floating.outer_color $color_bg
159hc attr theme.active.inner_color $WM_DARK 136hc attr theme.active.inner_color $color_bg
160hc attr theme.active.outer_color $WM_DARK 137hc attr theme.active.outer_color $color_bg
161hc attr theme.background_color $WM_DARK 138hc attr theme.background_color $color_bg
162 139
163hc set window_gap $window_p 140hc set window_gap $window_p
164hc set frame_padding 0 141hc set frame_padding 0
@@ -185,12 +162,12 @@ herbstclient set tree_style '╾│ ├└╼─┐'
185#Start panel in all monitors 162#Start panel in all monitors
186start_panel() { 163start_panel() {
187 for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do 164 for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
188 "$1" $monitor $panel_h $window_p & 165 "$1" $monitor&
189 done 166 done
190} 167}
191 168
192# find the panel 169# find the panel
193panel=$hlwm_scripts/panel.sh 170panel=$dir/panel.sh
194[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh 171[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
195if pgrep panel.sh >> /dev/null 172if pgrep panel.sh >> /dev/null
196then 173then
@@ -202,11 +179,11 @@ fi
202 179
203pulseaudio --start 180pulseaudio --start
204 181
205$hlwm_scripts/start.sh "xautolock -time 5 -locker $hlwm_scripts/lock.sh" 182$dir/start.sh "xautolock -time 5 -locker $dir/lock.sh"
206$hlwm_scripts/start.sh "feh --bg-fill $wallpaper" 183$dir/start.sh "feh --bg-fill $wallpaper"
207$hlwm_scripts/start.sh "compton --config $HOME/.compton" 184$dir/start.sh "compton --config $HOME/.compton"
208$hlwm_scripts/start.sh "xrdb -load $HOME/.Xresources" 185$dir/start.sh "xrdb -load $HOME/.Xresources"
209$hlwm_scripts/start.sh "xset +fp /usr/share/fonts/local" 186$dir/start.sh "xset +fp /usr/share/fonts/local"
210$hlwm_scripts/start.sh "xset fp rehash" 187$dir/start.sh "xset fp rehash"
211$hlwm_scripts/start.sh "dropboxd" 188$dir/start.sh "dropboxd"
212$hlwm_scripts/start.sh "$hlwm_scripts/notify.sh $monitor_w $window_p $panel_h $hlwm_scripts/popup.sh" 189#$dir/start.sh "$dir/notify.sh $monitor_w $window_p $panel_h $dir/popup.sh"
diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh
index 3af00c5..9b8fb48 100755
--- a/herbstluftwm/.config/herbstluftwm/panel.sh
+++ b/herbstluftwm/.config/herbstluftwm/panel.sh
@@ -4,28 +4,10 @@ hc() {
4 "${herbstclient_command[@]:-herbstclient}" "$@" ; 4 "${herbstclient_command[@]:-herbstclient}" "$@" ;
5} 5}
6 6
7add_alpha_channel(){ 7dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
8 echo "$1" | \ 8source "$dir/theme"
9 sed "s/.*#\([0-9a-fA-F]*\).*/#ff\1/"
10}
11 9
12monitor=${1:-0} 10monitor=${1:-0}
13panel_height=$2
14padding=$3
15
16light=$(add_alpha_channel $WM_LIGHT)
17llight=$(add_alpha_channel $WM_LLIGHT)
18accent=$(add_alpha_channel $WM_ACCENT)
19ldark=$(add_alpha_channel $WM_LDARK)
20dark=$(add_alpha_channel $WM_DARK)
21
22font="-*-fixed-medium-*-*-*-14-*-*-*-*-*-*-*"
23font2="-*-stlarch-medium-*-*-*-10-*-*-*-*-*-*-*"
24selected_bg=$accent
25normal_bg=$dark
26selected_txt=$dark
27normal_txt=$light
28inactive_txt=$llight
29 11
30geometry=( $(herbstclient monitor_rect "$monitor") ) 12geometry=( $(herbstclient monitor_rect "$monitor") )
31if [ -z "$geometry" ] ;then 13if [ -z "$geometry" ] ;then
@@ -33,12 +15,12 @@ if [ -z "$geometry" ] ;then
33 exit 1 15 exit 1
34fi 16fi
35# geometry has the format W H X Y 17# geometry has the format W H X Y
36x=$(echo "${geometry[0]} + $padding" | bc) 18x=$(echo "${geometry[0]} + $window_p" | bc)
37y=$(echo "${geometry[1]} + $padding" | bc) 19y=$(echo "${geometry[1]} + $window_p" | bc)
38panel_width=$(echo "${geometry[2]} - (2 * $padding)" | bc) 20panel_width=$(echo "${geometry[2]} - (2 * $window_p)" | bc)
39bar_opts="-g ${panel_width}x${panel_height}+${x}+${y} -f $font,$font2 -u 2 -B $normal_bg -F $normal_txt" 21bar_opts="-g ${panel_width}x${panel_h}+${x}+${y} -f $font,$font_sec -u 2 -B $acolor_bg -F $acolor_fg"
40 22
41hc pad $monitor $(echo "$panel_height + $padding" | bc) 23hc pad $monitor $(echo "$panel_h + $window_p" | bc)
42 24
43if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then 25if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then
44 # mawk needs "-W interactive" to line-buffer stdout correctly 26 # mawk needs "-W interactive" to line-buffer stdout correctly
@@ -77,9 +59,9 @@ fi
77 scrolling=$current 59 scrolling=$current
78 fi 60 fi
79 61
80 echo -e "music\t\ue05c ${scrolling:0:24}" 62 echo -e "music\t\ue05c ${scrolling:0:24}"
81 else 63 else
82 echo -e "music\toff" 64 echo -e "music\toff"
83 fi 65 fi
84 66
85 # Volume 67 # Volume
@@ -95,9 +77,9 @@ fi
95 if [ -z $vol ] ; then 77 if [ -z $vol ] ; then
96 echo -e "volume\toff" 78 echo -e "volume\toff"
97 else 79 else
98 echo -e "volume\t%{F$normal_txt}\ue05d $vol%%%{F-}" 80 echo -e "volume\t%{F$acolor_fg}\ue05d $vol%%%{F-}"
99 fi 81 fi
100 else 82 else
101 echo -e "volume\toff" 83 echo -e "volume\toff"
102 fi 84 fi
103 85
@@ -106,12 +88,12 @@ fi
106 if iwconfig $int1 >/dev/null 2>&1; then 88 if iwconfig $int1 >/dev/null 2>&1; then
107 wifi=$int1 89 wifi=$int1