Fixed zombi problem
This commit is contained in:
parent
cd152f0f6d
commit
2e8a8a8db0
1 changed files with 12 additions and 9 deletions
|
@ -62,7 +62,7 @@ diskspace() {
|
|||
while true; do
|
||||
info=$(df -h / | awk '{if($6 == "/") { print $5 }}')
|
||||
echo diskspace "$icon_diskspace $info" > $FIFO;
|
||||
|
||||
|
||||
sleep 20;
|
||||
done;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ battery() {
|
|||
if [ "$level" -lt 20 ]; then
|
||||
info="%{F$color_battery_low}$level%%{F-}"
|
||||
fi
|
||||
|
||||
|
||||
echo battery "$info" > $FIFO
|
||||
|
||||
sleep 2m;
|
||||
|
@ -100,7 +100,7 @@ batterysymbol() {
|
|||
[ -n "$(acpi -a | grep on-line)" ] && icon=$icon_battery_charging
|
||||
|
||||
echo batterysymbol "$icon" > $FIFO
|
||||
|
||||
|
||||
sleep 5;
|
||||
done
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ clock() {
|
|||
seconds_to_wait=10
|
||||
fi
|
||||
echo clock "$icon_clock $info" > $FIFO;
|
||||
|
||||
|
||||
sleep $seconds_to_wait
|
||||
done;
|
||||
}
|
||||
|
@ -157,9 +157,6 @@ updates() {
|
|||
|
||||
cd $(dirname $0)
|
||||
|
||||
#Trap magic
|
||||
trap "trap - SIGTERM && kill -9 -- -$$" SIGINT SIGTERM EXIT
|
||||
|
||||
#Fifo
|
||||
[ -e "$FIFO" ] && rm -f $FIFO
|
||||
mkfifo $FIFO
|
||||
|
@ -174,6 +171,12 @@ diskspace &
|
|||
wifi &
|
||||
updates &
|
||||
|
||||
( while true; do cat $FIFO; done ) | python ./barformatter.py "$FORMAT" | lemonbar -g 1366x18 -f "Stlarch:size=6:style=regular" -f "Inconsolata:size=8" -B "#88000000"
|
||||
#Trap magic
|
||||
trap "kill -9 -$$" TERM INT
|
||||
echo Trap set for $$
|
||||
|
||||
exit 0
|
||||
(
|
||||
( while [ -e "$FIFO" ]; do cat $FIFO; done ) | python ./barformatter.py "$FORMAT" | lemonbar -g 1366x18 -f "Stlarch:size=6:style=regular" -f "Inconsolata:size=8" -B "#88000000"
|
||||
) &
|
||||
|
||||
wait $!
|
||||
|
|
Loading…
Reference in a new issue