A stupidly simple KDE Plasma 5 widget to monitor the power consumption of your laptop battery in real time.
There are two ways to install this widget in your KDE Plasma.
- Head over to the Plasma Add-On installer by going to:
Right click on Desktop -> Add Widgets -> Get New Widgets -> Search and Install this Widget
. - Download the
powerMonitor.plasmoid
file shared in this repo's release section or from the widget's KDE Store link. After this, you can just do this:Right Click on Desktop -> Add Widgets -> Install from local file -> Point to the downloaded package.plasmoid file
.
As of now there are only two configuration settings; To make the text bold and to alter the update interval of the widgets:
- The widget displays power consumption in Watts.
- This widget makes use of the
/sys/class/powe_supply/BAT[i]/
files to query the voltage and current consumption. If the widget displays "0.0 W", then chances are that you don''t have this file in your Linux Distribution. - The power usage rises continously when the laptop is plugged in to A/C power. It is normal if you see high readings.
For testing purpose, you can use plasmoidviewer
command (you will need to install plasma-sdk
with your OS package manager before that).
- Make source code changes
- Simply run
plasmoidviewer -a /path/to/package/folder/package
(eg,plasmoidviewer -a ~/plasma-power-monitor/package
)
Making the plasmoid file
- Simply compress the
package
folder into a ZIP archive. - rename the resultant zip file, change the extension to
plasmoid
fromzip
. - Use this to install the widget from local file.