markusfisch / ScreenTime

Displays your screen time in a permanent notification.
The Unlicense
114 stars 10 forks source link

Visualization over multiple days #29

Closed mixal-iirec closed 5 months ago

mixal-iirec commented 6 months ago

Hi, this PR is WIP. Mostly to gather feedback and to prevent duplicate work.


This PR adds another screen containing visualization of screen-time over multiple days.

I wanted to see not only the total time, but also the distribution itself.

Given the information density, I minimized the amount of text describing individual days, and I rather just highlighted starts of weeks/months.

Hopefully the visualization is mostly self explanatory. The green dots show total screen-time on given day, measured from left side. I wanted to have the total time and distribution on the same screen, so that I can quickly compare them - with choice of colors so that my brain can easily choose which one to focus on.

Current limit is 90 days, which is probably the maximum that could be useful with this level of detail. (For simplicity I create the whole graph as a single bitmap. Which for more days is no longer a good strategy)


Admittedly, it currently looks a bit ugly. Though I am not sure whether that ugliness is caused by the visualization method, or by my non-existent sleep schedule.. :D

Screenshot_20240316-024740

markusfisch commented 6 months ago

This looks really interesting! Great work! 👍

I haven't been able to add a feature like this to the app for a long time, but it has been requested frequently! So I really welcome this PR! And I would merge it immediately when you think it's ready?

About the visualisation, I think a legend that explains the month separator and the green dots would be helpful. Maybe at the bottom of the bitmap?

mixal-iirec commented 5 months ago

Functionwise, it is ready for merge. (You probably want to get more fitting icon for opening multiday screen)

Legend is scrolled above the graph.

The added seekbar controls minimal duration to which any record is lengthened. This lengthening is useful for small records, which otherwise would not be visible, and for finding long intervals without any screen use.

(also: removed assumption that all days have 24h)

markusfisch commented 5 months ago

Very nice! 👍 And thanks a lot for these final touches! Really happy to finally merge it! 😄