Cleaned up scripts folder and moved some stuff
This commit is contained in:
parent
d003263cb6
commit
02642f9dc6
33 changed files with 42 additions and 142 deletions
9
home/.scripts/hibernate-lowbattery.sh
Executable file
9
home/.scripts/hibernate-lowbattery.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
acpi -b | awk -F'[,:%]' '{print $2, $3}' | {
|
||||
read -r status capacity
|
||||
|
||||
if [ "$status" = Discharging -a "$capacity" -lt 5 ]; then
|
||||
logger "Critical battery threshold"
|
||||
systemctl hibernate
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue