PINE64
I can NOT recommend the KDE plasma widgets - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112)
+--- Thread: I can NOT recommend the KDE plasma widgets (/showthread.php?tid=10027)

Pages: 1 2


RE: I can NOT recommend the KDE plasma widgets - robt - 07-03-2020

I played around, strangely enough it shows much bigger on my screen, so I took out some empty lines (font size difference?).
Naturally, then I started modifying it to suit my needs. It's really cool.

I would like to include the remaining battery time, but the standard conky variables are not working. The battery indicator on the tray does show the estimate on mouse-over, so the system somehow knows.
Does anyone know how to solve this?


RE: I can NOT recommend the KDE plasma widgets - JasonG-FR - 07-04-2020

Quote:I would like to include the remaining battery time, but the standard conky variables are not working. The battery indicator on the tray does show the estimate on mouse-over, so the system somehow knows.
Does anyone know how to solve this?

The file `/sys/class/power_supply/cw2015-battery/time_to_empty_now` contains the remaining time in minutes, I wrote a small bash script to format it (hh:mm):

Code:
#!/bin/bash
time=$(cat /sys/class/power_supply/cw2015-battery/time_to_empty_now)
hours=$(($time/60))
minutes=$(printf "%02d" $(($time%60)))
echo $hours:$minutes

Save this code in a bash file (`bat_remaining_time.sh` for example), give it the execution permission (`chmod +x bat_remaining_time.sh`) and try to execute it (./bat_remaining_time.sh).

If everything works, you can add this command to your conky config to display it (the number 10 after `execi` means that the script is executed every 10 seconds):

Code:
${execi 10 /bin/bash /path/to/script/bat_remaining_time.sh}



RE: I can NOT recommend the KDE plasma widgets - robt - 07-09-2020

Excellent!!
Thanks a lot!