Skip to content
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

fix: ignore loginwindow events #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

iloveitaly
Copy link
Contributor

workaround for #85. Yes, we should do the polling solution we outlined, but this has worked for me locally the last couple weeks and I don't have the time for anything else right now :)

could we get this in as a stopgap until someone has time for the correct solution?

@iloveitaly
Copy link
Contributor Author

@ErikBjare friendly reminder here!

1 similar comment
@iloveitaly
Copy link
Contributor Author

@ErikBjare friendly reminder here!

@ErikBjare
Copy link
Member

I'm not sure how I feel about this.

Kinda feels like sweeping the problem under the rug. Merging this PR would lead to otherwise unexplained gaps (unless you happen to look at logs).

I would prefer a workaround on the front-end, such as adding a "ignored pattern" feature (similar to the "always count as active pattern" feature). Which is a wanted feature anyway.

@iloveitaly
Copy link
Contributor Author

@ErikBjare what do you think about "filling in" AFK events as outlined in #85? It feels like we should have a AFK timeline, even if the computer goes to sleep.

This would fix this issue without (a) adding the complexity of polling in the swift app and (b) without hacky exclusion rules.

@iloveitaly
Copy link
Contributor Author

@ErikBjare friendly bump here! Curious your thoughts on the above Q.

@iloveitaly iloveitaly force-pushed the ignore-loginwindow branch from ea5cf4d to 8e10bac Compare June 16, 2023 18:59
@theolundqvist
Copy link

I'm not sure how I feel about this.

Kinda feels like sweeping the problem under the rug. Merging this PR would lead to otherwise unexplained gaps (unless you happen to look at logs).

I would prefer a workaround on the front-end, such as adding a "ignored pattern" feature (similar to the "always count as active pattern" feature). Which is a wanted feature anyway.

Hello! Is there any such feature? I would like to ignore the terminal window completely since I use the tmux watcher. Otherwise i get double the time each day. How is this usually solved when using editor watchers?

@ErikBjare
Copy link
Member

@theolundqvist It's fairly trivial to implement (esp if you look at the audible-as-active PR for guidance). You could probably do it yourself! If not up your alley, I will try to get around to it Soon™.

Also, cool to see someone in the same city as me randomly on the internet. If you wanna grab lunch sometime, let me know :)

@ErikBjare
Copy link
Member

@iloveitaly Filling in AFK events when the device is asleep/off is not something we want to do (we used to!), as it makes it very difficult to know:

  • if the computer was on
  • if the other watchers have crashed/missing data

Looking at this, I think that there might be an issue with the window watcher. If the computer is off (unable to pull the active window), it should not fill the time when the device was off.

The window watcher should not use a high pulsetime to fill these gaps, but instead rely on the poll-augmentation to expect a recent last event, which is updated with a smaller pulsetime.

@theolundqvist
Copy link

@ErikBjare thanks, I took another approach for now but I may check into that PR. I'am currently working on a fork of the aw-watcher-tmux by akohlbecker to make it work more like an editor watcher. I use neovim as an editor but wanted to track the time I am spending in the git repo no matter if I am in neovim or not. My goal is to show today's total time spent in the current git repo in the tmux statusbar. I think I will be able to get it done.

I plan to also include short breaks and focus shifts to browser etc as work in the repository but that will be done in post. I guess it is best to not augment the data directly in ActivityWatch.

Thanks for the invitation. I recognised the founders names as swedish but did not know that ActivityWatch was founded by LTH students, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants