Working on neomutt setup and some other small fixes
This commit is contained in:
parent
ab9bd17296
commit
ddbee7f692
36 changed files with 152 additions and 155 deletions
9
scripts/hibernate-lowbattery.sh
Executable file
9
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