Open fossfreedom opened 9 years ago
@fossfreedom I have wrote a bash script but it requires acpi to be installed
sounds interesting - any chance you can copy and paste the contents of the bash script here?
@fossfreedom this is the code
#!/bin/bash
#Battery level
var=$(acpi -V| awk -F',' 'NR==1, /Battery 0:/ {print $2}');
# Temperature
#var=$(acpi -V| awk -F',' '/Thermal 0: ok, / {print $2}');
echo $var
For notifiying we have to simply use a conditional statement like if and use zenity message code or notify-send
looks like from this that the battery values can be obtained directly from /sys/ without any need for installing extra packages:
@fossfreedom Cool man, are you gonna add this function in your new release or we users have to add it ourselves. I have no python skills and have no idea how to use this information.
would be more than useful to have two battery level sensors
One that monitors if the battery reaches below a given percentage before using notify-send to warn
One that monitors if the battery reaches above a given percentage before using notify-send to warn
above has a good example of how to use upower to get the value