28-10-2021, 17:02
0
Kod:
#!/bin/bash
var=$( cat /sys/class/power_supply/BAT0/capacity )
if [ $var -lt 31 ]
then
yad --image "dialog-information" --title "Info" --button=gtk-ok:0 --text "Low battery level (30%)"
else
if [ $var -gt 64 ]
then
yad --image "dialog-information" --title "Info" --button=gtk-ok:0 --text "Hi battery level (65%)"
fi
fi
yad --image "dialog-information" --title "Info" --button=gtk-ok:0 --text "Test text"