diff options
author | frosty <passedgoandgot200@disroot.org> | 2025-07-04 07:07:06 -0400 |
---|---|---|
committer | frosty <passedgoandgot200@disroot.org> | 2025-07-04 07:07:06 -0400 |
commit | 0a70b07e4bb0d22d8762697ff863cf87179f9731 (patch) | |
tree | a08e4d448d867f4e904314798e0f9d3f89fe48d2 /.local/bin/notify-battery | |
parent | 9be23514542ab9aedb6fb465301cba7a134fd4eb (diff) | |
download | dotfiles-0a70b07e4bb0d22d8762697ff863cf87179f9731.tar.gz dotfiles-0a70b07e4bb0d22d8762697ff863cf87179f9731.zip |
add scripts
Diffstat (limited to '.local/bin/notify-battery')
-rwxr-xr-x | .local/bin/notify-battery | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.local/bin/notify-battery b/.local/bin/notify-battery new file mode 100755 index 0000000..f50e356 --- /dev/null +++ b/.local/bin/notify-battery @@ -0,0 +1,8 @@ +#!/bin/sh + +set -eu + +for bat in /sys/class/power_supply/BAT*; do + read -r capacity <"$bat"/capacity + notify-send -c osd -h int:value:"$capacity" -h string:x-dunst-stack-tag:"$0_$bat" "Battery (${bat##*/})" "$capacity%" +done |