bin: update scripts

This commit is contained in:
Smirnov Oleksandr 2024-11-14 21:26:30 +02:00
parent 61a2707c89
commit e3a3ab31d4
No known key found for this signature in database
3 changed files with 6 additions and 7 deletions

0
bin/ex Normal file → Executable file
View file

0
bin/npm-install-globals Normal file → Executable file
View file

View file

@ -3,8 +3,7 @@
# 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
if [[ "$(cat /sys/class/power_supply/BAT0/capacity)" -le 30 ]]; then
notify-send --urgency=CRITICAL "Battery Low" "Consider plugging cable in"
sleep 1200
else