|
|
@ -1,12 +1,10 @@ |
|
|
|
#!/usr/bin/env sh |
|
|
|
#!/usr/bin/env sh |
|
|
|
pgrep -f sxmo_statusbar.sh | grep -v $$ | xargs kill -9 |
|
|
|
pgrep -f sxmo_statusbar.sh | grep -v $$ | xargs kill -9 |
|
|
|
|
|
|
|
|
|
|
|
sleep 1 |
|
|
|
|
|
|
|
UPDATEFILE=/tmp/sxmo_bar |
|
|
|
UPDATEFILE=/tmp/sxmo_bar |
|
|
|
touch $UPDATEFILE |
|
|
|
touch $UPDATEFILE |
|
|
|
|
|
|
|
|
|
|
|
while : |
|
|
|
update() { |
|
|
|
do |
|
|
|
|
|
|
|
# M symbol if modem monitoring is on & modem present |
|
|
|
# M symbol if modem monitoring is on & modem present |
|
|
|
MODEMMON="" |
|
|
|
MODEMMON="" |
|
|
|
pgrep -f sxmo_modemmonitor.sh && MODEMMON="M " |
|
|
|
pgrep -f sxmo_modemmonitor.sh && MODEMMON="M " |
|
|
@ -33,7 +31,14 @@ do |
|
|
|
|
|
|
|
|
|
|
|
BAR=" ${MODEMMON}${VOL} ${BATSTATUS}${PCT}% ${TIME}" |
|
|
|
BAR=" ${MODEMMON}${VOL} ${BATSTATUS}${PCT}% ${TIME}" |
|
|
|
xsetroot -name "$BAR" |
|
|
|
xsetroot -name "$BAR" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# E.g. on first boot justs to make sure the bar comes in quickly |
|
|
|
|
|
|
|
update && sleep 1 && update && sleep 1 && update |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while : |
|
|
|
|
|
|
|
do |
|
|
|
|
|
|
|
update |
|
|
|
inotifywait -e MODIFY $UPDATEFILE & sleep 30 & wait -n |
|
|
|
inotifywait -e MODIFY $UPDATEFILE & sleep 30 & wait -n |
|
|
|
pgrep -P $$ | xargs kill -9 |
|
|
|
pgrep -P $$ | xargs kill -9 |
|
|
|
done |
|
|
|
done |
|
|
|