Remaining time in the Battery Monitor widget

Mostly as a reminder to myself, here’s how to show remaining battery time in the Battery Monitor widget shipped with KDE Software Compilation >= 4.3:

Remaining time in the Battery Monitor

  1. Right click on the battery and choose “Battery Monitor Settings”
  2. Enable “Show charge information” and click on “OK”
  3. Quit plasma-desktop with the command

    kquitapp plasma-desktop

  4. Open ~/.kde4/share/config/plasma-desktop-appletsrc in your favorite text editor (some distributions use other paths, for example ~/.kde/...)
  5. Search for the term

    showBatteryString=true

    and add the following line directly below it:

    showRemainingTime=true

  6. Start plasma-desktop again

    plasma-desktop

You may disable “Show charge information” now if you want.

Credits to Sebastian Kügler for posting the instructions on the plasma-devel mailing list. I’ll try to also add them to Userbase when I have some more free time.

Note that I do not want a flame war here about if this should be the default setting/configurable in the GUI – it’s been discussed before, and complaining here won’t make any difference.

Enjoy!

Advertisement

22 Responses to “Remaining time in the Battery Monitor widget”

  1. JimYC Says:

    Hi Hans,

    thanks for this information. What is the basis of this time estimate (acpi information I guess).

    Regards
    Jim

  2. Markus Says:

    Which Plasma theme is that? Looks nice

  3. Hans Says:

    @JimYC:
    Unfortunately I can’t answer your question, but it seems to be reported by HAL (see link below). From my small search I also discovered that Sebastian Kügler has already blogged about this feature (which I failed to find prior to writing this blog post :():
    http://vizzzion.org/blog/2009/11/battery-improvements-in-kde-plasma-4-4/

    @Markus:
    It’s Glassified.

  4. JimYC Says:

    @Hans,

    I didn’t see it either, therefore Sebastian will be quite happy that you “found” it again. Anyways, the link answered all my questions. Keep up the good work.

    JimYC

  5. Fri13 Says:

    Nice that someone brought this feature to knowledge of avarage users!

  6. Adriano ML Says:

    If you are dumb like me, don’t forget to unplug the AC adaptor! Else you won’t see any difference =)

  7. Cyril Says:

    @Adriano

    You were not the only one… 😉

  8. Links 15/3/2010: CrossOver Linux, Tim Bray Joins Google | Boycott Novell Says:

    […] Remaining time in the Battery Monitor widget Mostly as a reminder to myself, here’s how to show remaining battery time in the Battery Monitor widget shipped with KDE Software Compilation >= 4.3… […]

  9. Kevin Kofler Says:

    Or just use Fedora, which enables this feature by default:
    http://cvs.fedoraproject.org/viewvc/rpms/kdebase-workspace/devel/kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime.patch?revision=1.1&view=markup

    In fact, we just make the popup always show the remaining time. We don’t enable the option you describe for a simple reason: the overlay shown on mouseover should really in percent, not time. Try mousing over that tiny icon and watch it try to display the remaining time as a time. There’s no way this will fit. In addition, I don’t see the benefit of offering to hide this information in the popup, where there’s plenty of room to display it.

  10. Hans Says:

    @Kevin Kofler:
    Not sure I understand what you mean. When I mouse over the battery icon, the overlay only shows the remaining battery capacity in percent.

    With that said, I use KDEMod packages which seems to use the same patch as the one you linked to (and one for the battery tooltip). If I remember correctly “remaining time” was always displayed by default, but in the recent 4.4.x versions I had to enable it as described above.

  11. Kevin Kofler Says:

    @Hans:
    > When I mouse over the battery icon, the overlay only shows the remaining battery capacity in percent.
    That’s probably because:
    > With that said, I use KDEMod packages which seems to use the same patch as the one you linked to
    🙂

    If you use the option described in the blog post (which you can still do even with the patch), you’ll see what happens.

    > If I remember correctly “remaining time” was always displayed by default, but in the recent 4.4.x versions I had to enable it as described above.

    It was displayed by default until 4.2, they disabled it in 4.3 (and kept it disabled in 4.4). We’ve been patching it in Fedora ever since.

  12. Kevin Kofler Says:

    PS: We’re patching this because our users complained about the regression, see:
    https://bugzilla.redhat.com/show_bug.cgi?id=515166

  13. Sylvain Chamberland Says:

    In Plasma Netbook 4.4.2, the overlay only shows percentage, even with the modification of plasma-netbook-appletsrc. The remaining time will only show in the popup.

    Under Plasma Desktop 4.3, the overlay showed remaining time. But the space occupied in the panel by the widget was larger than necessary, probably because of the space needed to display the time.

    I wanted to have a quick look at the remaining time, so I configured a keyboard shortcut for the widget.

  14. Hans Says:

    @Sylvain Chamberland:
    You might want to try this plasmoid: http://kde-look.org/content/show.php/Battery+Time+Remaining?content=123767

  15. Doug Siew Says:

    Thanks a million!!! It works!

  16. anton Says:

    This feature have been removed with no explanation recently:

    https://bugs.kde.org/show_bug.cgi?id=304510
    https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/a6f8377ccdec5bf3a9a07c4f217583b7d18b7133

    Do you have any idea why? Probably you can undo this this commit or resubmit the feature again?

  17. Anand Ramesh Says:

    Excellent.. after an upgrade to KDE 4.10.1 the “remaining time” wasn’t displayed… this worked wonderfully… although I wish the perview while the mouse hovers over the battery icon, shows the timing information as well. Is there a similar field-value pair in the same file which can display the timing information on the preview as well?

  18. Hans Says:

    @Anand Ramesh:

    I don’t think so (actually, I thought this option had been removed in 4.10 as well). You could try this plasmoid but I’m not sure if it still works.

  19. paul Says:

    Thank you for posting the instructions to display ‘time remaining.’ It really is very useful even though not 100% accurate, I can now make informed decisions about usage. esp. when out outside…

  20. Carlos Says:

    Wow! Thanks a lot!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: