hovancik / stretchly

The break time reminder app
https://hovancik.net/stretchly
BSD 2-Clause "Simplified" License
4.53k stars 439 forks source link

Stretchly doesn't respect Focus assist setting on Windows 10 (aka how to enable do-not-disturb on Windows) #645

Closed Merlin2001 closed 4 years ago

Merlin2001 commented 4 years ago

Prerequisites

Description

Currently, no matter what option is set for Focus assist, Stretchly will still show its reminders.
So it seems there is no way to temporarily disable the overlays during a presentation, video call, or similar.

Maybe this is only a documentation issue, but I could not find any instructions on how to enable do-not-disturb on Windows 10 so Stretchly recognizes it.

Operating system: Windows 10 v1909 build 18363.959

Steps to Reproduce

  1. Set the shortest possible schedule for mini breaks
  2. Enable Focus assist:
    image
  3. Wait for scheduled break

Expected behavior: Stretchly doesn't interrupt when one of the focus modes is selected.

Actual behavior: Stretchly doesn't care 😄

Reproduces how often: 100%

Additional Information

hovancik commented 4 years ago

Seems like that's not supported by library I use :( https://github.com/felixrieseberg/windows-quiet-hours/issues/1

Aziks0 commented 4 years ago

There is this library: https://github.com/bitdisaster/windows-focus-assist that can be used to get the current mode set by Focus assist.

hovancik commented 4 years ago

Nice :)

Aziks0 commented 4 years ago

I've tried the library and it works as expected on Windows 10 v1903 build 18362.592. I can implement the feature if you want.

Merlin2001 commented 4 years ago

Thank you all for looking into the issue! 🙏

Once implemented I'll happily provide feedback if the API still works on the most recent Windows builds!
(I'm now on Windows 10 v2004 build 19041.388)

Aziks0 commented 4 years ago

I'm waiting for @hovancik approval before making a PR

hovancik commented 4 years ago

@Aziks0 feel free to go ahead :)

I started new job so I am basically tired to check emails every day but I hope to find time over weekend :)