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, 2023 by vitor arsenty, robgill and thec13 2 1 Link to comment
vitor Posted October 1, 2013 Author Share Posted October 1, 2013 When reporting issues, please include your exact installed versions of:The Workflow.Alfred.macOS.In addition to:The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better. 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, 2023 Author Share Posted March 25, 2023 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, 2023 Share Posted April 10, 2023 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, 2023 Author Share Posted April 10, 2023 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
sepulchra Posted August 16, 2023 Share Posted August 16, 2023 @vitor I wanted to let you know i used this wonderful workflow to help me back up 20TB from a 5400 spinning disk to a 60TB RAID (also spinning disks) took 30 hours but happened without incident thanks to "Coffee Coffee" vitor 1 Link to comment
manusz Posted November 10, 2023 Share Posted November 10, 2023 (edited) It seems that the Coffee workflow does not have any effect on Sonoma 14.1.1. This Mac upgraded from Sonoma 14.1 last week, I am pretty sure Coffee kept the machine awake then. For what it is worth I copy the debug data below. As far as I can tell the workflow runs just fine, so perhaps Apple changed something in the last Sonoma release? [22:11:24.636] Coffee Coffee[Script Filter] Queuing argument '' [22:11:24.713] Coffee Coffee[Script Filter] Script with argv '' finished [22:11:24.719] Coffee Coffee[Script Filter] {"rerun":0.5,"items":[{"title":"Turn On","subtitle":"Keep awake indefinitely","arg":"coffeecoffee_process_anchor on","icon":{"path":"icon_alt.png"}}]} [22:11:24.855] Coffee Coffee[Script Filter] Processing complete [22:11:24.861] Coffee Coffee[Script Filter] Passing output 'coffeecoffee_process_anchor on' to Arg and Vars [22:11:24.863] Coffee Coffee[Arg and Vars] Processing complete [22:11:24.864] Coffee Coffee[Arg and Vars] Passing output 'coffeecoffee_process_anchor on' to Junction [22:11:24.865] Coffee Coffee[Junction] Processing complete [22:11:24.866] Coffee Coffee[Junction] Passing output 'coffeecoffee_process_anchor on' to Run Script Edited November 10, 2023 by manusz Link to comment
vitor Posted November 11, 2023 Author Share Posted November 11, 2023 It’s unlikely, though not impossible, that the tool has changed. I don’t see anything wrong on that debugger output, what makes you think it’s not working? The screen will still turn off, that’s normal. Link to comment
manusz Posted November 11, 2023 Share Posted November 11, 2023 When I issue Coffee (without parameters) in Alfred, walk away and return after 20 minutes, the screen is dark. Now, when I touch the mouse, I am greeted by the Lock Screen and I have to provide my password or fingerprint to log in. I see this on 2 M1 Machines. Link to comment
vitor Posted November 11, 2023 Author Share Posted November 11, 2023 As I said, that’s normal. Keeping the machine awake doesn’t mean the screen does not turn off. If you want the screen to remain on, use ⌘↩ as per the workflow’s instructions. Link to comment
manusz Posted November 11, 2023 Share Posted November 11, 2023 I did not expect to see the Lock Screen when I woke up the screen. That may be caused by the System Setting Require password after screen saver begins or display is turned off which I have set to Immediately. From now on I will use the ⌘↩ key combo as that triggers the action I expected. Thank you for your help! Link to comment
vitor Posted September 7 Author Share Posted September 7 Updated to 2024.2.Use dynamic process anchor in two arguments.Set screenshot DPI to 144. 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