scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit 912cfdb8fcdd120560caec0a525400e9ffced59c
parent bb24546550d4f7860444ca63859157af868e4b54
Author: Sebastiano Tronto <sebastiano.tronto@gmail.com>
Date:   Tue, 10 May 2022 08:16:10 +0200

Fixed battery-checknow to not depend on notify-battery

Diffstat:
MTODO | 3+++
Mbattery-checknow | 3++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git 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 @@ -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"