Giter Site home page Giter Site logo

alfred-2-caffeinate-workflow's People

Contributors

deiga avatar shawnrice avatar sodisdocs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-2-caffeinate-workflow's Issues

not working on alfred 4

I Think this cause by:

VPREFS="$HOME/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/"
NVPREFS="$HOME/Library/Application Support/Alfred 2/Workflow Data/"

by change NVPREFS variable:

NVPREFS="$HOME/Library/Application Support/Alfred 2/Workflow Data/"

It works!

Set default timeout?

Is there a way to set a default timeout, i.e. can I make it so that if I activate caffeinate without any arguments, it would be automatically disabled after say, 5 hours?

False positives when searching for caffeinate process

When invoking workflow search command

ps -eo etime,args|grep -w caffeinate|grep -v grep|sed -e 's|^[[:space:]]*||'

on my system, I get following results:

16:39 /bin/bash /Users/schrodinger_cat/Library/Scripts/com.plexapp.plexmediaserver.caffeinate.sh
05:41 /Applications/Alfred 3.app/Contents/Preferences/Alfred Preferences.app/Contents/MacOS/Alfred Preferences /Users/schrodinger_cat/Downloads/caffeinate_control.alfredworkflow
00:07 caffeinate -s -t 300

The problem is, this gives false positive results when searching, therefore workflow is always showing that caffeinate is activated and prevents enabling of caffeinate command.

One-off mode changes

Most of the time I want Caffeinate to let my display sleep, but sometimes I want to keep it on. Could you add a parameter to the command to let me specify a one-off mode override?

Also, an option to disable the screen saver would be nice.

Doesn't work on 10.9

Got this error:

[ERROR: alfred.workflow.action.script] Code 0: cat: $HOME/Library/Application Support/Alfred 2/Workflow Data/com.shawn.patrick.rice.caffeinate.control/preferences: No such file or directory

There's no com.shawn.patrick.rice.caffeinate.control/ under Alfred 2/Workflow Data/.

"conf-and-help.scpt" needs tweeking

Great workflow! But there is an issue. The "configuration" dialog refused to display on my system. I traced the problem to file "conf-and-help.scpt" and particularly the following lines:

set the file_ to open for access file path_
try
    set text_ to read the contents of file_
on error errMsg
    set text_ to "d"
end try

close access the file_

Basically, the "open" command was raising an exception on my system, which prevented the "configuration" dialog from displaying. The exception was because the preferences file did not exist yet. I suggest the following change:

try
    set the file_ to open for access file path_
    set text_ to read the contents of file_
    close access the file_
on error errMsg
    set text_ to "d"
end try

A second, but almost insignificant issue is the preferences file path. Currently, the preferences file is saved in "com.caffeinate.control.shawn.patrick.rice", but the workflow bundle ID is "com.shawn.patrick.rice.caffeinate.control". This leads to the creation of two different directories for the same workflow.

Add License

Howdy!

I'm a big fan of this workflow, and as part of some automation I'm looking to add it as a submodule to one of my own repos.

I noticed there's not a license file or note in the repo; would it be possible to add one?

Workflow update for Alfred v4

The workflow does not work on Alfred v4. It is probably just a matter of updating some paths in the library.sh file, but I did not manage to make it work

Typing 30 1 gives 1hour 30 minutes

If I type 30 1 in the alfred text box I get this
screen shot 2016-05-03 at 9 38 47 am

I thought it was supposed to interpret the first number as hours and the second as minutes?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.