nokyan / resources

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

Battery charge graph: Show more than one minute of data #287

Open rasmusq opened 2 months ago

rasmusq commented 2 months ago

Is there an existing issue for this?

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

The battery charge graph under the usage tab in the battery section only shows the battery charge from the past minute or so. This is not that useful because the battery barely changes charge during that amount of time.

Describe the solution you'd like

I am suggesting a longer window of maybe two days. Maybe multiple time frames to select from. This would of course require something to run in the background and log the battery data, so maybe an opt-in button is relevant.

Describe alternatives you've considered

If this is not within the scope of the project, maybe another kind of visualization is sufficient. It could be a smaller rectangle that only shows the current level - this would give the same amount of information as the current solution but using a more appropriate widget

Additional context

This is how it looks for me - almost a rectangle, but not quite: image

nokyan commented 2 months ago

Hi, thanks for the issue.

A longer timespan would have two problems:

A different widget still has the issue of being inconsistent with other graphs, I'd really like to keep the consistency because it already bugs me that the Apps and Processes tabs look different to the others.

You can set the amount of datapoints that the graphs should display higher for the time being though.

rasmusq commented 2 months ago

Hi, again!

The popularity of this project definitely comes from you having a great sense of UI/UX design, so I don't think I can argue against you there 😄

But from a functionality standpoint, maybe a simple solution would be to allow the graph to have enough data points (current limit is 300 units) to actually give meaningful additional information to the user? This would make the widget actually function as a graph as is its intended use

All said, thanks for maintaining a great and modern alternative to the other system monitoring apps! They really needed an overhaul.

nokyan commented 2 months ago

Hi, again!

The popularity of this project definitely comes from you having a great sense of UI/UX design, so I don't think I can argue against you there 😄

But from a functionality standpoint, maybe a simple solution would be to allow the graph to have enough data points (current limit is 300 units) to actually give meaningful additional information to the user? This would make the widget actually function as a graph as is its intended use

All said, thanks for maintaining a great and modern alternative to the other system monitoring apps! They really needed an overhaul.

Thank you for the compliments, I appreciate it. :)

Of course increasing the data points limit is possible, I think increasing it to 1800 which would accomodate for 30 minutes of data with normal refresh speed could make sense.

jojo2357 commented 2 months ago

I must warn you...too many data points has a tendency to become unreadable! especially on the cpu where you can have lots of large changes.

I would suggest allowing the sampling delay to be modified like gsm or mission-center do if you really want to be able to get some history.

full disclosure: i am a maintainer of mission-center

Excigma commented 2 months ago

Slightly related, but perhaps it is possible to pull data from /var/lib/upower instead? It contains some .dat files containing historical battery readings and it doesn't have that many data points (but it may be patchy). I think this is what gnome's power monitor uses to pull data for their graphs: image

gadgethm commented 4 weeks ago

Personal preference, but I would much prefer having the power usage graph be the default for this category, with battery state of charge as a secondary attribute. I imagine for most users, battery percentage is already easily visible on the system UI (Gnome and KDE alike).

Maybe it would make sense to rename this category/ "Power", and have power usage be the primary attribute shown in the sidebar, with current state of charge and other battery statistics showing up when you go to the power details section.