From 73168a2db46642cd9ed2999fc88dd8d1fa1db747 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 22 Feb 2025 06:42:48 +0100 Subject: [PATCH] statusbar: improved battery script to notify with more information --- .local/bin/etc/statusbar/battery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/etc/statusbar/battery b/.local/bin/etc/statusbar/battery index cbc6334..6f62527 100755 --- a/.local/bin/etc/statusbar/battery +++ b/.local/bin/etc/statusbar/battery @@ -12,8 +12,8 @@ total=$(echo $acpi | sed 's/.*:\ //') status="$(echo $total | cut -d',' -f1)" capacity="$(echo $total | cut -d',' -f2 | sed 's/%//')" -if [ "$status" = "Discharging" ] && [ $capacity -le 15 ] ; then - notify-send -u critical "Battery" "Below 15%" +if [ "$status" = "Discharging" ] && [ $capacity -le 20 ] ; then + notify-send -u critical "Battery" "Low capacity: $capacity%" fi if [ $capacity -gt 40 ]