📜 ⬆️ ⬇️

About the battery status applet

This is a translation of an article on wiki.ubuntu.com about how a battery status applet in Ubuntu should be. Presumably, this type of applet will be implemented in future versions of the operating system.

There should be a simple battery status menu that replaces the panel applet displayed by the gnome-power-manager . The rest of the Gnome power manager interface should work as usual.
We also offer this project to KDE and Kubuntu developers, as a possible replacement for the menu displayed. kpowersave kpowersave .

Explanation


The battery status menu exists to indicate how much time is left when the rechargeable thing (battery, UPS, mouse, iPod, Bluetooth phone, etc.) is discharged, and vice versa - how long the device will charge.

Requirements for illustrations


A total of 97 icons are needed, although 33 of them may differ only in different graphics (in short, a total of 67), and 60 others consist of 30 pairs that differ only in color.
For each of (battery, mouse, universal device), should be:
Well, there should also be one universal battery icon for use when the battery has been removed or when its charge level has not yet been determined.
')

Design


The two pictures below show what the menu will look like in the normal case (only the laptop battery) and in the maximum version (the battery is removed, there is an iPod and a mouse):
image

When to show the menu


The “Power Management Preferences” window should be adjusted to the “Power Settings” window with simpler options to specify when to display the power menu.

It was:

image

It should be:

image

By default (regardless of any previous Power Manager Gnome settings), the installation should be "Always when the device being charged is present." (If the menu disappeared every time the device was fully charged, it would be difficult to understand that it was fully charged and not removed or recognized.)

Detailed about icons


Both in the menu title and in the menu content, the device being charged must be represented by the status diagram icon that most closely matches the component or device: batteries, mice, etc.

If it is a battery that is either missing or unknown, the circuit should use the universal battery icon.
If the device is fully charged, the inside of the badge must have a connector emblem.
If the device is discharged, the inside of the icon should be filled from left to right approximately as far as the charge remaining. If a device or battery has less than 30 minutes of work left, the fill should be red, not black. (This coloring is consciously based on time, not based on percentage, because the amount of time you have left is more important than how much time a battery can theoretically last based on the percentage of charge).

Headline


The menu header should tell you right away what you need to know most: which device will lose the charge the fastest, for example. (For more details, you can access the menu directly.)
If the menu is set to “Whenever a responsible device is present”, but the charge level has not yet been detected, the menu title should consist of a universal battery icon.
If all components are fully charged, the menu title should consist of a “battery with connector” icon, a “mouse with connector” icon.
If something is discharged, the menu title should consist of an icon representing the type of device that is supposed to lose power faster than anyone. For example, if your laptop battery is supposedly discharged after 1 hour and 47 minutes, and your wireless mouse battery is supposedly discharged after 27 minutes, the menu title should appear as a mouse icon containing a red fill.

Menu items


The menu should contain one item for each device, as well as a separator if there are any devices, and “Power Settings".

The order of the devices should be as follows:
1. Any internal battery or batteries (if there is more than one, they are listed in alphabetical order in the order of the sysfs path, but not showing this same sysfs path)
2. UPS
3. Wireless Mouse
4. Anything else

The menu item for each device (component) should consist of three elements.
1. Icon representing the type of device.
2. Text representing the component name (“Battery”, “Mouse”, “UPS”, “iPod”, etc.) and charge status:
• “N charged” if it is fully charged;
• “N (percentage estimate)” if the device is charging or discharging, but an accurate time estimate cannot be made yet;
• “N (h: min) is not charged yet” if it is charging and time is known;
• “N” if it discharges in more than 12 hours;
• “N (h: min) left” if the device is discharged in less than 12 hours.

Clicking on the item representing the device should open the "Device Information" window from the "Gnome Power Manager" for that component. (In KDE, the "KPowersave Information Dialog" would open.)

Unfortunately, the Linux kernel does not provide real identifiers for multiple batteries in a computer (that is, the make and model of the battery); they only have sequence numbers, and tags like “BAT0” and “BAT1”. Thus, while it is impossible to show the real names in the menu.

Source: https://habr.com/ru/post/102311/


All Articles