Battery Time Remaining
KDE Plasma 4 Extensions
Score 74%
Description:

This project is discontinued. Please do not use this. Use the default plasmoid from KDE.

There will be no more updates.


Battery Remaining Time Display Widget

Update: works with kde SC 4.5


1. By default it \"constantly\" displays the \"Battery time remaining\" in HH : MM (when discharging).

2. Alternatively, you can change it to per cent remaining in \"Settings\".

3. When AC-adaptor is connected it displays the \"Time required to reach full charge\".

4. Complete integration with \"Power management - Power Devil\"


REQUIREMENTS:
A recent KDE SC 4.5 or above for version 0.4

(if you have 4.4 or lower then use version 0.3)

If you have kubuntu then issue:
sudo apt-get build-dep kdeplasma-addons
For a list of dependencies for other distros see Depends packages:
http://packages.ubuntu.com/karmic/kdeplasma-addons

INSTALL:
tar jxvf
cd plasma-??????
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release ../
make
make install
(or you may need sudo make install)

USING:
1. Logout of KDE SC and then login again.
2. Add Widgets -> \"Remaining Time\"

FAQ:
If you have problems please check that you can _read_ permission for the two files:
`kde4-config --prefix`/lib/kde4/plasma_applet_remainingtime.so
`kde4-config --prefix`/share/kde4/services/plasma-remainingtime.desktop

After inserting the AC-adaptor the widget takes approx.10 sec to update.
This is because
$> plasmaengineexplorer --engine powermanagement

takes sometime to update. (can someone help me and send a patch).

If you have strange \"time remaining values\" please check the directory:
/proc/acpi/battery/BAT{0,1}
Contact your distro or laptop manufacturer. Some batteries report strange values: See for example:
https://bugzilla.redhat.com/show_bug.cgi?id=439460
https://bugs.launchpad.net/bugs/460631


UNINSTALL:
Delete the two files:
`kde4-config --prefix`/lib/kde4/plasma_applet_remainingtime.so
`kde4-config --prefix`/share/kde4/services/plasma-remainingtime.desktop
and logout and login again

CREDITS:
(Whereas Battery Plasmoid with Remaining Time shows the time only on mouse hover my plasmoid shows "Data" constantly.)
http://kde-look.org/content/show.php?content=120309
Last changelog:

5 years ago

Monochrome icons: There is now space between the time and icons in the new monochrome icons kde 4.5 SC for Lucid.

0.4: works with kde 4.5

0.3 Fixed the paint colour font problem.

0.2: Change line 59: in file batterytime.cpp

from: Separator
to : KSeparator

0.1: initial version

Can anyone help me with translations.

marcotangaro

6 years ago

It does not compile with kde 4.6:
-- Build files have been written to: /home/marco/Apps/plasma-batterytime-monochrome/src/plasma-batterytime-monochrome-0.4/build
Scanning dependencies of target plasma_applet_batterytime_automoc
Generating brightnessosdwidget.moc
Generating batterytime.moc
/home/marco/Apps/plasma-batterytime-monochrome/src/plasma-batterytime-monochrome-0.4/batterytime.h:187: Error: NOTIFY signal 'labelAlphaChanged' of property 'labelAlpha' does not exist in class Battery.
automoc4: process for /home/marco/Apps/plasma-batterytime-monochrome/src/plasma-batterytime-monochrome-0.4/build/batterytime.moc failed: Unknown error
pid to wait for: 0
returning failed..
make[2]: *** [CMakeFiles/plasma_applet_batterytime_automoc] Error 1
make[1]: *** [CMakeFiles/plasma_applet_batterytime_automoc.dir/all] Error 2
make: *** [all] Error 2

Report

sebas

6 years ago

So this applet is a fork of a fork of the battery applet?

The obvious problem I see here is: How do you keep up with bugfixes from upstream?

While having a quick look at the package, I see that you have removed me as the author of the applet, while you more or less just renamed it. I think that's less than polite.

The original applet already supports showing the remaining time. I've explained how to enable it in a blog entry: http://vizzzion.org/blog/2009/11/battery-improvements-in-kde-plasma-4-4/

It's also possible to add the remaining time using the 'desktop console'.

The reason why we don't explain it by default is that the time given is unreliable and changes based on how your computer is used. We did add it as a hidden feature, though.

Report

C

biophysics

6 years ago

>Fork of a Fork?
>So this applet is a fork of a fork of >the battery
>applet?

I created this to have the monochrome icons. No hidden agenda.

>The obvious problem I see here is: How >do you keep
>up with bugfixes from upstream?

I just made it for some my laptop at that time to have monochrome icons and time remaining. Since the upstream has monochrome may be nobody needs this plasmoid.


>While having a quick look at the >package, I see
>that you have removed me as the author
>of the
>applet, while you more or less just >renamed it. I
>think that's less than polite.

The reason I removed it was not because I am selfish but I did not want anyone to file bug report to you and annoy you. I am being polite. I can now add a big statement that you are original author of this applet :-) if you need the more publicity!

