aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm
diff options
context:
space:
mode:
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x.config/herbstluftwm/panel.sh26
1 files changed, 22 insertions, 4 deletions
diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh
index 7a4627d..dd95bd4 100755
--- a/.config/herbstluftwm/panel.sh
+++ b/.config/herbstluftwm/panel.sh
@@ -109,7 +109,6 @@ fi
109 bat_color=$normal_txt 109 bat_color=$normal_txt
110 fi 110 fi
111 state=$(cat /sys/class/power_supply/BAT1/status) 111 state=$(cat /sys/class/power_supply/BAT1/status)
112 remaining=$(echo ${batinfo[4]})
113 echo -e "battery\t%{F$normal_txt}$state: %{F$bat_color}$charge%{F$normal_txt}%% %{F-}" 112 echo -e "battery\t%{F$normal_txt}$state: %{F$bat_color}$charge%{F$normal_txt}%% %{F-}"
114 else 113 else
115 echo -e "battery\toff" 114 echo -e "battery\toff"
@@ -152,7 +151,7 @@ fi
152 echo -n "%{B-}%{F$inactive_txt}" 151 echo -n "%{B-}%{F$inactive_txt}"
153 ;; 152 ;;
154 esac 153 esac
155 echo -n " ${i:1} %{F-}%{B-}%{U-u}" 154 echo -n "%{A:tag,${i:1}:} ${i:1} %{A}%{F-}%{B-}%{U-u}"
156 done 155 done
157 echo -n "$separator" 156 echo -n "$separator"
158 echo -n "%{B-}%{F-} ${windowtitle//^/^^}" 157 echo -n "%{B-}%{F-} ${windowtitle//^/^^}"
@@ -202,5 +201,24 @@ fi
202 ;; 201 ;;
203 esac 202 esac
204 done 203 done
205} 2> /dev/null | bar -g $panel_width\x$panel_height\+$x+$y -f "$font" \ 204} 2> /dev/null | \
206 -u 2 -B "$normal_bg" -F "$normal_txt" 205 bar -g $panel_width\x$panel_height\+$x+$y \
206 -f "$font" \
207 -u 2 \
208 -B "$normal_bg" \
209 -F "$normal_txt" | \
210{
211 #Handle clickable areas
212 while read line; do
213 IFS=',' read -a c <<< $(echo $line)
214 case "${c[0]}" in
215 tag)
216 herbstclient use "${c[1]}"
217 echo "herbstclient use \"${c[1]}\""
218 ;;
219 *)
220 echo "${c[0]}: not valid command"
221 ;;
222 esac
223 done
224}