From 912cfdb8fcdd120560caec0a525400e9ffced59c Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 10 May 2022 08:16:10 +0200 Subject: Fixed battery-checknow to not depend on notify-battery --- TODO | 3 +++ battery-checknow | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 2138ced..08e651a 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,6 @@ * Modify all dmenu-* scripts to optionally use another menu, like edit-menu or vis-menu (or just use environment variables?) * sfeed-browser: optionally just write link to stdout (or to xsel -i) + +* Refactor: review all scripts and adapt to common style + Configuration file (read only at "make" time) for default apps etc.. diff --git a/battery-checknow b/battery-checknow index ed18565..eb6335e 100755 --- a/battery-checknow +++ b/battery-checknow @@ -4,6 +4,7 @@ # Requires: battery-status, notify-battery file="${XDG_DATA_HOME:-$HOME/.local/share}/batterystatus" +notify=herbe low=20 crit=15 @@ -15,7 +16,7 @@ status=$(echo "$new" | awk '{print $2}') [ "$status" = "Discharging" ] && [ $level -le $crit ] && status="Critical" if [ "$status" != "$(cat $file)" ] || [ "$status" = "Critical" ]; then - notify-battery + $notify "Battery" "$(battery-status)" fi echo "$status" > "$file" -- cgit v1.3