nokyan / resources

Keep an eye on system resources
GNU General Public License v3.0
611 stars 46 forks source link

clearer presentation of device batteries #259

Open TheRsKing opened 1 week ago

TheRsKing commented 1 week ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe.

for example, i have a wireless logitech mouse, when i connect it via cable, its battery statistics are also displayed in resources. but this is hardly distinguishable from device batteries and can therefore cause confusion

Describe the solution you'd like

it would be useful to use a different color for external devices and to mention the device name in the sidebar

Describe alternatives you've considered

No response

Additional context

grafik

nokyan commented 1 week ago

Hi, thanks for the issue. I'll look into how to distinguish laptop batteries from e.g. mouse batteries. Hopefully the device name (in your case "hidpp[…]" is consistent and conclusive enough.

TheRsKing commented 1 week ago

hey thanks! what about using the model name for external devices?

nokyan commented 1 week ago

hey thanks! what about using the model name for external devices?

I would've gone for that too but the problem is that the model name isn't always useful. For example, the model name of my notebook's battery is apparently "0x4C 0x32 0x31 0x4D 0x34 0x50 0x45 0x32". I didn't reencode this or anything, this is exactly what comes out of the "model_name" file in SysFS and I've seen other instances of other weird encodings online. This example does decode to proper UTF-8 though, maybe I'll implement some decoding mechanisms for Resources to try.