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
0
bin/ex
Normal file → Executable file
0
bin/ex
Normal file → Executable file
0
bin/npm-install-globals
Normal file → Executable file
0
bin/npm-install-globals
Normal file → Executable file
|
|
@ -3,11 +3,10 @@
|
||||||
# the purpose of the script is to notify when battery percentage is low
|
# the purpose of the script is to notify when battery percentage is low
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
lvl=$(cat /sys/class/power_supply/BAT0/capacity)
|
if [[ "$(cat /sys/class/power_supply/BAT0/capacity)" -le 30 ]]; then
|
||||||
if [ "$lbl" -le 30 ]; then
|
notify-send --urgency=CRITICAL "Battery Low" "Consider plugging cable in"
|
||||||
notify-send --urgency=CRITICAL "Battery Low" "Consider plugging cable in"
|
sleep 1200
|
||||||
sleep 1200
|
else
|
||||||
else
|
sleep 120
|
||||||
sleep 120
|
fi
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue