mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-28 05:57:45 +01:00
statusbar: improved battery script to notify with more information
This commit is contained in:
parent
d447b87ac1
commit
73168a2db4
@ -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 ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user