ActivityWatch / aw-webui

Webapp for visualizing and browsing ActivityWatch data, built with Vue.js.
Mozilla Public License 2.0
109 stars 110 forks source link

Adding custom timeline colors for custom watchers? #604

Closed RTnhN closed 3 months ago

RTnhN commented 3 months ago

It seems that there are colors for specific titles that are hardcoded into the web-ui for the timeline view. It would be great if there was a way to add more colors without needing to compile it. I just have some custom watchers that I want to use specific colors.

https://github.com/ActivityWatch/aw-webui/blob/e6ad4cd5eb34e5a6556f71373a9b74f3d90ca1b6/src/util/color.ts#L20-L49

davidfraser commented 3 months ago

Another related approach would be to use the category colours for the timeline - see activitywatch#573

RTnhN commented 3 months ago

I don't see a problem initially with doing that. The UI for adding category colors seems to be already mature. Adding colors another way would be more trouble than that.

I can maybe poke around and see how those colors get used in the other tab when I get some margin.

davidfraser commented 3 months ago

I have a version of this that's at least initially working in my timeline-category-colors branch (draft pull request at #609) To give this a go, check out this version of aw-webui, and run npm run build Then instead of the normal aw-server-rust, run aw-server-rust --webpath \path\to\aw-webui\dist Then reload the browser looking at ActivityWatch and you should see category-based colors in the timeline

RTnhN commented 3 months ago

Nice! I'll try to check this out.

RTnhN commented 3 months ago

Fixed with #609