>The original applet already supports >showing the
>remaining time. I've explained how to >enable it in
>a blog entry:
http://vizzzion.org/blog/2009/11/battery-improvements-in-kde-plasma-4-4/

I did see that. (BTW I read planetkde, planetubuntu, dot.kde everyday) But remember not every one reads your blog. I made this applet to show the time remaining directly - normal users do not want to edit config files!


>It's also possible to add the >remaining time using
>the 'desktop console'.
>The reason why we don't explain it by >default is
>that the time given is unreliable and >changes
>based on how your computer is used. We >did add it
>as a hidden feature, though.

It works in my laptop so I wanted to help others that may use it. Is this a problem for you?

There are many things in KDE -SC that do not work depending on the computer but it is OK and acceptable. Life is like that!

Since you have admin privileges please delete the project if you think it does bad for KDE SC.

Again, I am not looking for money or so from the author name. Perhaps do you mean that I should not have published it after making changes?

Report

sebas

6 years ago

Neither am I looking for money or publicity. It just struck me that I find some code on the Net which I've written, and where my name is removed from the Author's credits, and not even named anywhere else. I'm not out for publicity, you should just credit people where credit is due.

Neither is there a clear statement where this code comes from, or that the problem your applet tries to solve can easily be solved by editing the Battery's config file.

BTW, I don't have admin privileges, and wouldn't use them either just to make my point.

Feel free to maintain this package though, but please, if you publish it, also incorporate any bugfixes we make upstream to your copy. As far as I can see, you're quite a bit behind on those.

Report

sebas

6 years ago

Ow, and for your users, it would probably be a good idea to also state how the same can be achieved by editing the config file.

You see, compiling code is not always trivial (see number of comments on build problems here), for most people, it's probably far easier to just add the line to the config file, and be done.

While at it, you could make clearer that this applet is a copy of the upstream plasmoid, that it can lag behind on bugfixes, and that bugs should be reported to you, unless people can reproduce with the Vanilla battery.

Thanks for your cooperation!

Report

C

biophysics

6 years ago

>While at it, you could make clearer >that this applet is a copy of the >upstream plasmoid, that it can lag

Just like to point out that this plasmoid is not an exact _copy_ but a bit different:
This shows the time remaining _constantly_ and the text has an offset from the image. See the monochrome screenshot.



>Neither am I looking for money or >publicity. It just struck me that I >find some code on the Net which I've >written, and where my name is removed >from the Author's credits, and not >even named anywhere else. I'm not out >for publicity, you should just credit >people where credit is due.

>Neither is there a clear statement >where this code comes from

Sebas, can you carefully see in the DESCRIPTION just below UNINSTALL a bit text called CREDITS. This is where I took the initial code.


>Ow, and for your users, it would >probably be a good idea to also state >how the same can be achieved by >editing the config file.

Several things in gnome can be done by editing the config file but in KDE-SC everything has a nice place in systemsettings with simple tick boxes. I like this plasmoid to be in this way.



>You see, compiling code is not always >trivial (see number of comments on >build problems here), for most people, >it's probably far easier to just add >the line to the config file, and be >done.

With due respect why can't someone else have a different way of doing thing instead of your idea?

>It just struck me that I find some >code on the Net which I've written, >and where my name is removed from the >Author's credits

If I had posted the code with your name also, you might be telling me that other people reading the code _may_ think this code is your idea (instead of editing the config file _easily_). You would have told me at that point that I misrepresent the your ideas.




>Feel free to maintain this package >though, but please, if you publish it, >also incorporate any bugfixes we make >upstream to your copy. As far as I can >see, you're quite a bit behind on >those.

I can only try to do it within my time constraints. As I told before since the upstream has monochrome and config file editing ease" may be nobody needs this plasmoid. Not everyone has time and so many laptops to run kde-trunk to update it frequently.


I have great respect for all of you kde-devs, but please allow others to express their ideas. Next time I edit the code I will add your name. Is this fine? Anything else?

Report

sebas

6 years ago

I'm not disallowing anything (you apparently read too much in my comments), just that some users would get away without compiling the forked applet if you made clearer that the same can be done without installing a 3rd party fork. It might just be that some people prefer it. (As you note, it would make it much easier to get bugfixes out to these people.)

Report

dglent

7 years ago

i cant make it work, when i added in plasma, plasma crashs.
I have Mandriva 2010.1 kde 4.5 and i installed the version 0.4

Another question is if it will be possible to replace the default battery plasmoid in the system tray (integrated in system tray)

Report

C

biophysics

7 years ago

>>i cant make it work, when i added in >>plasma, plasma crashs.
>>I have Mandriva 2010.1 kde 4.5 and i >>installed the version 0.4

Can you logout or better reboot.

$ kde4-config -v
Qt: 4.7.0
KDE Development Platform: 4.5.00 (KDE 4.5.0)

Does it compile?

>>Another question is if it will be >>possible to replace the default battery

Right-click on system tray and select Systemtray settings. you can select the new plasmoid there.

Report

dglent

7 years ago

the output of kde4-config is qt 4.7 kde 4.5
the compile finish without any problem

Report

ffaxel

7 years ago

Hey! I'm trying to build your .4 version. I have built your .3 version with no problem, but building this one gives me this (cmake went all right):
Scanning dependencies of target plasma_applet_batterytime
[ 50%] Building CXX object CMakeFiles/plasma_applet_batterytime.dir/plasma_applet_batterytime_automoc.o
[ 75%] Building CXX object CMakeFiles/plasma_applet_batterytime.dir/batterytime.o
/home/axel/Downloads/Plasmoids/plasma-batterytime-monochrome-0.4/batterytime.cpp: In function ‘Plasma::IconWidget* createButton(QGraphicsWidget*)’:
/home/axel/Downloads/Plasmoids/plasma-batterytime-monochrome-0.4/batterytime.cpp:457: error: ‘class Plasma::IconWidget’ has no member named ‘setPreferredIconSize’
make[2]: *** [CMakeFiles/plasma_applet_batterytime.dir/batterytime.o] Error 1
make[1]: *** [CMakeFiles/plasma_applet_batterytime.dir/all] Error 2
make: *** [all] Error 2

Any ideas?

Thanks!
Axel

Report

C

biophysics

7 years ago

Check what version of KDE you are having?

Try in a terminal

$ kde4-config -v
Qt: 4.7.0
KDE Development Platform: 4.5.00 (KDE 4.5.0)

Or look in Konqueror -> Help -> About Kde

Which version is it?
for plasmoid-0.4 you need kde4.5

If you have old version of kde then use 0.3

Report

ffaxel

7 years ago

Damn! I have 4.4.5. Sorry I was SURE I had 4.5 xD

Anyways, thanks :)

Report

gerstavros

5 years ago

Hi. I have 4.9.1 and i have the same problem

Report

giaur

7 years ago

It works nice (Debian Sid), but:
- It shold be possible to remove text label next to icon (configuration option for this is not bad idea), for me, this text label is not necessary at all
- Why not standard power devil icons? Your icon is not very nice (my opinion)

Report

C

biophysics

7 years ago

the reason for me to do this plasmoid is that I would like to see the time (my opinion).

These icons are the new icons of kde SC. They are not my icons.

If you want to old icons then you can use the previous version of plasmoid.

Report

giaur

7 years ago

For me, time display next to tray icon is not needed. In my opinion, displaying this time in popup message is enough. So, I suugest to add configuration option for remove displaying time in tray (but, of course remaining time should be still displayed on popup window after I click the icon).

Report

C

biophysics

7 years ago

>is enough. So, I suugest to add >configuration option for remove displaying time in tray (but, of course >remaining time should be still >displayed on popup window after I click

Thanks for the suggestion.

May I request you to perhaps send a patch?

Unfortunately, I am having very busy work these days.

Report

ademmer1977

7 years ago

I run openSUSE 11.3 with KDE 4.5 and your plasmoid compiled and installed fine. But it does not find my battery. I launched it with the plasmoidviewer to see whether it complains about something but everything seems to work fine. Before looking into the code: Where is the batteryinfo supposed to be found?

Report

C

biophysics

7 years ago

If you read the description:

$> plasmaengineexplorer --engine powermanagement

Select powermanagement and you should see Battery-> has Battery -> true

Can you type this in a Konsole and paste the output for me here in comments:
$> solid-hardware query 'IS Battery'

May be you can logout or restart the machine?

Does the standard battery applet detect the battery?

Report

ademmer1977

7 years ago

The plasma pm engine seems to work:
http://imagebin.ca/view/65ciFJ.html

This is the ouput of the query "solid-hardware query 'IS Battery'":
udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0'

I already tried rebooting - it did not fix the problem.

Found on openSUSE 11.3 and KDE 4.4.93.

Report

ademmer1977

7 years ago

Forgot to mention: The default battery plasmoid works well.

Report

ademmer1977

7 years ago

How does your plasmoid determine the remaining time? Through solid? Then I figured it out, whats going wrong. Solid wraps "lshal" and that displays an rate of 0. So no remaining time display for me... :-/

Report

C

biophysics

7 years ago

perhaps you can remove the power adaptor (wait a minute) and post the plasmaengineexplorer

some batteries show zero with power adaptor connected.

Report

marcotangaro

7 years ago

the lucid monochrome work very well... but I'm using elegance black plasma theme, but time remaining does not follow theme color font and is black too...

Report

5 years ago

Monochrome icons: There is now space between the time and icons in the new monochrome icons kde 4.5 SC for Lucid.

0.4: works with kde 4.5

0.3 Fixed the paint colour font problem.

0.2: Change line 59: in file batterytime.cpp

from: Separator
to : KSeparator

0.1: initial version

Can anyone help me with translations.

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.4
updated Oct 05 2012
added Apr 25 2010
downloads today
0
page views today 3