wms_raimbow.sh as alarm script.

This commit is contained in:
#root_informatica 2024-05-11 02:33:00 -03:00
parent 8ad32cbfb5
commit a97e6ef7e8
1 changed files with 4 additions and 3 deletions

View File

@ -8,10 +8,11 @@
read -r STATUS < /sys/class/power_supply/BAT0/status
read -r LEVEL < /sys/class/power_supply/BAT0/capacity
# alarm function. (depends of wms_batlarm.sh)
# alarm function. (depends of wms_rainbow.sh)
alarm() {
if [ -n "$DISPLAY" ] && [ -z "$(pgrep wms_batlarm.sh)" ]; then
wms_batlarm.sh &
check=$(pgrep wms_rainbow.sh)
if [ -n "$DISPLAY" ] && [ ! -n "$check" ]; then
wms_rainbow.sh &
fi
}