Closed jlemonde closed 2 years ago
Hi @jlemonde
I now feel like my comment in the README.md sounds a bit misleading. The "huge numbers" you see is not exactly an issue or a bug. When the laptop is on AC, the current supply increases a lot, hence the huge power value (in my case, it tops at ~40W). In fact, you may see this value drop a lot when the charge percentage has passed 80/90% simply because laptops reduce the charging rate when it is close to full.
My widget uses the current value supplied directly by the kernel through the "/sys/class/power_supply/BATx/current_now" file. You can check it yourself and compare the current values in your laptop when on AC and battery.
I don't want to display "AC" as the main purpose of the widget is to show the power consumption. However, I can show something like "xx W 🗲" just to make it clearer if really needed, but even this is redundant considering that user would already have the AC/charging indicator in KDE's battery icon.
I can definitely update the README.md to make the reason for rise in power value during AC more clearer to users though :D Thanks for bringing that to my attention!
@atul-g I developed basically the same widget for cinnamon (cinnamon-spices-repo) but switched to plasma now and found yours :-) nice!
I added the 🗲 in front to show that it's charging power. I think the option to add that would be nice. Also, when the battery is full, instead of displaying 0.0 W, only the 🗲 is shown. There is status can be read from the file /sys/.../status.
@joka42 Thanks for the input! Based on the requests, I have added a "🗲" indicator next to the displayed watts when the laptop is charging. I have made this as a feature which the user can opt-in to if they want, through the general configurations settings of the widget - reason being the widget's main purpose was to show the consumed energy numbers in real-time and inform the user about the laptop battery behavior in different statuses (including when the laptop is fully charged).
Feature added in v0.2
Whenever I am on AC, I see huge numbers, which apparently is a known issue mentioned in the README.md.
Could we have the string "AC" when on AC power instead?