13 if [ -e ~/.instantsilent ]; then
18 # run every 60 seconds
19 if [ "$REPETITIONS" = "xxxxxx" ]; then
21 if ping -q -c 1 -W 1 8.8.8.8; then
24 INTERNET="^c#ff0000^X^d^"
27 # battery indicator on laptop
28 if [ -n "$ISLAPTOP" ]; then
30 if [[ $TMPBAT =~ "Charging" ]]; then
31 BATTERY="^c#00ff00^B"$(egrep -o '[0-9]*%' <<<"$TMPBAT")"^d^"
33 BATTERY="B"$(egrep -o '[0-9]*%' <<<"$TMPBAT")
34 # make indicator red on low battery
35 if [ $(grep '[0-9]*' <<<$BATTERY) -lt 10 ]; then
36 BATTERY="^c#ff0000^$BATTERY^d^"
43 REPETITIONS="$REPETITIONS"x
46 addstatus "$(date +'%d-%m|%H:%M')"
47 addstatus "A$(amixer get Master | egrep -o '[0-9]{1,3}%' | head -1)"
48 [ -n "$ISLAPTOP" ] && addstatus "$BATTERY"
51 xsetroot -name "^f11^$date"