Hello there,
New here and a bit green, but worked in IT and data, so I have enough knowledge to be dangerous.
I’ve found that ActivityWatch does exactly what I need in order to track my gaming addiction, but I’m struggling to get information from queries. I’m trying to match a set of window titles for a time period, and the query looks something like this (taken from the default query):
afk_events = query_bucket(find_bucket(“aw-watcher-afk_”));
window_events = query_bucket(find_bucket(“aw-watcher-window_”));
window_events = filter_period_intersect(window_events, filter_keyvals(afk_events, “status”, [“not-afk”]));
merged_events = merge_events_by_keys(window_events, [“title”]);
final_events = filter_keyvals(merged_events, “title”, [’(?i)activity.*’]);
RETURN = sort_by_duration(final_events);
and while merged_events clearly has window titles in it that have “Activity” in the string, when I check for the final_events variable, nothing shows up. What am I doing wrong here?
I haven’t been able to find any information regarding what filtering can be done (where do I need to look for things like “filter_period_intersect” syntax and other queries etc?), and I can’t seem to get the regex to work. Any ideas?
Thanks in advance.
Andy