Use USR1 signal instead of update file for updating statusbar
This commit is contained in:
parent
f448f3c444
commit
87c99ec024
7 changed files with 11 additions and 22 deletions
|
@ -17,4 +17,4 @@ elif [ "$ARG" = "Earpiece" ]; then
|
|||
amixer set "$EARPIECE" unmute
|
||||
fi
|
||||
|
||||
echo 1 > /tmp/sxmo_bar
|
||||
pgrep -f "$(command -v sxmo_statusbar.sh)" | xargs kill -USR1
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
trap "update" USR1
|
||||
pgrep -f sxmo_statusbar.sh | grep -v $$ | xargs kill -9
|
||||
|
||||
UPDATEFILE=/tmp/sxmo_bar
|
||||
touch "$UPDATEFILE"
|
||||
|
||||
update() {
|
||||
# In-call.. show length of call
|
||||
CALLINFO=" "
|
||||
|
@ -54,20 +52,10 @@ update() {
|
|||
}
|
||||
|
||||
# E.g. on first boot justs to make sure the bar comes in quickly
|
||||
update && sleep 1 && update && sleep 1 && update
|
||||
|
||||
periodicupdate() {
|
||||
while :
|
||||
do
|
||||
echo 1 > "$UPDATEFILE"
|
||||
sleep 30
|
||||
done
|
||||
}
|
||||
|
||||
periodicupdate &
|
||||
update && sleep 1 && update && sleep 1
|
||||
|
||||
while :
|
||||
do
|
||||
update
|
||||
inotifywait -e MODIFY "$UPDATEFILE"
|
||||
sleep 30 & wait
|
||||
done
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
change() {
|
||||
echo "Changing timezone to $1"
|
||||
sudo setup-timezone -z "$1"
|
||||
echo 1 > /tmp/sxmo_bar
|
||||
pgrep -f "$(command -v sxmo_statusbar.sh)" | xargs kill -USR1
|
||||
echo Timezone changed ok
|
||||
read -r
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ notify() {
|
|||
xargs printf %.0f
|
||||
)"
|
||||
dunstify -i 0 -u normal -r 998 "♫ $VOL"
|
||||
echo 1 > /tmp/sxmo_bar
|
||||
pgrep -f "$(command -v sxmo_statusbar.sh)" | xargs kill -USR1
|
||||
}
|
||||
|
||||
up() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue