Closed richardsavio closed 3 years ago
Hi @richardsavio
Stretchly assumes the system is idle and resets breaks if there is no keyboard or mouse activity. Thus, Stretchly will not work if you want it to remind you to take a break when watching long videos.
This is expected from my point of view, as:
One solution I can think of is monitoring power management inhibitors.
this is exactly what I am doing: https://www.electronjs.org/docs/api/power-monitor#powermonitorgetsystemidletime
The idle time I get is from OS, so there's nothing more I can do. Poeple usually think of idle time as keyboard and mouse activity, but I think each OS interprets that differently. I have no proof of this, but from my experience different apps can somehow influence idle time: I've seen some fullscreen apps/browsers playing videos/VLC and other players having different efect on idle time. I get breaks with some players, not with others.
Idle time reset is configurable: https://github.com/hovancik/stretchly#natural-breaks-inactivity-time-
Also, on macOS I was using some app that was telling OS that idle time is always 0. Tried a quick search for Firefox and there's seems to be https://addons.mozilla.org/en-US/firefox/addon/keep-awake-screen-only/ . I guess there might be some Linux app or Chromium addon as well
Version
Known issues
Existing issues
What operating system are you using?
Linux
Operating System Version
Arch Linux with an up-to-date system
Reproduction steps
... Reproduces how often: [What percentage of the time does it reproduce?] 100% of the time.
Expected Behavior
I expect Stretchly to remind me to take breaks even when I am binge-watching Netflix
Actual Behavior
Stretchly assumes the system is idle and resets breaks if there is no keyboard or mouse activity. Thus, Stretchly will not work if you want it to remind you to take a break when watching long videos.
Relevant log output
Preferences
Additional information
My guess is that Stretchly assumes that the system is idle even when you are watching a video as there is no keyboard/mouse activity. And you probably do not need the long duration of 55 mins for it to work. There should a threshold after which the the system is considered to be inactive. I mention 55 mins as I am able to reproduce it a 100% of the time with those settings. Your screensaver/auto-screenlock/auto-suspend timer settings might also affect this.
One solution I can think of is monitoring power management inhibitors. Use that in addition to idle timers to determine whether Stretchly's timer should be reset. Another way might be to plug into PulseAudio on Linux and check if something is playing. Don't know if it is viable though.
A temporary workaround for me is to disable the idle timer monitoring, but the experience is not that great for me when I do it that way.
Code of Conduct