summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xacpi-notify.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/acpi-notify.sh b/acpi-notify.sh
new file mode 100755
index 0000000..ff80c38
--- /dev/null
+++ b/acpi-notify.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PERCENTAGE="$(acpi | cut -d',' -f2 | sed 's/^ //')"
+REMAINING="$(acpi | cut -d',' -f3 | sed 's/^ //')"
+STATUS="$(acpi | cut -d' ' -f3 | sed 's/,$//')"
+
+notify-send "${STATUS} ${PERCENTAGE}" "${REMAINING}"