From ef4b9b8e93500eb682517bdfb8bc8500892e0c49 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 13 Feb 2021 20:17:30 +0100 Subject: [PATCH] feat: change the statusbar update calls --- .local/bin/audio_notify | 2 ++ .local/bin/bat_notify | 9 ++------- .local/bin/player | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.local/bin/audio_notify b/.local/bin/audio_notify index fae0871..c07f795 100755 --- a/.local/bin/audio_notify +++ b/.local/bin/audio_notify @@ -24,3 +24,5 @@ else dunstify -r 100002 -u "$criticity" "Current volume :" "$level%" fi + +kill -38 $(pidof dwmblocks) diff --git a/.local/bin/bat_notify b/.local/bin/bat_notify index 0056825..0ab54ca 100755 --- a/.local/bin/bat_notify +++ b/.local/bin/bat_notify @@ -24,14 +24,9 @@ update() { \ # We want the notification to be sent every 5 mins # But only if the computer is unplugged if [ "$(cat /sys/class/power_supply/AC/online)" = 0 ]; then - notify && refbar + notify && kill -36 $(pidof dwmblocks) fi wait } -while :; do - update - # Sleep for 5 minutes before sending another notification - sleep 300 & - wait -done +update diff --git a/.local/bin/player b/.local/bin/player index 24bd594..7ef39da 100755 --- a/.local/bin/player +++ b/.local/bin/player @@ -20,3 +20,5 @@ else dunstify -r 10010 -u "normal" -i "$HOME/$path" "MPD" "$out" fi + +kill -39 $(pidof dwmblocks)