ActivityWatch/aw-watcher-vim

Add branch information

lyz-code opened this issue · 5 comments

It would be awesome if we could add the git branch we're working on into the heartbeat. I find it useful as it can give hints of what task you're working on inside a project.

Thanks for maintaining the watcher :)

I agree @lyz-code . I tried to fix it here https://github.com/FilipHarald/aw-watcher-vim . I don't know if this is something you want merged @johan-bjareholt ?

This can be used as query:

afk_events = query_bucket(find_bucket("aw-watcher-afk_"));
editor_events = query_bucket(find_bucket("aw-watcher-vim_"));
editor_events = filter_period_intersect(editor_events, filter_keyvals(afk_events, "status", ["not-afk"]));
merged_events = merge_events_by_keys(editor_events, ["branch"]);
RETURN = sort_by_duration(merged_events);

Awesome! thanks @FilipHarald I'd vote for this to be merged definitely

Sorry for the late reply!
Please open up a pull request and I'll review it!

Sorry for the late reply! Please open up a pull request and I'll review it!

No problem with a late reply! I have managed just fine with my own branch. :)

Let me know if you think I should change anything.