diff --git a/.local/bin/scripts/dbar b/.local/bin/scripts/dbar index b252cd5..d0adf93 100755 --- a/.local/bin/scripts/dbar +++ b/.local/bin/scripts/dbar @@ -4,6 +4,8 @@ sym="|" # [ "$(transmission-remote -l | grep %)" ] && delay="10s" || delay="1m" delay="1m" +echo "$$" > "$HOME/.cache/dbar.pid" + cd "$HOME/.local/bin/scripts/dwmbar/" || exit 1 status() { diff --git a/.local/bin/scripts/refbar b/.local/bin/scripts/refbar index c0c58b9..e46b720 100755 --- a/.local/bin/scripts/refbar +++ b/.local/bin/scripts/refbar @@ -1,4 +1,5 @@ #!/bin/sh -pkill -SIGTRAP dbar -[ ! "$(pgrep dbar)" ] && dbar & +[ ! "$(pgrep dbar)" ] && { dbar & exit; } + +pkill -P "$(cat "$HOME/.cache/dbar.pid")" sleep