Initial commit
commit
4d61a485a3
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
limit=${1:-18}
|
||||||
|
acpi=$(acpi -b)
|
||||||
|
acpi_status=$(echo "$acpi" | awk -F ': |,' {'print $2'})
|
||||||
|
|
||||||
|
[ "$acpi_status" == "Discharging" ] &&
|
||||||
|
acpi_value=$(echo "$acpi" | awk -F ", " {'print $2'} | sed 's/%//') &&
|
||||||
|
[ "$acpi_value" -lt "$limit" ] &&
|
||||||
|
export DISPLAY=:0.0 &&
|
||||||
|
notify-send -u critical "Battery charge at $acpi_value%"
|
||||||
|
|
Loading…
Reference in New Issue