aboutsummaryrefslogtreecommitdiffstats
path: root/herbstluftwm/.config
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-08-31 16:58:07 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-08-31 16:58:07 +0200
commit626d49c4729690c27b26b4f14196695bad29533b (patch)
tree958c0de29ecf26695fa428fdc83df21ee84b857a /herbstluftwm/.config
parentffac7062a84028277558fb0110b31b825e42dfa2 (diff)
downloaddotfiles-626d49c4729690c27b26b4f14196695bad29533b.tar.gz
dotfiles-626d49c4729690c27b26b4f14196695bad29533b.tar.bz2
dotfiles-626d49c4729690c27b26b4f14196695bad29533b.zip
Switched to lemonbar-xft-git
Diffstat (limited to 'herbstluftwm/.config')
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/autostart61
-rw-r--r--herbstluftwm/.config/herbstluftwm/dependencylist4
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/panel_handler.sh17
-rwxr-xr-x[-rw-r--r--]herbstluftwm/.config/herbstluftwm/panel_indicators.sh8
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/populate_panel.sh (renamed from herbstluftwm/.config/herbstluftwm/panel.sh)51
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/start.sh2
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/start_panel.sh33
l---------herbstluftwm/.config/herbstluftwm/themes/current1
-rw-r--r--herbstluftwm/.config/herbstluftwm/themes/purpur (renamed from herbstluftwm/.config/herbstluftwm/theme)4
9 files changed, 91 insertions, 90 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart
index 7a80b1c..78a81b4 100755
--- a/herbstluftwm/.config/herbstluftwm/autostart
+++ b/herbstluftwm/.config/herbstluftwm/autostart
@@ -1,17 +1,16 @@
1#!/usr/bin/env bash 1#!/usr/bin/env bash
2 2
3# this is a simple config for herbstluftwm
4
5# The current directory
6dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
7
8# Herbstclient shortcut 3# Herbstclient shortcut
9hc() { 4hc() {
10 herbstclient "$@" 5 herbstclient "$@"
11} 6}
7export -f hc
8
9# The current directory
10export HLWM_CONF_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
12 11
13#Include the theming script 12#Include the theming script
14source "$dir/theme" 13source "$HLWM_CONF_DIR/themes/current"
15 14
16#Detect monitors 15#Detect monitors
17hc set auto_detect_monitors 1 16hc set auto_detect_monitors 1
@@ -26,17 +25,16 @@ dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $color
26tag_names=() 25tag_names=()
27tag_keys=({1..9} 0) 26tag_keys=({1..9} 0)
28for key in ${tag_keys[@]}; do 27for key in ${tag_keys[@]}; do
29 if [ $key -eq 0 ]; then key=10; fi 28 if [ $key -eq 0 ]; then key=10; fi
30 key=$(echo "$key - 1" | bc) 29 key=$(echo "$key - 1" | bc)
31 echo $key 30 name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }')
32 name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }') 31 tag_names+=($name)
33 tag_names+=($name)
34done; 32done;
35 33
36# Source hlwm-config-files 34# Source hlwm-config-files
37source "$dir/hlwm-keybindings" 35source "$HLWM_CONF_DIR/hlwm-keybindings"
38source "$dir/hlwm-theming" 36source "$HLWM_CONF_DIR/hlwm-theming"
39source "$dir/hlwm-rules" 37source "$HLWM_CONF_DIR/hlwm-rules"
40 38
41# Unlock, just to be sure 39# Unlock, just to be sure
42hc unlock 40hc unlock
@@ -44,29 +42,20 @@ hc unlock
44herbstclient set tree_style '╾│ ├└╼─┐' 42herbstclient set tree_style '╾│ ├└╼─┐'
45 43
46# Start panel in all monitors 44# Start panel in all monitors
47start_panel() { 45panel=$HLWM_CONF_DIR/start_panel.sh
48 for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
49 "$1" $monitor&
50 done
51}
52
53# Find the panel
54panel=$dir/panel.sh
55[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh 46[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
56if pgrep panel.sh >> /dev/null 47for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
57then 48 $panel $monitor&
58 kill $(pgrep panel.sh) 49done
59 start_panel $panel
60else
61 start_panel $panel
62fi
63 50
64pulseaudio --start 51pulseaudio --start
65 52
66$dir/start.sh "xautolock -time 5 -locker $dir/lock.sh" 53$HLWM_CONF_DIR/start.sh "xautolock -time 5 -locker $HLWM_CONF_DIR/lock.sh"
67$dir/start.sh "feh --bg-fill $wallpaper" 54$HLWM_CONF_DIR/start.sh "feh --bg-fill $wallpaper"
68$dir/start.sh "compton --config $HOME/.compton" 55$HLWM_CONF_DIR/start.sh "compton --config $HOME/.compton"
69$dir/start.sh "xrdb -load $HOME/.Xresources" 56$HLWM_CONF_DIR/start.sh "xrdb -load $HOME/.Xresources"
70$dir/start.sh "xset +fp /usr/share/fonts/local" 57$HLWM_CONF_DIR/start.sh "xset +fp /usr/share/fonts/local"
71$dir/start.sh "xset fp rehash" 58$HLWM_CONF_DIR/start.sh "xset fp rehash"
72#$dir/start.sh "$dir/notify.sh $dir/popup.sh" 59#$HLWM_CONF_DIR/start.sh "$HLWM_CONF_DIR/notify.sh $HLWM_CONF_DIR/popup.sh"
60
61# vim: set ts=4 sw=4 tw=0 et :
diff --git a/herbstluftwm/.config/herbstluftwm/dependencylist b/herbstluftwm/.config/herbstluftwm/dependencylist
index e62c3af..34c9bf9 100644
--- a/herbstluftwm/.config/herbstluftwm/dependencylist
+++ b/herbstluftwm/.config/herbstluftwm/dependencylist
@@ -4,12 +4,12 @@ compton
4dmenu2 4dmenu2
5feh 5feh
6i3lock 6i3lock
7lemonbar-git 7lemonbar-xft-git
8playerctl 8playerctl
9pulseaudio 9pulseaudio
10pulseaudio-alsa 10pulseaudio-alsa
11scrot 11scrot
12sed 12sed
13stlarch_font 13ttf-font-awesome
14wireless_tools 14wireless_tools
15xautolock 15xautolock
diff --git a/herbstluftwm/.config/herbstluftwm/panel_handler.sh b/herbstluftwm/.config/herbstluftwm/panel_handler.sh
new file mode 100755
index 0000000..6bff693
--- /dev/null
+++ b/herbstluftwm/.config/herbstluftwm/panel_handler.sh
@@ -0,0 +1,17 @@
1#!/usr/bin/env bash
2
3#Handle clickable areas
4while read line; do
5 IFS=',' read -a c <<< $(echo $line)
6 case "${c[0]}" in
7 tag)
8 herbstclient use "${c[1]}"
9 echo "herbstclient use \"${c[1]}\""
10 ;;
11 *)
12 echo "${c[0]}: not valid command"
13 ;;
14 esac
15done
16
17# vim: set ts=4 sw=4 tw=0 et :
diff --git a/herbstluftwm/.config/herbstluftwm/panel_indicators.sh b/herbstluftwm/.config/herbstluftwm/panel_indicators.sh
index a433e3a..ad45d75 100644..100755
--- a/herbstluftwm/.config/herbstluftwm/panel_indicators.sh
+++ b/herbstluftwm/.config/herbstluftwm/panel_indicators.sh
@@ -1,7 +1,7 @@
1#!/bin/bash 1#!/usr/bin/env bash
2icon_font="-*-stlarch-medium-*-*-*-10-*-*-*-*-*-*-*" 2icon_font="FontAwesome-10"
3battery_icon=("\ue113" "\ue114" "\ue115" "\ue116" "\ue042") 3battery_icon=("\ue113" "\ue114" "\ue115" "\ue116" "\ue042")
4network_icon=("\ue0f1" "\ue0f2" "\ue0f3" "%{T2}\ue0af%{T-}") 4network_icon=("\ue0f1" "\ue0f2" "\ue0f3" "\ue0af")
5music_icon="\ue05c" 5music_icon="\ue05c"
6 6
7music() 7music()
@@ -43,7 +43,7 @@ volume()
43 if [ -z $vol ] ; then 43 if [ -z $vol ] ; then
44 echo -e "volume\toff" 44 echo -e "volume\toff"
45 else 45 else
46 echo -e "volume\t%{F$acolor_fg}\ue05d $vol%%%{F-}" 46 echo -e "volume\t%{F$acolor_fg}\ue05d $vol%%{F-}"
47 fi 47 fi
48 else 48 else
49 echo -e "volume\toff" 49 echo -e "volume\toff"
diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/populate_panel.sh
index 70e8154..07ecafd 100755
--- a/herbstluftwm/.config/herbstluftwm/panel.sh
+++ b/herbstluftwm/.config/herbstluftwm/populate_panel.sh
@@ -1,30 +1,7 @@
1#!/bin/bash 1#!/usr/bin/env bash
2 2
3dir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) 3source "$HLWM_CONF_DIR/themes/current"
4 4source "$HLWM_CONF_DIR/panel_indicators.sh"
5hc() {
6 "${herbstclient_command[@]:-herbstclient}" "$@"
7}
8
9source "$dir/theme"
10source "$dir/panel_indicators.sh"
11
12monitor=${1:-0}
13
14geometry=($(herbstclient monitor_rect "$monitor"))
15if [ -z "$geometry" ] ;then
16 echo "Invalid monitor $monitor"
17 exit 1
18fi
19
20# Geometry has the format W H X Y
21x=$(echo "${geometry[0]} + $window_p" | bc)
22y=$(echo "${geometry[1]} + $window_p" | bc)
23
24panel_width=$(echo "${geometry[2]} - (2 * $window_p)" | bc)
25bar_opts="-g ${panel_width}x${panel_h}+${x}+${y} -f $font -f $icon_font -u 2 -B $acolor_bg -F $acolor_fg"
26
27hc pad $monitor $(echo "$panel_h + $window_p" | bc)
28 5
29if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then 6if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then
30 # mawk needs "-W interactive" to line-buffer stdout correctly 7 # mawk needs "-W interactive" to line-buffer stdout correctly
@@ -99,7 +76,7 @@ fi
99 echo -n "$separator%{F-}%{B-} " 76 echo -n "$separator%{F-}%{B-} "
100 echo -n "${windowtitle//^/^^}" 77 echo -n "${windowtitle//^/^^}"
101 78
102 # Right part of panel 79 # Right part of panel
103 right="$music$volume$net$battery$date " 80 right="$music$volume$net$battery$date "