Hi, I have a feature request: currently power manager can nearly replace the battery plugin. But it'd be nice to be able to (optionnally) have it display the time and/or the percentage. You may want to look at the hal_based branch of xfce4-battery-plugin, which is really great.
Hi, On Saturday i've implemented something like that, but still giving not correct time, so i'll see what is done in xfce4-battery-plugin. concering the percentage, is shown in the battery icon tooltip!
(In reply to comment #1) > Hi, > > On Saturday i've implemented something like that, but still giving not correct > time, so i'll see what is done in xfce4-battery-plugin. Yes I saw that. For battery plugin, there was once a calculated time, but it wasn't really working correctly, and I submitted a patch (which I think was integrated) to just pick the time calculated by hal. > > concering the percentage, is shown in the battery icon tooltip! Yes but what I asked for was to show the time/percentage next to the icon, directly, so one doesn't have to hover the icon. This should be user-configurable of course :) I know the icon shows some indication of power left, but some people (including me) want more :)
(In reply to comment #2) > (In reply to comment #1) > Yes I saw that. For battery plugin, there was once a calculated time, but it > wasn't really working correctly, and I submitted a patch (which I think was > integrated) to just pick the time calculated by hal. I'm also picking up the time calculated by hal, but sometimes it gives funny approximation. > Yes but what I asked for was to show the time/percentage next to the icon, > directly, so one doesn't have to hover the icon. This should be > user-configurable of course :) I know the icon shows some indication of power > left, but some people (including me) want more :) I see what you mean now, don't know if this is doable with status icon, since i can't pack stuff in it and for now one can't add applet from an application directly to the panel, as Jannis said this feature will be added in 4.8.
Not feasible with status icon and with the current panel version.
Following up on this, would it be worth integrating the hal_based branch of battery plugin (well, only the UI part) so xfpm provide a panel plugin too (which could display text, like percentage and battery time directly). It'd make sense for people using xfce4-panel, and other people could still use the systray UI. (yeah, I really miss the battery infos as text, and I really think it's useful, so I'm thinking on how workarounding the “no text in systray”. The hal based battery plugin could be loaded at the same time as xfpm running without posing problem, and it'd just be display, but it'd be even better if you could have all xfpm options from the panel plugin too. What do you think? Cheers, and thanks,
[08:34:29] (kelnos): problem is that applications can't automatically add panel plugins I forgot that, so yeah, it can be tricky. Maybe xfpm could start, go to the systray, then the user could manually add the plugin if he wants to. Not sure if a panel plugin cand send dbus/hal stuff, though.
(In reply to comment #6) All xfpm can be a panel plugin, sure a plugin can use DBus and HAL services, as long as the user is allowed to. But i don't think this is the correct way to go. All power managers work in the way that xfpm is now. I think is a good idea to file a bug as enhancement for Gtk+, so they can have the possibility to add a label with a specific orientation in each Gtk Status icon. In other hand, the user can add whatever he likes to the panel.
(In reply to comment #7) > (In reply to comment #6) > All xfpm can be a panel plugin, sure a plugin can use DBus and HAL services, as > long as the user is allowed to. > > But i don't think this is the correct way to go. All power managers work in the > way that xfpm is now. Yeah I know. And I don't think it's a good idea to change that, at least the default. But it'd be nice providing “another UI” for advanced users or people used to panel plugins. That would just be another way to control xfpm. > > I think is a good idea to file a bug as enhancement for Gtk+, so they can have > the possibility to add a label with a specific orientation in each Gtk Status > icon. In other hand, the user can add whatever he likes to the panel. squisher (on irc) said it could be possible to do that using cairo/pango. I don't know enough gtk but maybe it's worth trying?
(In reply to comment #8) > squisher (on irc) said it could be possible to do that using cairo/pango. I > don't know enough gtk but maybe it's worth trying? I have some code on this already, but the pixbuf result is very ugly, somehow GdkPixbuf and cairo aren't compatible in the way of handling this. If i figure out a clean and a not expensive way to get this done, i'll add it, but i think it won't be in 0.6.0.
(In reply to comment #9) > (In reply to comment #8) > > squisher (on irc) said it could be possible to do that using cairo/pango. I > > don't know enough gtk but maybe it's worth trying? > > I have some code on this already, but the pixbuf result is very ugly, somehow > GdkPixbuf and cairo aren't compatible in the way of handling this. Ha, cool. Is there a branch for this? > > If i figure out a clean and a not expensive way to get this done, i'll add it, > but i think it won't be in 0.6.0. Yeah, I don't think it's worth messing with the first stable release :)
(In reply to comment #10) > Ha, cool. Is there a branch for this? No, actually it was just a try that i did last week on my machine.
I would also love to see some form of label, maybe a second tray icon would work good enough. I will be keeping the battery monitor's label for now. It's not urgent for me, I'm fine with waiting until after the current stable release.
I just noticed that orage does put text into the tray icon (although it looks pretty bad). Might be worth it to check out how it's done there.
btw, I vote for having only one tray icon, and then give an option to show either time or %. Both seem like overkill to me.
(In reply to comment #14) > btw, I vote for having only one tray icon, and then give an option to show > either time or %. Both seem like overkill to me. I personally frequently look at the remaining battery time, but nothing else. So for I what, I would agree one additional label would be enough.
Closing old bugs to keep things organized.
Hmh, I don't think this bug should be marked closed. It's not solved, it's just postponed. The possibility to have the remaining percentage (and time) displayed, like the battery plugin does atm, would really be nice to have. If it's definitely not possible to have it displayed in the systray because of GTK, ok, but the other solution (to provide a battery plugin, a bit like there's the brightness plugin and once was the inhibit plugin) would be nice.
(In reply to comment #17) > Hmh, I don't think this bug should be marked closed. It's not solved, it's just > postponed. The possibility to have the remaining percentage (and time) > displayed, like the battery plugin does atm, would really be nice to have. > > If it's definitely not possible to have it displayed in the systray because of > GTK, ok, but the other solution (to provide a battery plugin, a bit like > there's the brightness plugin and once was the inhibit plugin) would be nice. Yeah of course, i will provide such thing in future release, i'm sorry, i closed this bug accidentally.
http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin Is bug #9068 a duplication?
*** Bug 9068 has been marked as a duplicate of this bug. ***
*** Bug 6112 has been marked as a duplicate of this bug. ***
I believe the current version 1.4.1 has a panel plugin that can do this satisfactorily; therefore closing this bug.
(In reply to Harald Judt from comment #22) > I believe the current version 1.4.1 has a panel plugin that can do this > satisfactorily; therefore closing this bug. There's indeed a panel plugin, but I don't think it's configurable.
What's the thing you're missing?
(In reply to Harald Judt from comment #24) > What's the thing you're missing? The percentage and time remaining, as the title indicates
Created attachment 5759 panel-plugin.png Maybe there is some sort of misunderstanding, but you mean like the one in my screenshot?
(In reply to Harald Judt from comment #26) > Created attachment 5759 > panel-plugin.png > > Maybe there is some sort of misunderstanding, but you mean like the one in > my screenshot? No, I mean “next to the icon”. Directly in the panel. The previous version already displayed time and percentage a bit like this (in tooltip), and this is not what was requested.
Ok, so you want that shown in the panel besides the icon. Some design considerations. One problem with that would be the space available, so it would need to be rather concise, like: [I] 60%, 01:30 Or vertically of course, with percentage and time below the icon. [I] 60%, 01:30 Another probability would be using multiple lines (like weather plugin or cpufreq plugin), e.g. [||] 60% discharging [||] 01:30 left These settings could be hooked up to the right click menu, in a new properties dialog of the panel plugin. This is just to write this down somewhere. Does that answer better your expectations?
(In reply to Harald Judt from comment #28) > Ok, so you want that shown in the panel besides the icon. Some design > considerations. One problem with that would be the space available, so it > would need to be rather concise, like: > > [I] 60%, 01:30 > > Or vertically of course, with percentage and time below the icon. > > [I] > 60%, 01:30 > > Another probability would be using multiple lines (like weather plugin or > cpufreq plugin), e.g. > > [||] 60% discharging > [||] 01:30 left > > These settings could be hooked up to the right click menu, in a new > properties dialog of the panel plugin. > > This is just to write this down somewhere. Does that answer better your > expectations? Yes. Not denying your work on triaging bugzilla, but everything is in the bug report :)
> Yes. Not denying your work on triaging bugzilla, but everything is in the > bug report :) Yes, but there has already been written a lot in this bug report, so much that I got bored midway and decided it's best to put down a definition and put it in a nutshell. I've added this to the backlog as a possible new feature (patches are very welcome of course): https://wiki.xfce.org/design/power-manager
Yup, thanks for the concise description Harald – that is exactly what I'd expect this to be. In terms of conciseness, one could evaluate the existing solutions in e.g. Ubuntu's power indicator or OSX, since both of those deal with this problem already (although only with a single panel layout).
Created attachment 6175 Add hidden option to show percentage next to icon in plugin I've written a small patch that displays the percentage next to the battery. I still have to come up with a decent way to map the remaining time (e.g. "1h 34m" or "1:34h" or "1:34" etc). Theoretically we could make that configurable, but I'm not sure it's worth the hassle. Feedback appreciated either way! Note: After applying this patch (on top of git master) you have to set "show-percentage" via xfconf to TRUE.
Created attachment 6188 Add option to show percentage or remaining time in panel plugin I've reworked my patch a bit and extended it. Now you can either 0: show no label 1: show the percentage 2: show the remaining time (charging or discharging, format: %hh:%mm) 3: show time and percentage If the battery is full, the label is hidden automatically. In order to test this, you need to apply the patch and add the property /xfce4-power-manager/show-panel-label to xfce4-power-manager's xfconf channel as INT. So for the moment this is a hidden option. Depending on whether we want to add more options to the plugin (I can't think of any), we might want to add that to a properties-dialog. An alternative would be to add a submenu to the plugin's menu offering the choices as "Show percentage" and "Show remaining time" checkboxes that are not mutually exclusive (in this case 1+1 would be 3 :)). Another note: any values displayed are courtesy of UPower, so if e.g. the percentage goes down but the remaining time goes up, complain to them. Also, keep this in mind: https://xkcd.com/612/
Created attachment 6189 Add option to show percentage or remaining time in panel plugin Fix typos in the patch.
Created attachment 6190 Add option to show percentage or remaining time in panel plugin After some testing and feedback from Eric, I've ironed out a few more small issues. Note: if the label isn't hidden at 100% or 0:00 remaining time, it is because UPower isn't reporting the state as "fully charged". Using the percentage or remaining time has it's own set of problems though, which is why I decided to go with UPower directly. (E.g. my battery strangely only loads up to 98% at times.)
Created attachment 6294 Add hidden option to show percentage or remaining time in panel plugin Rebased the patch against git master aka 1.5.
On a desktop - changing the variable from between 0 and 2 leaves the result showing in the plugin (xubuntu 15.10) On laptop - when on mains just have battery icon, when on battery label changes to expected from variable
I pushed my patch to git master, so it'll be released with 1.5.1. There is still room for improvement of course (like the detection and automatic handling of desktops, where the label should always be hidden etc.), but I think this is a good start and a nice improvement over the status quo. Marking this fixed.