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

Make SafeEyes register break if system was idle #658

Open
jtunhag opened this issue Oct 14, 2024 · 2 comments
Open

Make SafeEyes register break if system was idle #658

jtunhag opened this issue Oct 14, 2024 · 2 comments
Labels

Comments

@jtunhag
Copy link

jtunhag commented Oct 14, 2024

Is your feature request related to a problem? Please describe.
When taking a spontaneous break (i.e. the system goes idle), I come back to a SafeEyes that says I should take a break only a few minutes after.

Describe the solution you'd like
I'd like an option for SafeEyes to have registered my computer idling as a break and not only as having paused SafeEyes. So when I come back to my computer, I want the break counter to restart from 0 again.

Describe alternatives you've considered
I guess this somehow belongs in the Smart Pause plugin..?

Additional context

@deltragon
Copy link
Collaborator

Two questions for clarification: Is this about long breaks, or about short breaks?
Did you ensure the Smart Pause plugin is enabled and works correctly? (It does not work properly on some desktop environments, unfortunately.) You can test that it works by either looking at the debug logs (which will say "Pause Safe Eyes due to system idle" and "Resume Safe Eyes due to user activity" whenever you go idle/return), or by looking at the tray icon (which will become greyed out when you're idle, and colorful when you're active.

For some context: the smart pause plugin already has some logic around this. (Admittedly, I don't 100% understand the logic here either, so part of this is me writing it down as I read the code.)
It treats long breaks and short breaks differently, however, and for good reason in my opinion.
For all breaks, it will ensure that only the active time is counted for the break interval - eg. if the interval is 15min, and you're active for 10 minutes, and idle for 2 minutes, the next break will happen in 5 minutes (not 3).
For long breaks specifically, if the pause is longer than the long break's duration would be, it is counted as a long break, and the queue is completely reset, as if a long break had been taken. (So the next short break would be 15min after becoming active again, regardless of what it was before, and the next long break would be 75min after, with default settings.)

Assuming that this works correctly, and your question is about short breaks: I think this should be a setting.
I have the short break duration set to 30s, the default is 15s - I would not want 30s of inactivity to be counted as a short break, and the next short break be postponed because of that, as then I would end up never taking short breaks, presumably. (Reading code or documentation etc. might mean I am "inactive" for 30s, while actually staring intently at the screen.)
I do see the point of wanting this as a configuration option, but I personally would not want it enabled by default.

@jtunhag
Copy link
Author

jtunhag commented Oct 15, 2024

At first, I intended this to work the same both break types, but your reply got me thinking. What I would expect after taking a long break/idling would be that a long break was counted... :) And yes - I've verified Smart Pause works correctly.

My problem is that I leave my computer for a while (between short breaks I presume, I haven't actually checked whether I'm spontaneously pausing before a long break - will do that...) and come back only to have a break suggested a few minutes after. So I would say that the behaviour you describe is the one that I want, but that it's not the way it works at the moment. I will investigate more to see if that happens between all breaks or only before short breaks.

I completely agree with you on your last paragraph. I think I would be happy enough having my suggested autopause trigger on idling with a locked computer.

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

No branches or pull requests

2 participants