summary refs log tree commit diff
path: root/bin/lowbat
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2020-01-30 10:08:22 +0100
committerRobert Günzler <r@gnzler.io>2020-01-30 10:08:22 +0100
commit93cf74b37c40ffa85f7920b3897e70699c949cc7 (patch)
tree5c60b30be920e928ff8597e4668e485b1b43d27c /bin/lowbat
parent48e82a9a7437fdad28b566c850fce8c79ac1e477 (diff)
Cleanup bin/
Diffstat (limited to 'bin/lowbat')
-rwxr-xr-xbin/lowbat19
1 files changed, 0 insertions, 19 deletions
diff --git a/bin/lowbat b/bin/lowbat
deleted file mode 100755
index 90702a1..0000000
--- a/bin/lowbat
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-set -e
-
-acpi -b | awk -F'[,:%]' '{print $2, $3}' | {
-	read -r status capacity
-
-	if [[ $status -eq "Discharging" ]]; then
-		if [[ $capacity -lt 10 ]]; then
-			echo "battery capacity: $capacity"
-			notify-send "battery low" "System will hibernate at 5%"
-		fi
-		if [[ $capacity -lt 5 ]]; then
-			echo "hibernating"
-			notify-send "battery low" "System will hibernate now"
-			systemctl hibernate
-		fi
-	fi
-}