Description: This is a modification of the original battery plasmoid of plasma desktop. It allows interpolation between battery states which effectivly provides a continuous bar instead of only 6 fill states.Last changelog:
I'd really like to have access to this improvement over the default battery monitor, but it doesn't want to build on KDE 4.6.4. Here's the output from "make" (cmake completes with no errors): http://pastebin.com/M1u5RED5
Any plans on updating this to work on the current version of KDE?
I'm having trouble compiling this mostly (or entirely!) because I don't know what I'm doing. I've run a cmake on the extracted source folder which created a CMakeFiles folder. Am I on the right track?
If anyone could offer up some help to this Kubuntu user, I'd be very grateful.
/home/ds/Download/battery-ng/battery.cpp:58:28: error: Plasma/Separator: Datei oder Verzeichnis nicht gefunden
/home/ds/Download/battery-ng/battery.cpp: In constructor ‘Battery::Battery(QObject*, const QVariantList&)’:
/home/ds/Download/battery-ng/battery.cpp:103: error: ‘ActiveStatus’ is not a member of ‘Plasma’
/home/ds/Download/battery-ng/battery.cpp:103: error: ‘setStatus’ was not declared in this scope
/home/ds/Download/battery-ng/battery.cpp: In member function ‘void Battery::dataUpdated(const QString&, const QHash<QString, QVariant>&)’:
/home/ds/Download/battery-ng/battery.cpp:248: error: ‘PassiveStatus’ is not a member of ‘Plasma’
/home/ds/Download/battery-ng/battery.cpp:248: error: ‘setStatus’ was not declared in this scope
/home/ds/Download/battery-ng/battery.cpp:250: error: ‘NeedsAttentionStatus’ is not a member of ‘Plasma’
/home/ds/Download/battery-ng/battery.cpp:250: error: ‘setStatus’ was not declared in this scope
/home/ds/Download/battery-ng/battery.cpp:252: error: ‘ActiveStatus’ is not a member of ‘Plasma’
/home/ds/Download/battery-ng/battery.cpp:252: error: ‘setStatus’ was not declared in this scope
Releases for trunk don't help the average user at all. So please consider to have a version for current stable, too.
Regards
m0nk
After renaming battery-oxygen.svgz to battery.svgz it compiled and installed successfully.
Is there any chance to get the remaining time calculated instead of the percentage?
That would be more interesting in my opinion.
Regards
m0nk
The option is there, but you have to edit plasma's config.
see http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/generic/applets/battery/battery.cpp?revision=978089&view=markup
More detailed:
- close plasma-desktop
- open ~/.kde4/share/config/plasma-desktop-appletsrc in a editor
- search for plugin=battery
you should see something like this:
[Containments][3][Applets][9]
geometry=2,689.5,35,35
immutability=1
plugin=battery
zvalue=270
[Containments][3][Applets][9][Configuration]
Share=false
- If here is no [Configuration] Section create it
- add the line showRemainingTime=true to this Section
- restart plasma-desktop
Ratings & Comments
8 Comments
I'd really like to have access to this improvement over the default battery monitor, but it doesn't want to build on KDE 4.6.4. Here's the output from "make" (cmake completes with no errors): http://pastebin.com/M1u5RED5 Any plans on updating this to work on the current version of KDE?
I'm very short in time for at least the next month, so I cannot port the code to 4.6/4.7. But if someone wants to do it, I can upload it here.
I'm having trouble compiling this mostly (or entirely!) because I don't know what I'm doing. I've run a cmake on the extracted source folder which created a CMakeFiles folder. Am I on the right track? If anyone could offer up some help to this Kubuntu user, I'd be very grateful.
Nice. On a side, I would change the name of the plasmoid since it's not clear what 'Battery NG' means. I found your plasmoid completely by accident.
/home/ds/Download/battery-ng/battery.cpp:58:28: error: Plasma/Separator: Datei oder Verzeichnis nicht gefunden /home/ds/Download/battery-ng/battery.cpp: In constructor ‘Battery::Battery(QObject*, const QVariantList&)’: /home/ds/Download/battery-ng/battery.cpp:103: error: ‘ActiveStatus’ is not a member of ‘Plasma’ /home/ds/Download/battery-ng/battery.cpp:103: error: ‘setStatus’ was not declared in this scope /home/ds/Download/battery-ng/battery.cpp: In member function ‘void Battery::dataUpdated(const QString&, const QHash<QString, QVariant>&)’: /home/ds/Download/battery-ng/battery.cpp:248: error: ‘PassiveStatus’ is not a member of ‘Plasma’ /home/ds/Download/battery-ng/battery.cpp:248: error: ‘setStatus’ was not declared in this scope /home/ds/Download/battery-ng/battery.cpp:250: error: ‘NeedsAttentionStatus’ is not a member of ‘Plasma’ /home/ds/Download/battery-ng/battery.cpp:250: error: ‘setStatus’ was not declared in this scope /home/ds/Download/battery-ng/battery.cpp:252: error: ‘ActiveStatus’ is not a member of ‘Plasma’ /home/ds/Download/battery-ng/battery.cpp:252: error: ‘setStatus’ was not declared in this scope Releases for trunk don't help the average user at all. So please consider to have a version for current stable, too. Regards m0nk
Thank you for testing. I added a version based on the source from 4.3. Hope this works.
After renaming battery-oxygen.svgz to battery.svgz it compiled and installed successfully. Is there any chance to get the remaining time calculated instead of the percentage? That would be more interesting in my opinion. Regards m0nk
The option is there, but you have to edit plasma's config. see http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/generic/applets/battery/battery.cpp?revision=978089&view=markup More detailed: - close plasma-desktop - open ~/.kde4/share/config/plasma-desktop-appletsrc in a editor - search for plugin=battery you should see something like this: [Containments][3][Applets][9] geometry=2,689.5,35,35 immutability=1 plugin=battery zvalue=270 [Containments][3][Applets][9][Configuration] Share=false - If here is no [Configuration] Section create it - add the line showRemainingTime=true to this Section - restart plasma-desktop