+5
-2
@@ -118,12 +118,15 @@ upscat | awk -F, '
|
||||
for (i = 1; i <= NF; i++) csv[$i] = i
|
||||
}
|
||||
!$csv["AC Present"] && $csv["Remaining Capacity"] < 50 {
|
||||
print "On battery with " $csv["Remaining Capacity"] "% left, suspending"
|
||||
system("systemctl suspend")
|
||||
print "On battery with " $csv["Remaining Capacity"] "% left, shutting down"
|
||||
system("systemctl poweroff")
|
||||
exit
|
||||
}'
|
||||
```
|
||||
|
||||
Beware that in my experience, merely having Eatons connected over USB can
|
||||
mess with your system's ability to suspend.
|
||||
|
||||
Packages
|
||||
--------
|
||||
Regular releases are sporadic. git master should be stable enough.
|
||||
|
||||
Reference in New Issue
Block a user