3 lines
164 B
Bash
Executable File
3 lines
164 B
Bash
Executable File
#!/bin/bash
|
|
BATTINFO=$(acpi -b | grep Discharging || echo 100\%) && [[ $( echo "$BATTINFO" | grep -Eo '[[:digit:]]+%' | tr -d "\%") -lt 80 ]] && systemctl poweroff
|