aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm
diff options
context:
space:
mode:
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x.config/herbstluftwm/panel.sh27
1 files changed, 22 insertions, 5 deletions
diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh
index 1b1cc0d..087158b 100755
--- a/.config/herbstluftwm/panel.sh
+++ b/.config/herbstluftwm/panel.sh
@@ -107,7 +107,7 @@ fi
107 if [ -z $batinfo ] ; then 107 if [ -z $batinfo ] ; then
108 echo -e "battery\toff" 108 echo -e "battery\toff"
109 else 109 else
110 charge=$(echo ${batinfo[3]} | tr -d '%,') 110 charge=$(echo ${batinfo[3]} | tr -d '%,')
111 if [ $charge -lt 15 ] ; then 111 if [ $charge -lt 15 ] ; then
112 bat_color=$accent 112 bat_color=$accent
113 else 113 else
@@ -155,7 +155,7 @@ fi
155 echo -n "%{B-}%{F$inactive_txt}" 155 echo -n "%{B-}%{F$inactive_txt}"
156 ;; 156 ;;
157 esac 157 esac
158 echo -n "%{A:herbstclient use ${i:1}:} ${i:1} %{A}%{F-}%{B-}%{U-u}" 158 echo -n "%{A:tag,${i:1}:} ${i:1} %{A}%{F-}%{B-}%{U-u}"
159 done 159 done
160 echo -n "$separator" 160 echo -n "$separator"
161 echo -n "%{B-}%{F-} ${windowtitle//^/^^}" 161 echo -n "%{B-}%{F-} ${windowtitle//^/^^}"
@@ -206,6 +206,23 @@ fi
206 esac 206 esac
207 done 207 done
208} 2> /dev/null | \ 208} 2> /dev/null | \
209 bar -g $panel_width\x$panel_height\+$x+$y -f "$font" \ 209 bar -g $panel_width\x$panel_height\+$x+$y \
210 -u 2 -B "$normal_bg" -F "$normal_txt" | \ 210 -f "$font" \
211 while read line; do eval "$line"; done 211 -u 2 \
212 -B "$normal_bg" \
213 -F "$normal_txt" | \
214{
215 #Handle clickable areas
216 while read line; do
217 IFS=',' read -a c <<< $(echo $line)
218 case "${c[0]}" in
219 tag)
220 herbstclient use "${c[1]}"
221 echo "herbstclient use \"${c[1]}\""
222 ;;
223 *)
224 echo "${c[0]}: not valid command"
225 ;;
226 esac
227 done
228}