Hello
i have on my Laptop Conky which Shows also the Batterie Status
Battery: ${battery_percent BAT0}% ${alignr}${battery_bar 8,70 BAT0}
and yes if works fine sofar.
But is there a possibiliti to have a Orange battery_bar if the power go out / and a green battery_bar if the battery is loading.
have a nice day
vinc
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Conky and battery status
Re: Conky and battery status
Something like:
Battery: ${execpi 5 cat /sys/class/power_supply/BAT0/uevent | grep POWER_SUPPLY_CAPACITY= | cut -d'=' -f2 | xargs ~/Configuration/colorizebattery.sh}% ${alignr}${battery_bar 8,70 BAT0}${color}
maybe you must change the execpi command to fit to your system. It need the colorizebattery.sh script:
Don't forget give execution flag to script:
You can customize the script to show more color scale.
Battery: ${execpi 5 cat /sys/class/power_supply/BAT0/uevent | grep POWER_SUPPLY_CAPACITY= | cut -d'=' -f2 | xargs ~/Configuration/colorizebattery.sh}% ${alignr}${battery_bar 8,70 BAT0}${color}
maybe you must change the execpi command to fit to your system. It need the colorizebattery.sh script:
Code: Select all
#!/bin/bash
# colorizebattery.sh
FULL=80
FINE=40
WARM=10
if [[ $1 > $FULL ]]
then echo "\${color green}"$1
elif [[ $1 > $FINE ]]
then echo "\${color yellow}"$1
elif [[ $1 > $WARM ]]
then echo "\${color orange}"$1
else echo "\${color red}"$1
fi
exit 0
Code: Select all
chmod +x ~/Configuration/colorizebattery.sh
- alan stone
- Posts: 269
- Joined: 2011-10-22 14:08
- Location: In my body.
Re: Conky and battery status
I haven't tested it, however you might have a look here, here and here ('using lua scripts in conky' section).
Re: Conky and battery status
There is also a online documentation.
i did not look into it , only saw its listing.
i did not look into it , only saw its listing.