dwmbar now reset with cronjob

This commit is contained in:
i.ortega 2020-04-30 02:36:35 +02:00
parent 97739a7b8e
commit cc1eab3e76
2 changed files with 5 additions and 4 deletions

View File

@ -196,6 +196,6 @@ while :; do
# again. We run sleep in the background and use wait until it finishes,
# because traps can interrupt wait immediately, but they can't do that
# with sleep.
sleep 60 &
sleep 120 &
wait
done

7
scripts/reset-dwmbar.sh Normal file → Executable file
View File

@ -1,5 +1,6 @@
#!/usr/bin/env sh
p_num=$(pgrep busybox | head)
echo "$p_num"
kill -s 5 $p_num
p_num=$(pgrep -a busybox | grep "busybox ash /home/initega/bin/dwmbar.sh" |
cut -d ' ' -f 1)
# echo "$p_num"
[ -n "$p_num" ] && kill -s 5 "$p_num"