New funcion "ac_adapter_connected" in battery plugin

This commit is contained in:
Eduardo Bellido Bellido
2015-02-04 23:05:03 +01:00
parent 7060850441
commit 42aa39b235

View File

@@ -1,6 +1,18 @@
cite about-plugin
about-plugin 'display info about your battery charge level'
ac_adapter_connected(){
if command_exists acpi;
then
acpi -a | grep "on-line"
if [[ "$?" -eq 0 ]]; then
return 1
else
return 0
fi
fi
}
battery_percentage(){
about 'displays battery charge as a percentage of full (100%)'
group 'battery'