3 files changed,
6 insertions(+),
7 deletions(-)
Author:
Smirnov Oleksandr
ss2316544@gmail.com
Committed at:
2024-11-14 21:26:30 +0200
Parent:
61a2707
jump to
| M | bin/ex |
| M | bin/npm-install-globals |
| M | config/hypr/bat.sh |
M
bin/ex
M
config/hypr/bat.sh
@@ -3,11 +3,10 @@
# the purpose of the script is to notify when battery percentage is low while true; do - lvl=$(cat /sys/class/power_supply/BAT0/capacity) - if [ "$lbl" -le 30 ]; then - notify-send --urgency=CRITICAL "Battery Low" "Consider plugging cable in" - sleep 1200 - else - sleep 120 - fi + if [[ "$(cat /sys/class/power_supply/BAT0/capacity)" -le 30 ]]; then + notify-send --urgency=CRITICAL "Battery Low" "Consider plugging cable in" + sleep 1200 + else + sleep 120 + fi done