xfce4-power-manager handles all batteries managed by upower, which also includes attached devices such as wireless mice. When the state of such a device changes, it shows a notification such as "Your Battery is discharging". This can be confusing. One can assume that the laptop charger just broke or the cable is faulty, when in fact it was juwt the mouse :) Power Manager should probably only show notifications for devices with the PowerSupply flag set to true. Or alternatively, include the device name in the notification so the user can distinguish power events. Thanks!
Created attachment 9751 Proposed patch
Hi, i created a patch for this issue. Now xfce4-powre-manager shows also the battery vendor and battery model in the notification.
I've got some feedback on the patch and corrected the behavior. Now the power manager shows the device type in the notification when it's not a display_device. Before attaching a new patch here, i would like to know where the notification should be. I suggest that we are placing the device type in brackets next to the bold font heading. What do you think about it?
Thanks, Fabian. Looks like you forgot a comma: xfpm-battery.c:132:86: error: expected ‘)’ before ‘battery’ 132 | msg = g_strdup_printf (_("%s %s\nYour %s is discharging"), vendor, model battery->priv->battery_name); | ^~~~~~~~ | ) I added the comma and tested it. I also noticed that the discharging notification shows the battery name twice, because it is added in the "is discharging" line and again in the "Estimated time left is" line. Other than that it works. Cheers!
I would suggest we create a mockup - can also be text-based - for what notifications should look like. Example: | Icon | Power Manager | | Icon | Your battery is discharging | Furthermore I would consider to replace the (slightly redundant) "Power Manager" subject of the notification. e.g. | Icon | Low Power | | Icon | 14% of Battery remaining | Or: | Icon | Battery Time Remaining | | Icon | You have xx minutes of battery time remaining. | A few of the current texts are super-obvious and redundant, everybody knows they have to connect to a charger to avoid power running out... So if you wanna spend some time on good suggestions that would be appreciated. Ideally also include your suggestions with respect to mentioning the device type.
Okay, here are some mockups. (Device type is shown as DevType and first line == heading) (Dis)Charging: | Icon | DevType | | Icon | Battery of DevType is (dis)charging | | Icon | Estimated time (left/until fully charged): $timestring | Full charged: |Icon|DevType| |Icon|DevType is fully charged| Low power: |Icon|Low power| |Icon|14% remaining for DevType| Empty battery: |Icon|DevType| |Icon|Battery of DevType empty|
I think I like all of them, they're quite simple. Any reason to have two body lines in the first one? Or did you propose this for consistency because the whole notification text in the later proposals (full, low, empty) could also be shown in a single line?
I would also suggest comparing a few operating systems or DEs to get close to widespread conventions that are easily understood by everyone (I think the current proposals are fairly close to iOS).
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/79. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev