Jump to content
vitor

CoffeeCoffee — Prevent your computer from going to sleep

Recommended Posts

Prevent your computer from going to sleep. Uses caffeinate under the hood, so no third-party apps are required.


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


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


Run coffee again to manually turn it off.
60LCrQN.png
 

Download | Source

Edited by vitor

Share this post


Link to post

The only thing I really wish this did was somehow integrate with Caffeine if you have it installed. It would be awesome if I typed "coffee 60" and for 60 minutes the little caffeine icon would show as active :D

Share this post


Link to post

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.

Share this post


Link to post

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

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

Share this post


Link to post

@miketheburrito Does your computer go to sleep, or does your display? Very different things. CoffeeCoffee stops your computer from going to sleep but does not stop your display from turning off. Both are easy to do, but this workflows only acts on the computer.

Share this post


Link to post

@vitor Oh man I am such an idiot. You're completely right.

 

The thing that tripped me up was that I forgot I had apparently selected "Keep the display awake" in the Caffeinate Control workflow options - this is what that had me thinking CoffeeCoffee "wasn't working."

 

Sorry for the confusion, and thanks for all your great workflows!

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...