diff options
author | ZachIR <zachir@librem.one> | 2025-07-15 22:36:38 -0500 |
---|---|---|
committer | ZachIR <zachir@librem.one> | 2025-07-15 22:36:38 -0500 |
commit | a88e2fad0048f2d4fe8cab568864a5781d78341c (patch) | |
tree | 2d1911713bc5ee3428c4103ca4da3b074dda216c /acpi-notify.sh | |
parent | f6ba3cab6cc1a49519a9cd7bbe7d03a514505e38 (diff) |
Add script to send power notification
Diffstat (limited to 'acpi-notify.sh')
-rwxr-xr-x | acpi-notify.sh | 7 |
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}" |