battery_nag.sh, only run if not already running.
This commit is contained in:
@@ -2,6 +2,15 @@
|
|||||||
# 20260819 - Hyperling
|
# 20260819 - Hyperling
|
||||||
# Alert the user every so often once the battery is low.
|
# 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"
|
echo "`date` - Loading Functions"
|
||||||
|
|
||||||
which battery.function
|
which battery.function
|
||||||
|
|||||||
@@ -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"
|
exec_always --no-startup-id "killall picom; picom -f"
|
||||||
|
|
||||||
# Battery
|
# Battery
|
||||||
exec_always --no-startup-id "killall battery_nag.sh; battery_nag.sh"
|
exec_always --no-startup-id battery_nag.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user