iccir/Fermata

Non-app/timer mode

Opened this issue · 7 comments

lozzd commented

This might be outside of the original scope of the app (I understand your original intention was to disable lid sleep when a particular app is in use) but I'm also interested in having a mode where you're moving meeting to meeting and want to close the lid. So imagine something like: Clicking the menu bar icon disables lid sleep for a given period (maybe 5 minutes), and have a Preference to adjust the default time.

iccir commented

Thanks! I'm not sure if I want to add a bunch of additional UI for this, but one idea for now:

  1. Open Script Editor
  2. Make a single line script: delay 300
  3. Save as an application
  4. Add that application to Fermata.

When you launch the app, it will remain in your Dock for 5 minutes and then self-terminate. Fermata will see it launching/terminating and adjust lid sleep as needed.

lozzd commented

Understood! It's probably outside of the original scope of the application.

In general, how do you feel about adding a "failsafe" that's configurable in the UI that will limit the max time Fermata will prevent sleep even in app mode? So have a configurable option that says, maximum lid sleep prevention time is 10 minutes (or 2 hours, or something) and after that time it automatically disables?

iccir commented

We might be trying to solve two different problems with the same root cause (Apple's lid close implementation is lacking). It sounds like you are experiencing some kind of drawback when the lid is actually closed (maybe hibernation is kicking in too early and causing a long wakeup?), whereas I'm experiencing the computer going to sleep when the lid is open.

I like the idea of a failsafe, as I'm worried about a situation where the user forgets about Fermata and drains their battery (or the computer heats up in a bag). Your failsafe works for your case, but I'm not sure if it works for mine - even 2 hours is too short for some music events (my original issue is DJs or performers accidentally sleeping their laptop due to headphones).

Activating 5AM brainstorm mode ;)

There are three main use cases for Fermata:

  1. Fermata activates when another application prevents Idle Sleep. The intention here is music apps, although it could have other uses. I think no failsafe is needed here - if I unplug my audio device, the software should (probably) stop playing and release the power assertion. By the time I toss the laptop into my bag, it should be asleep. I'm worry about DJs with 4-5 hour sets accidentally having a failsafe and encountering a failure after X hours.

  2. Fermata activates when another application is running. My original intention for this was DJ apps which misbehave and don't take out an Idle Sleep assertion when playing. This probably needs a failsafe - I can see somebody accidentally leaving an app open. On the other hand, the same issues from 1 apply - long DJ sets. I need more data on the actual use case here. Everybody I know is using 1 or 3 :)

  3. Fermata activates due to a user-initiated action. Same as 2, this probably needs a failsafe. I like your idea here. Although my original statement about additional UI remains ;)

For 1 or 2, I'm also wondering if AC Power could be a failsafe. It doesn't help your case, but it could be another option.

iccir commented

What I really want (for my cases) is: "Put the computer to sleep if the lid is actually closed". That doesn't help you though! :)

lozzd commented

Mine use case is super simple - to move between meeting rooms without my Macbook losing all network connectivity (In this case, it has a VPN and an app in Citrix running on a remote machine.. it takes a good 2 minutes to get everything back up and running plus 2 factor authentication if you accidentally let the machine sleep!)

So I want to be able to have a grace period of 5-10 minutes where I can have the lid closed and I know it won't sleep.

So I think that simplifies your above brainstorm quite significantly - I love your idea that the AC adapter is the failsafe. Basically, the configuration item I'm talking about could be "If your laptop is on battery, only allow a maximum of sleep with the lid closed". For me, I'd configure that default to be 10 minutes. After 10 minutes of the laptop being closed on battery, it sleeps.

Does that make sense? Unfortunately it does require a new UI option in the preferences though.

iccir commented

That makes sense! I looked into this today - adding battery/AC support is doable, but it greatly complicates the logic. For now, I'm opting for a simpler solution.

Fermata-128 adds a "Manual activation duration" setting, which defaults to 10 minutes. You can set this to "Forever" to get the old behavior.

lozzd commented

Awesome, thanks!