venkytv Posted October 25, 2013 Share Posted October 25, 2013 (edited) Another caffeinate workflow (uses the built-in "caffeinate" tool, *not* the third-party "Caffeine" app). Unlike the ones I found already, this one uses the result feedback mechanism extensively. You can create jobs with custom times. Any custom jobs you create are remembered and presented in the order of frequency of use. For instance, if you create a custom caffeinate job of 45 minutes once, it will show up in your list from the next run. And depending on how often you re-use that, it will bubble up or settle down in the list of available choices. And, of course, you can cancel existing jobs or reschedule them. This is how you configure the workflow if, for instance, you want display sleep to blocked too. This is the config file you'll need to edit to configure the caffeinate flags: Download it here: https://github.com/venkytv/alfred-caffeinate/raw/master/Alfred-Coffee.alfredworkflow Source: https://github.com/venkytv/alfred-caffeinate Written in perl and has no external dependencies. Will use the Time::Duration module, if available. Edited November 10, 2013 by Venky zhaowu, ftrava and thec13 3 Link to comment
Davide Posted October 27, 2013 Share Posted October 27, 2013 (edited) Update: Wonderful, my prefered coffee workflow works now. Edited October 28, 2013 by Davide Link to comment
tbnv Posted November 8, 2013 Share Posted November 8, 2013 (edited) Hi, I think that the workflow doesn't work properly (or maybe it's normal). When I activate Coffee, my computer doesn't go to sleep but the monitor does. The thing I like with Caffeine (the app) is that everything stays awake. Would it be possible to correct that? Thanks. Edited November 8, 2013 by tbnv Link to comment
rice.shawn Posted November 8, 2013 Share Posted November 8, 2013 Check the arguments in the command itself. It has these: i -- prevent idle sleep d -- prevent display sleep s -- prevent system sleep u -- emulate user activity (this means that you computer will stay awake even if the lid is closed... be careful if you're on a laptop). m -- prevent disk sleep (mavericks only). Check the command issued in the workflow to make sure that it has "d" in the options. Generally, when I invoke Caffeinate I use: caffeinate -di -t <TIME> & That's my preferred method. Not to hijack, but I just came across this thread as I was posting the second version of my old caffeinate workflow. I won't link, but you can find it on the forum. --Shawn Link to comment
venkytv Posted November 9, 2013 Author Share Posted November 9, 2013 Thanks, Shawn. Have added a new version which allows this behaviour to be configured. Nothing as fancy as Shawn's latest workflow -- this just opens up a text editor and allows you to set up the caffeinate flags. Type in "coffee conf" to open the configuration file. To prevent the monitor from going to sleep too, remove the '#' character from the beginning of the line that says "#CAFFEINATE_FLAGS=-ids" and close the file. Look at the manual page of "caffeinate" for other options. Link to comment
rice.shawn Posted November 13, 2013 Share Posted November 13, 2013 Glad to help, Venky. If you feel like implemented the fancier version of the config, then feel free to just take the code in mine and modify it to suit your needs. That goes for anyone else who happens to be reading this who want a fancy way to deal with simple configuration in any of your workflows. Link to comment
venkytv Posted November 15, 2013 Author Share Posted November 15, 2013 Appreciate that.. I think I will do that. Thanks! 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