add notification for low battery
Prithu Goswami prithugoswami524@gmail.com
Sat, 21 Dec 2019 09:33:08 +0530
1 files changed,
11 insertions(+),
0 deletions(-)
jump to
M
i3blocks/battery
→
i3blocks/battery
@@ -9,7 +9,18 @@ ;;
*) #symbol="<span font='Icons 11'>\uf213</span>" #symbol="<span font='Material Design Icons'>\uf079</span>" + [ $percent -le 30 ] && notify-send -u critical "Battery Low" -i battery-low ;; esac + echo -e "$symbol$percent" + +awk -v percent=$percent ' + BEGIN { + if (percent <= 30) { + print "#FF0000"; + exit 33; + } + } +'