Sessions To Sort Activity

I was wondering if there was a way to change how the Data is sorted in the Dashboard.
Rather than by day, is it possible for ActivityWatch to sort data out by session? I tend to do a lot of work near midnight, so my time is split up among two days. It would be a lot more useful for me if AW had a “Start Session” and “End Session” feature. Is this possible in AW with a couple tweaks on my end?
If it’s not, then consider it a suggestion, as I have no coding capability what-so-ever, haha

Sorry for the late answer.

Well, to fetch that data from activitywatch should be trivial because we only work with starttimes/endtimes when fetching activity. However, making a user interface for it would be a bit of work. To me this doesn’t sound like the most common way to go about tracking the activity so I won’t put any time into developing this, but if someone wants to develop this I’d be happy to help!

I am only in my first months of learning software development, but if it’s within my abilities I would like to help out on something like this. I had a similar thought about grouping further into sessions and I think it could be useful to some of us as an option. I would very much appreciate it if you could give me a high(ish) level description of what would be required.

What would be needed would be two things:

  • Make a new aw-watcher which creates sessions in a bucket to aw-server
  • Support in aw-webui to fetch and visualize active time by session instead of by afk time

To create a aw-watcher which creates sessions would actually be rather easy. Just a simple app (possibly a part of aw-qt?) which sends a heartbeat every 15s or so until the user stops the session.
How buckets, events and heartbeats works in activitywatch you can read about here: https://activitywatch.readthedocs.io/en/latest/buckets-and-events.html
And a template on how to write a watcher you can find here: https://activitywatch.readthedocs.io/en/latest/writing-watchers.html

Regarding adding support for this in aw-webui, fetching the activity during the sessions should be a piece of cake with our query API (which is currently badly documented sadly though, I can help with that). Actually visualizing it though could be hard depending on how ambitious you want the visualization to be.