aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2022-05-10 08:16:10 +0200
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2022-05-10 08:16:10 +0200
commit912cfdb8fcdd120560caec0a525400e9ffced59c (patch)
treecc65c7bdb08deb6709bfff68a677dd6cc16d8dae
parentbb24546550d4f7860444ca63859157af868e4b54 (diff)
downloadscripts-912cfdb8fcdd120560caec0a525400e9ffced59c.tar.gz
scripts-912cfdb8fcdd120560caec0a525400e9ffced59c.zip
Fixed battery-checknow to not depend on notify-battery
Diffstat (limited to '')
-rw-r--r--TODO3
-rwxr-xr-xbattery-checknow3
2 files changed, 5 insertions, 1 deletions
diff --git a/TODO b/TODO
index 2138ced..08e651a 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,6 @@
1* Modify all dmenu-* scripts to optionally use another menu, 1* Modify all dmenu-* scripts to optionally use another menu,
2 like edit-menu or vis-menu (or just use environment variables?) 2 like edit-menu or vis-menu (or just use environment variables?)
3* sfeed-browser: optionally just write link to stdout (or to xsel -i) 3* sfeed-browser: optionally just write link to stdout (or to xsel -i)
4
5* Refactor: review all scripts and adapt to common style
6 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 @@
4# Requires: battery-status, notify-battery 4# Requires: battery-status, notify-battery
5 5
6file="${XDG_DATA_HOME:-$HOME/.local/share}/batterystatus" 6file="${XDG_DATA_HOME:-$HOME/.local/share}/batterystatus"
7notify=herbe
7low=20 8low=20
8crit=15 9crit=15
9 10
@@ -15,7 +16,7 @@ status=$(echo "$new" | awk '{print $2}')
15[ "$status" = "Discharging" ] && [ $level -le $crit ] && status="Critical" 16[ "$status" = "Discharging" ] && [ $level -le $crit ] && status="Critical"
16 17
17if [ "$status" != "$(cat $file)" ] || [ "$status" = "Critical" ]; then 18if [ "$status" != "$(cat $file)" ] || [ "$status" = "Critical" ]; then
18 notify-battery 19 $notify "Battery" "$(battery-status)"
19fi 20fi
20 21
21echo "$status" > "$file" 22echo "$status" > "$file"

Generated with cgit - Back to sebastiano.tronto.net