bar2: Different look for battery panel

This commit is contained in:
madmaurice 2016-11-15 18:24:37 +01:00
parent c3690864dc
commit f92b6b2731

View file

@ -13,6 +13,8 @@ BATTERY_LOW="^fg(#C37561)"
FONT="Liberation Mono-8" FONT="Liberation Mono-8"
COLOR_SERVICE_RUNNING="^fg(#EEEEEE)" COLOR_SERVICE_RUNNING="^fg(#EEEEEE)"
COLOR_SERVICE_STOPPED="^fg(#666666)" COLOR_SERVICE_STOPPED="^fg(#666666)"
BATTERY_CHARGING="^fg(#66a84a)"
BATTERY_DISCHARGING="^fg(#C37561)"
ASSET=~/.config/assets ASSET=~/.config/assets
WS_UNFOCUS="^i($ASSET/wsfree.xbm)" WS_UNFOCUS="^i($ASSET/wsfree.xbm)"
@ -29,7 +31,7 @@ mybar () {
clock() { clock() {
while true; do while true; do
echo "${LABEL}Time:${FG} $(date '+%a %d %b') | $(date '+%H:%M:%S')" echo "${LABEL}T:${FG} $(date '+%a %d %b') | $(date '+%H:%M:%S')"
sleep 1; sleep 1;
done done
} }
@ -44,12 +46,12 @@ battery() {
fi fi
if [ -n "$(acpi -a | grep on-line)" ]; then if [ -n "$(acpi -a | grep on-line)" ]; then
batcha="Charging" batcha="${BATTERY_CHARGING}+${FG}"
else else
batcha="Discharging" batcha="${BATTERY_DISCHARGING}-${FG}"
fi fi
echo "${LABEL}Battery:${FG} $batlev, $batcha" echo "${LABEL}B:${FG} $batlev $batcha"
sleep 30 sleep 30
done done
@ -61,7 +63,7 @@ wifi() {
if [ -z "$info" ]; then if [ -z "$info" ]; then
info="-" info="-"
fi fi
echo "${LABEL}Wifi:${FG} $info" echo "${LABEL}W:${FG} $info"
sleep 2; sleep 2;
done done
} }
@ -110,7 +112,7 @@ updates() {
updates="$pac+$aur-$useless" updates="$pac+$aur-$useless"
echo "${LABEL}Updates:${FG} ${updates}" echo "${LABEL}U:${FG} ${updates}"
sleep 1m; sleep 1m;
done done
@ -124,7 +126,7 @@ music() {
if [ -n "$(mpc status | grep -e paused)" ]; then if [ -n "$(mpc status | grep -e paused)" ]; then
info="${info}, Paused" info="${info}, Paused"
fi fi
echo "${LABEL}Music:${FG} ${info}" echo "${LABEL}M:${FG} ${info}"
mpc idle 2>&1 1>/dev/null mpc idle 2>&1 1>/dev/null
done | mybar 400 T 0 done | mybar 400 T 0
@ -152,16 +154,16 @@ services() {
done done
} }
workspace | mybar 200 T 50 & workspace | mybar 180 T 50 &
clock | mybar 250 B 100 & clock | mybar 230 B 100 &
battery | mybar 200 B 25 & battery | mybar 100 B 29 &
wifi | mybar 140 B 0 & wifi | mybar 200 B 0 &
music & music &
updates | mybar 130 B 75 & updates | mybar 100 B 71 &
services | mybar 50 B 50 services | mybar 50 B 50