-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add event_duration as a config parameter #50
Conversation
Sorry but this is a bit too much of a hacky workaround for me to want to merge it. I realize I indicated otherwise in ActivityWatch/aw-client#53 (comment), but "polluting" the data with assumptions like this at the watcher level seems like trouble. |
Hi @ErikBjare, I don't think the PR is that hacky since what it does is simply exposing the default parameter to the configuration file. Additionally, exposing the event duration parameter is orthogonal to the improved window title query in #40. Even if querying the window title can be faster, users may not want to invoke that too frequently. |
Breaking the core tenet of 'leave assumptions to the analysis stage' is bound to cause issues. If we let users set it that will break assumptions we make about zero-duration events in the analysis stage, likely leading to confusing bugs and other trouble (that I don't want to have to investigate when they inevitably create bug reports...). I simply don't want to merge and maintain a configuration option that only a single (or very few) user(s) will use as a workaround for another issue, especially when it comes with significant drawbacks.
Why not? If it's fast there's no reason not to. Setting |
Okay. Then as I stated in the previous comment, different events may have different
Okay, I can understand. Never mind. :)
Because for some users, the frequency can be unnecessarily high for daily usage tracking. At end, never mind if you think the PR is unnecessary, and feel free to close it. :) |
The hope is that improved speed will make the impact on performance and battery life negligible. For example, aw-server-rust is probably a 10x improvement over aw-server-python in both regards (on other platforms than macOS, where aw-watcher-window isn't the bottleneck). Regardless, I'm grateful you took the time to engage and contribute this PR, even if it won't get merged, so thank you for contributing! ❤️ |
This PR adds the
event_duration
configuration which sets the duration of each event sent to aw-server.Users can set the configuration to the same value of
poll_time
, so that in the web-ui's timeline two consecutive events show as two lines rather than two dots, even if the two events indicate different windows and cannot be merged. This makes the timeline look more nature, but as a price, it adds a new assumption that the window keeps unchanged within theevent_duration
time.The default
event_duration
is 0, which does not change the current behavior of aw-watcher-window.This PR is a follow-up to the PR in aw-client.