I wanted to use this with alfred, so I thought I'd post the alfred action in cae anyone wants to use it without having to go through the code to see what needs changing, though as Brett said, it's a very simple change. Set the "command" field of an alfred applescript action to:
''# if a timer is running, kill it
pid=$(ps ax | grep -E "osascript .*/geektooltimer" | grep -v grep | awk '{print $1}')
[[ $pid ]] && kill $pid
Clear any existing text
/usr/bin/osascript -e 'tell application "GeekTool Helper" to set command of shell geeklet named "GeekTimer" to "echo"'
/usr/bin/osascript ~/Documents/Geektool/GeekTimer/geektooltimer.applescript {query} 2>&1 &''
I also changed the line of the appescript
' do shell script "/usr/bin/afplay /System/Library/Sounds/Glass.aiff"'
to
' do shell script "/usr/bin/afplay -v 10/System/Library/Sounds/Glass.aiff"'
to make it slightly more audible over any other sounds that might be playing and added the line:
'say "Time to " & _task'
mainly because using the say command is fun :)
Now just to combine this with your post about imagemagick to make it look a little nicer on my desktop...
Ah bother, that doesn't seem to have posted very nicely at all, the alfred command field should be:
# if a timer is running, kill it
pid=$(ps ax | grep -E "osascript .*/geektooltimer" | grep -v grep | awk '{print $1}')
[[ $pid ]] && kill $pid
# Clear any existing text
/usr/bin/osascript -e 'tell application "GeekTool Helper" to set command of shell geeklet named "GeekTimer" to "echo"'
/usr/bin/osascript ~/Documents/Geektool/GeekTimer/geektooltimer.applescript {query} 2>&1 &