vitor Posted September 30, 2013 Share Posted September 30, 2013 (edited) Usage Prevent macOS from sleeping via the coffee keyword. Optionally give a number when enabling to activate it for that amount of minutes, or hours if an h is appended. Action with ⌘↩ to also prevent the display from sleeping. ⤓ Install on the Alfred Gallery | Source Edited March 25 by vitor robgill, arsenty and thec13 2 1 Link to comment
vitor Posted October 1, 2013 Author Share Posted October 1, 2013 Update. The number you give it is now interpreted as minutes, instead of seconds. choc 1 Link to comment
Chevex Posted February 27, 2014 Share Posted February 27, 2014 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 Link to comment
rice.shawn Posted February 27, 2014 Share Posted February 27, 2014 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
vitor Posted July 10, 2016 Author Share Posted July 10, 2016 Update. Small additions for Alfred 3 (instructions and version). Link to comment
vitor Posted October 3, 2016 Author Share Posted October 3, 2016 Update. It now uses OneUpdater, so this should be the last time you need to manually update. nikivi 1 Link to comment
vitor Posted October 4, 2016 Author Share Posted October 4, 2016 Updated to use the most recent version of OneUpdater (released today). Link to comment
miketheburrito Posted November 15, 2016 Share Posted November 15, 2016 (edited) ================================================ 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 November 16, 2016 by miketheburrito Link to comment
vitor Posted November 16, 2016 Author Share Posted November 16, 2016 @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. miketheburrito 1 Link to comment
miketheburrito Posted November 16, 2016 Share Posted November 16, 2016 @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! Link to comment
vitor Posted June 6, 2017 Author Share Posted June 6, 2017 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
obazavil Posted July 8, 2021 Share Posted July 8, 2021 Thanks for the Workflow! Finally I found one that is updated :) vitor 1 Link to comment
vitor Posted February 12, 2022 Author Share Posted February 12, 2022 (edited) Update. Made some changes and fixes for it to run smoother. But in particular, what you might notice: Turning off will now only terminate itself. This means that if you have other caffeinate processes running from other entities, those will be left alone. When running again to turn it off, if you previously picked a time frame it will tell you when it’s predicted to auto-turn off. Keep in mind that due to the nature of how Apple’s own caffeinate measures its timeout, the time might be somewhat off. The shortcut for preventing the display from going to sleep changed from ⌥ to ⌘. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Edited February 14, 2022 by vitor Link to comment
vitor Posted March 25 Author Share Posted March 25 Updated to 2023.1.Rewritten in JXA.When setting a time, show the end point.New repository.New icon.New About.Add configurable keywords.Remove OneUpdater in favour of Gallery updating. sepulchra and macosxguru 2 Link to comment
sepulchra Posted April 10 Share Posted April 10 Sometimes I run this workflow without a set time but want to be reminded it is running. Can I take a page out of the Yak Saver workflow and add a delay set for a specific time coming off the script filter and then have it toss up a notification? And if I did this, these changes would get overwritten on the next update, correct? This wouldn't fall under the user changes that get retained during an update? Thanks as always for your time. Link to comment
vitor Posted April 10 Author Share Posted April 10 2 hours ago, sepulchra said: Can I take a page out of the Yak Saver workflow and add a delay set for a specific time coming off the script filter and then have it toss up a notification? And if I did this, these changes would get overwritten on the next update, correct? Yes to both. If you want to stop updates, change the bundle identifier. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now