summaryrefslogtreecommitdiff
path: root/acpi-notify.sh
diff options
context:
space:
mode:
authorZachIR <zachir@librem.one>2025-07-15 22:36:38 -0500
committerZachIR <zachir@librem.one>2025-07-15 22:36:38 -0500
commita88e2fad0048f2d4fe8cab568864a5781d78341c (patch)
tree2d1911713bc5ee3428c4103ca4da3b074dda216c /acpi-notify.sh
parentf6ba3cab6cc1a49519a9cd7bbe7d03a514505e38 (diff)
Add script to send power notification
Diffstat (limited to 'acpi-notify.sh')
-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}"