battery_nag.sh, only run if not already running.

This commit is contained in:
me
2026-08-19 14:47:06 -07:00
parent b0620734b6
commit 8ec82bd3f1
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -2,6 +2,15 @@
# 20260819 - Hyperling
# Alert the user every so often once the battery is low.
echo "`date` - Checking Active Programs"
ps -ef | grep battery_nag.sh | grep -v grep
active="$?"
if [[ "$active" == 0 ]]; then
echo "Program already running, exiting."
exit 1
fi
echo "`date` - Loading Functions"
which battery.function
+1 -1
View File
@@ -368,4 +368,4 @@ exec_always --no-startup-id feh --recursive --randomize --bg-fill ~/Pictures/Wal
exec_always --no-startup-id "killall picom; picom -f"
# Battery
exec_always --no-startup-id "killall battery_nag.sh; battery_nag.sh"
exec_always --no-startup-id battery_nag.sh