CarlosNZ Posted January 20, 2013 Share Posted January 20, 2013 (edited) Hey folks, I've been chugging away building a new version of my EggTimer extension to take advantage of Alfred 2's new features. And now it's ready for whoever would like to to have a playaround with it and see what they think: EggTimer v2.0 It will also be available at Tom's Alfred Repo, but I personally haven't had a chance to test that yet, so let me know how it goes for you. Now, it's very much a beta, as there's several things that don't work as well as I'd like yet, but I'm pretty pleased with how the integration with Alfred 2's new live results feedback via the Script Filter is working. My aim is to have a really nicely polished, easy-to-use (no users fiddling with config files) workflow ready to release by the time Alfred 2 goes public, so any comments or suggestions are most welcome. It's ready! (22 March 2013) I've included a full summary of all the functionality in the documentation included in the download (enter timer help in Alfred), but here's just a quick overview of the features: Simple timers Auto-repeating timers Alarms (set a specific time) Snooze function Repeat function Recent Timers list (choose one to restart) Full integration into Alfred's results window. Couple of quick caveats: EggTimer currently requires growlnotify to display notifications when timers finish. This is because the timer process completely decouples from Alfred to run in the background, so it can’t feed back its output to Alfred. I’m working on a solution to use a Notification Centre alert option to make this as seamless as possible to the user. Currently, running timers won’t restart after a crash or a reboot. I’m working on a solution to this which I aim to have working soon. Okay, that's about it. Enjoy, and let me know how it works for you. ---- 21 January 2013: Updated to beta 2 Changes: Timers/Alarms now use a “while…” loop to check due time against time of day (instead of just sleeping for a duration). This prevents the problem of timers running late if the computer was put to sleep. (Don't know why I didn't just do this to begin with.)---- 24 January 2013: Updated to beta 3 Changes: Now uses recommended working folders for storing timer info and preferences. The main benefit from the user point of view is that future updates won’t overwrite your timers and preferences. Timers and Auto-timers now accept hour:minute input. Syntax is timer HRS:MINS Reminder. Can now stop timers from the timer list using the option-key modifier. Kind of an ugly implementation though, as it will display the same information regardless of whether it’s context-appropriate. Trying to think of a better way to make this work. (Suggestions welcome!) Timers will be restored if they have crashed. This is only partially implemented though, because it’ll only check if you actually run the workflow. It won’t restore them at login yet, which is more important. Working on it. Miscellaneous minor tweaks. ---- 27 January 2013: Updated to beta 4 Changes: The big one: will now resume timers after restart/re-login. EggTimer adds an entry to the OS X launchd daemon to check for and resume timers at startup. You will be prompted to give permission for this on first launch of EggTimer. New keyword/workflow structure. Check out the workflow config panel to see what’s what. If you’d prefer the old ones (all starting with timer), just change them yourself (eg. repeat -> timer repeat). You’ll note that from the timer list (timers or hotkey Ctrl-T) you can also select to launch a new timer or alarm (courtesy of Alfred’s new Applescript-ability). Now has a “nuke” option (timer nuke) to reset EggTimer back to initial blank config. (Deletes all working folders, cancels running timers, uninstalls startup item.) Fixed bug with “08” and “09” minutes entries when using hrs:mins timer format. More specific icons and other miscellaneous UI tweaks. beta4a Fixed minor (and embarrassing) regression. ---- 28 January 2013: Updated to beta4b Changes: Fixed absolute path reference preventing permission dialog from launching. 28 January 2013: Updated to beta4c Changes: Doh! One more pesky absolute path eliminated. There's still a bit of weirdness with resuming timers after a login though, so I'm still trying to figure that out. Maybe answer "no" to installing startup item for now..beta4d Okay, the problem was fairly minor (just me being scatterbrained ), so the startup check should work nicely now. Here's hoping!--- 22 March 2013: Updated to v2.0 (final) I've finally integrated proper notifications for the completed timers. It will work with either Growl or Notification Centre, depending on what you have selected in the workflow config. growlnotify is no longer required, and you'll find "EggTimer" as a properly registered application within Growl's preferences (where you can tweak it). Miscellaneous tweaks and tidy-ups (including documentation - timer help to display) Edited March 22, 2013 by CarlosNZ ClintonStrong, palobo, Benzi and 13 others 16 Link to comment
ClintonStrong Posted January 20, 2013 Share Posted January 20, 2013 Cool! I was hoping I'd see a timer workflow. Great job. Quick note: I think you might just be able to include growlnotify from your /usr/local/bin into the workflow folder, so it'll work regardless of whether or not it's installed. Alternatively, you could include terminal-notifier to use notification center. I'm not sure if there's a better way than that. Or you could just use AppleScript to send a growl notification, but I don't think there's support for Notification Center at this time without using terminal-notifier. One thing I'd like to see is support for hours as well as minutes, maybe in the form of "2h30m". Link to comment
CarlosNZ Posted January 20, 2013 Author Share Posted January 20, 2013 Thanks for the feedback, Clinton. Cool! I was hoping I'd see a timer workflow. Great job. Quick note: I think you might just be able to include growlnotify from your /usr/local/bin into the workflow folder, so it'll work regardless of whether or not it's installed. Alternatively, you could include terminal-notifier to use notification center. I'm not sure if there's a better way than that. Or you could just use AppleScript to send a growl notification, but I don't think there's support for Notification Center at this time without using terminal-notifier. Yeah, was looking at something like that. Will have to check the licensing terms to see if bundling them with the workflow will be allowed, but that looks like the way to go if I can. One thing I'd like to see is support for hours as well as minutes, maybe in the form of "2h30m". Makes sense. I've always just used 150 minutes, but it shouldn't be a big deal to implement this. It'll probably in the form H:M, where the colon ":" will the determining factor for the script to decide if it needs to parse the hours and minutes. Look for to an update in a day or two. Cheers. Link to comment
CarlosNZ Posted January 24, 2013 Author Share Posted January 24, 2013 I've updated EggTimer to beta3. Let me know if anything seems to have gone backwards. In the next beta release, I'm going to restructure the workflow significantly so it will use multiple input keywords (probably make them all start with "timer" for now though) to give more flexibility over the various routines. Link to comment
ClintonStrong Posted January 25, 2013 Share Posted January 25, 2013 Thanks for the update! It's already becoming one of my most used workflows. Just noticed one bug. When using the hours:minutes format, if minutes is "08" or "09", it ignores the hours. Only happens if it starts with a zero, and only for 08 and 09. Link to comment
CarlosNZ Posted January 25, 2013 Author Share Posted January 25, 2013 Just noticed one bug. When using the hours:minutes format, if minutes is "08" or "09", it ignores the hours. Only happens if it starts with a zero, and only for 08 and 09. Well, well, how odd. (Odd that it's only "08" and "09", not odd that there's a bug ) I'll look into this and get back to you. Thanks for spotting it. In the meantime, using "69" or "128" (minutes) still seems to work. Link to comment
CarlosNZ Posted January 25, 2013 Author Share Posted January 25, 2013 Okay, I've figured it out. I'll release an update in a day or two, after I've finished a few other changes that I'm in the middle of. In the meantime, you can just enter "1:9" (without the zero) for 1 hour, 9 minutes. (Not that I would imagine you're making such specific timing requests too often .) BTW, if you want the technical details: Bash interprets some notations specially: 0… (leading zero) is interpreted as an octal value (from http://wiki.bash-hackers.org/syntax/arith_expr) Okay then. Link to comment
CarlosNZ Posted January 27, 2013 Author Share Posted January 27, 2013 Update to beta4. See above for changes. Pretty happy with where things are at with it. Let me know if anything's broken, particularly the "resume on login" feature, and the process by which it gets installed. Check out the new keyword structure: So, the only major thing I want to add now is proper Growl/Notification Centre integration, and have it match Alfred's notification preferences by default. Any other requests? Link to comment
ClintonStrong Posted January 27, 2013 Share Posted January 27, 2013 The launchd prompt never showed up for me. Looks like you're using a hard coded path in the osascript call ("/Users/Carl/Library"). Also, I think the workflow directory name is randomized, since mine's different from the one that's coded in first_install.sh. You can get Alfred's directory through AppleScript (POSIX path of (path to application support) & "/Alfred 2"), but you may have to set a variable to the current directory in your bash script and pass that to osascript to get it working consistently. Or you could just show an iconless prompt (I'm lazy, so that's what I'd probably do ). Link to comment
CarlosNZ Posted January 27, 2013 Author Share Posted January 27, 2013 Sorry, thought I'd replaced all the absolute paths with variables. Must have missed that one. Will fix it today. Thanks again for noticing this stuff. Link to comment
palobo Posted January 27, 2013 Share Posted January 27, 2013 This is very nice Carlos. Great for those that like the pomodoro technique. Just set a 25min timer then a 5min timer for a break. Rinse and repeat This little gem is also going to be in my Arlfred vs. Launchbar Article on Mac.AppStorm CarlosNZ 1 Link to comment
CarlosNZ Posted January 27, 2013 Author Share Posted January 27, 2013 This little gem is also going to be in my Arlfred vs. Launchbar Article on Mac.AppStorm That's awesome! Hopefully I'll get all the little kinks ironed out before then. Link to comment
palobo Posted January 27, 2013 Share Posted January 27, 2013 That's awesome! Hopefully I'll get all the little kinks ironed out before then. It's still in the works. I'm writing in conjunction with Pierre Wizla (great guy ) He's in the Launchbar camp... and he's going to get his ass kicked! Workflows are the next best thing after sliced bread Link to comment
jarhead Posted January 27, 2013 Share Posted January 27, 2013 Any way to implement the Large Type feature of Alfred to display the message when the alarm triggers? Link to comment
CarlosNZ Posted January 27, 2013 Author Share Posted January 27, 2013 It's still in the works. I'm writing in conjunction with Pierre Wizla (great guy ) He's in the Launchbar camp... and he's going to get his ass kicked! Workflows are the next best thing after sliced bread I used to be a Launchbar (& Quicksilver) user. Then I discovered Alfred! Link to comment
CarlosNZ Posted January 27, 2013 Author Share Posted January 27, 2013 Any way to implement the Large Type feature of Alfred to display the message when the alarm triggers? Good question. It's actually not as simple as changing the workflow config as you would naturally assume, because EggTimer "splits off" from Alfred, so the notifications for the timers themselves are baked into EggTimer, not feeding back into Alfred. So I'd have to build my own "Large Type" output to do this, which is not something I'm up to right now. However, I am planning on implementing Growl notifications via Applescript, so EggTimer can be its own "registered app" in Growl. Then you could simply choose one of the Growl notifications that is suitably "Large Type"-ish, which will get you pretty close. Link to comment
CarlosNZ Posted January 27, 2013 Author Share Posted January 27, 2013 The launchd prompt never showed up for me. Looks like you're using a hard coded path in the osascript call ("/Users/Carl/Library"). Also, I think the workflow directory name is randomized, since mine's different from the one that's coded in first_install.sh. You can get Alfred's directory through AppleScript (POSIX path of (path to application support) & "/Alfred 2"), but you may have to set a variable to the current directory in your bash script and pass that to osascript to get it working consistently. Or you could just show an iconless prompt (I'm lazy, so that's what I'd probably do ). Okay, this is fixed now in beta4b. Hopefully it'll work as it should now. (NB. If you don't see a prompt on first run now, maybe try a "timer nuke" to reset everything just this once and see if that helps. You shouldn't need to do this, but...) Link to comment
CarlosNZ Posted January 28, 2013 Author Share Posted January 28, 2013 Hey guys, I'm still trying to track down some weirdness with the startup check. You won't break anything, but you might get duplicate timers when you re-login. Might be best to answer "No" to installing the startup check until I'm fully able to nail it down. (I'm on the right track though.... ) Edit: Sorted. Just me being scatterbrained. Feel free to try out the startup option now and let me know how it goes for you. Link to comment
sjose Posted March 5, 2013 Share Posted March 5, 2013 Hi Carl, I looks like the download link is down. Is there any other way to download EggTimer? Thanks for the great software! Jose Link to comment
CarlosNZ Posted March 5, 2013 Author Share Posted March 5, 2013 Hi Carl, I looks like the download link is down. Is there any other way to download EggTimer? Thanks for the great software! Jose That's odd, are you getting the 'Invalid Access ID' XML file when trying to download it? Me too. Anyway, I've updated the link to a droplr one now, so try that. Cheers. Link to comment
sjose Posted March 5, 2013 Share Posted March 5, 2013 Yes, I did get the ' 'Invalid Access ID' XML' issue. It's working now. Thanks! Link to comment
Benzi Posted March 20, 2013 Share Posted March 20, 2013 Hi @Carlos, Have you had a look at https://github.com/norio-nomura/usernotification You can actually send a notification to Notification Centre with any bundle indentifier (including Alfred) from the command line. Perhaps this could help remove the dependency on needing Growl? E.g. ./usernotification -identifier "com.runningwithcrayons.Alfred-2" -title "EggTimer" -subtitle "Timer" -informativeText "Timer text or something" Link to comment
CarlosNZ Posted March 20, 2013 Author Share Posted March 20, 2013 (edited) Thanks Benzi, I'll check that one out. I've actually already got a solution I'm working on using a similar tool called Mountain Notifier, which I should have ready to release pretty soon. Also, it uses Growl via Applescript, so doesn't require growlnotify to be installed. And it automatically chooses between Growl or Notification Centre based on the selection in Alfred. I'll try and get it out before the weekend. (It's basically done, I just need to double-check everything's working as it should.) Edited March 20, 2013 by CarlosNZ Link to comment
Benzi Posted March 20, 2013 Share Posted March 20, 2013 ....I'm working on using a similar tool called Mountain Notifier, which I should have ready to release pretty soon. Also, it uses Growl via Applescript, so doesn't require growlnotify to be installed. And it automatically chooses between Growl or Notification Centre based on the selection in Alfred. I'll try and get it out before the weekend. (It's basically done, I just need to double-check everything's working as it should.) Awesome! Can't wait Link to comment
CarlosNZ Posted March 22, 2013 Author Share Posted March 22, 2013 Hey foks! I'm pleased to bring you the feature-complete (for now, I'm sure I'll think of something else later) version of EggTimer 2. The main addition to this latest release is proper notification integration for the completed timers. It will use either Growl or Notification Centre (based on your settings), and no longer requires growlnotify. I hope it behaves itself. I've given it a good workout on my own system for a few weeks, but please let me know if there's any unexpected quirks or bugs you come across. (Download link in the first post) 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