stretchly icon indicating copy to clipboard operation
stretchly copied to clipboard

README: appExclusions ("Pause/resume breaks only when specific command is running") preference documentation unclear

Open Chealer opened this issue 9 months ago • 4 comments

The README's Pause/resume breaks only when specific command is running section documents the appExclusions preference:

By editing appExclusions in preferences file, you can automatically control when Stretchly breaks are paused.

If you want Stretchly to be paused when specific apps are running, you could have this value (breaks are paused when Skype or Atom are running):

"appExclusions": [
    {
        "rule": "pause",
        "active": true,
        "commands": [
            "/usr/share/skypeforlinux/skypeforlinux",
            "atom"
        ]
    }
]

If you want Stretchly to be running when specific apps are as well, you could have this value (breaks are paused when Skype or Atom are not running):

"appExclusions": [
    {
        "rule": "resume",
        "active": true,
        "commands": [
            "/usr/share/skypeforlinux/skypeforlinux",
            "atom"
        ]
    }
]

You can specify multiple values, (as appExclusions is array) and Stretchly will take the first one that is marked as "active": true.

There are quite a few things unclear here:

  1. A "command running" is Unix jargon. In Microsoft Windows terminology, it's processes (or tasks) which run. I suggest to use "program" instead of "command" and "app".
  2. It's unclear what happens when multiple values are active.
  3. If I understand correctly, the second example "pauses" (suspends) Stretchly unless one of the programs specified executes. If so, the introduction should read "If you want Stretchly to be running only when specific apps are as well […]". And―again if my understanding is correct―the parameter should be named appRequirements, or if it's both for exclusions and requirement, perhaps suspensionRules.
  4. The application examples provided are dated/poor. Skype is shutting down (eclipsed by others and replaced by Microsoft Teams), and Atom is deprecated, being eclipsed by Visual Studio Code. I suggest replacing those with Zoom Workplace, Signal Desktop, VS Code and/or VSCodium.

Chealer avatar Feb 26 '25 16:02 Chealer

Skype is officially shutting down, in May.

Chealer avatar Mar 03 '25 00:03 Chealer

  1. It's unclear what happens when multiple values are active.

The description says multiple programs are treated as an OR condition. (Either Skype or Atom are running).

I am talking about multiple (top-level) values, not multiple commands.

  1. the parameter should be named appRequirements, or if it's both for exclusions and requirement, perhaps suspensionRules.

The parameter appExclusions is fine.

I don't think so, but we can wait until the documentation is fixed and see when it's properly specified.

Chealer avatar Mar 05 '25 14:03 Chealer

I am talking about multiple (top-level) values, not multiple commands.

The documentation says " Stretchly will take the first one that is marked as "active": true".

Yes, but it doesn't say what it does with others.

You can't have both "resume" and "pause".

What do you mean? Stretchly will refuse to start with such files?

Chealer avatar Mar 05 '25 15:03 Chealer

Feel free to try how it behaves.

hovancik avatar Mar 10 '25 14:03 hovancik