Jump to content

CoffeeCoffee — Prevent your computer from going to sleep


vitor

Recommended Posts

Prevent your computer from going to sleep.


Type coffee to turn it on. Action with ⌥ to also prevent the display from going to sleep.
GSUCRr4.png


If you give a value it’ll be active for that amount of time. It defaults to minutes, but will also understand seconds and hours.
lrTcwSa.png


Run coffee again to manually turn it off.
d9NqISv.png

 

Download | Source

Edited by vitor
Link to comment
  • 4 months later...

Well, it doesn't use caffeine. Caffeine is a third-party application, and Caffeinate is native to 10.8+. There are other workflows that control Caffeine (I wrote one, and there are others as well. I think if you search, or there might be a link in my signature).

 

Honestly, I prefer Caffeinate because you needn't install any other software, and the less you can have on your computer, the better. (Also, my menu bar is already way too cluttered). Alfred provides a great interface for Caffeinate itself, which exists through this workflow and one that I made. Check out this one and mine, and, if you like them, then just uninstall Caffeine. Otherwise, look for one of the Caffeine workflows.

 

If you really, really, really want the Caffeine icon in the menu when using Caffeinate, then you'll probably have to code your own version that interfaces with Caffeinate, but that seems to be way more trouble than it's worth.

Link to comment
  • 2 years later...
  • 1 month later...

================================================

EDIT:

This post is wrong and I am dumb. The workflow works great.

================================================

 

This workflow doesn't seem to work for me.

 

The toggle in the Alfred results correctly changes when I turn this on/off, but it never actually effects my machine -- my mac still always goes to sleep regardless of whatever I set CoffeeCoffee to.

 

However, the Caffeinate Control workflow does work for me.

 

Here's what's really weird: 

  • if I have both workflows enabled, and I turn on Caffeinate Control, then the menu results for both Caffeinate Control and CoffeeCoffee will show that caffeinate has been turned on, and my mac will not go to sleep, as expected
  • if I have both workflows enabled, and I turn on CoffeeCoffee, then the menu results for both CoffeeCoffee and Caffeinate Control will show that caffeinate has been turned on, however my mac will still go to sleep 

So basically CoffeeCoffee looks like it's working (according to Alfred's menu results), but my mac still goes to sleep. On the other hand, Caffeinate Control both looks like it's working and also actually works. 

 

This doesn't really make sense to me at all lol

 

fwiw I'm on OS X 10.11.6 running the latest version of Alfred 3

Edited by miketheburrito
Link to comment

Updates.

  • Accept relative times. Should understand most variations, like 2 hrs, 40 minutes, 500s.
  • Action it with ⌥ to also prevent display from going to sleep.
  • Updated to latest OneUpdater.
  • New icons.

To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater.

Link to comment
  • 11 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...