mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
bin: update scripts
This commit is contained in:
parent
61a2707c89
commit
e3a3ab31d4
3 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue