Jump to content
CarlosNZ

EggTimer v2 [updated to 2.0 final]

Recommended Posts

Hi guys! Is there a chance to pause the timer, or add something similar to the workflow? (For the people that's interrupted 4 o 6 times in an hour)

 

Thanks in advance!

Share this post


Link to post
On 7/12/2017 at 7:36 PM, Basket said:

Just tried "timer nuke" and I'm unfortunately still having the same problem, I'm on High Sierra so that may be causing some kind of issue? Thanks for the suggestion by the way, I really appreciate it!

 

The same issue here using El Captain :/

Share this post


Link to post

Here is my own custom version : https://github.com/lucianosantana/EggTimer2  (based on the updated version for Alfred 3 by @ianhowson)


For the issues with the notification I had to change the notify_functions.sh .
I've completely erased the original and added the following : 

notify () {

if [ "$5" = alarm ]; then
	nc_icon="$PWD/resources/icon_alarm.icns"
else
	nc_icon="$PWD/resources/icon.icns"
fi

osascript <<EOD
set img to POSIX file "$nc_icon"
display dialog "$3\n$4" with title "$1" with icon img buttons {"OK"}
EOD

}

I'm using AppleScript to display a Dialog (not a notification). This way the message sticks on the screen until I interact with it and I don't loose the reminder if I'm temporarily away.

I also had to invert the order of execution of the sound and alert. Originally it executes the notification then the sound. But changing the notification to dialog blocks the script execution, therefore the sounds executes after user interaction. To solve this issue just search for 

afplay sounds/alarm_done.mp3 &

in the files timer_alarm.sh , timer_auto.sh and timer.sh . Then move it just before the notify command.


Might be helpful for you @Basket and @Dzier .
 

 

Share this post


Link to post

Hey @Luciano Santana, I love what you did with this workflow. Was thinking that it'd be nice to be able to trigger additional timers from the pop-up window...any ideas on how to accomplish that? Would it be easy to assign additional buttons to the task(s)?

 

For example, setting timer for '25 Are you still working?' and having the option to set an additional 25 min by clicking 'Yes' (context-specific) or '25 min' or whatever on pop-up window...

Share this post


Link to post
On 5/17/2018 at 2:35 PM, Russell Davis said:

@Luciano Santana (and anyone else following along), there are a few commands (Create New Timer, Create New Alarm, and View Recent) that are still broken in Alfred 3. I have a branch that fixes them. (I also submitted a PR to Luciano's repo.)

 

Super newbie question -- how do I add this branch into Alfred as a workflow?

 

Also, to anyone reading, I could use some help integrating parts of this workflow into another. Right now, I start work by typing "start work", and the apps I use open and the webpages I need to start with also open. I'd like have my "start work" command also start a repeating 30 minute timer to remind me to take a break. Anyone know how I could do that within the workflow manager?

Share this post


Link to post
13 hours ago, Chamend said:

how do I add this branch into Alfred as a workflow?

 

Download the zip file from the repo (Clone or download > Download ZIP) and extract it. Go into the new directory, select all the files, right-click and choose "Compress 11 Items". That will create Archive.zip. change the name to Archive.alfredworkflow and double-click it.

 

Share this post


Link to post

the `recent` option seems broken for me, even in the version @Russell Davis provided, on macOS 10.14 Mojave. I can't see the alarms I'm setting after typing `recent`, it says there are no alarms or timers set. 

Does anybody else have the same problem?

Share this post


Link to post

Hello,

 

did anyone try if the version by @Russell Davis is running with Alfred 4?

I’d like to upgrade Alfred but I use EggTimer almost every day, so I’d hate to break it…

 

Share this post


Link to post

@TJung Despite my post above, I ultimately couldn't get EggTimer 2 to work consistently.

 

Having tested all of the Alfred-managed timers, I now use SandwichTimer, the only one that works (at all) for me. Fortunately, it works well and have been pretty reliable so far.

 

 

Share this post


Link to post
On 6/16/2018 at 10:18 AM, deanishe said:

 

Download the zip file from the repo (Clone or download > Download ZIP) and extract it. Go into the new directory, select all the files, right-click and choose "Compress 11 Items". That will create Archive.zip. change the name to Archive.alfredworkflow and double-click it.

 

 

It seems that @Russell Davis version runs fine in Alfred 4. However it expects its workflow data at the old Alfred 3 path ("$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.eggtimer2").

So, @deanishe, if I follow your instructions to download and extract the ZIP file, then replace all occurrences with the new path, create a new ZIP and rename it – then it should be fine? I mean, I’ve got no experience at all in workflow development, so basically my question is: Is this all that it takes to modify an existing workflow?

Share this post


Link to post
Posted (edited)

It's not working in alfred4 because the directories in the "include.sh" doesn't exist anymore.

 

_______________

Edit: I managed to make it work in Alfred 4.

 

After installing the workflow, open it in finder to find where it was installed. Then edit the scripts to fix the old directories. Don't just copy and paste what posted here since the dir is dependent on your user account.

 

include.sh:

 

EGGPREFS="/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC"

 

EGGWD="/Users/<your account>/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC"

 

I'm not sure if naming it the same as the workflow is necessary. But I made the folder in the Cache then edited the include.sh file. That's probably an unnecessary step since the first_install.sh has mkdir "$EGGWD" line in it.

 

first_run_check.sh

 

"/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC/version"

 

a file called version will be created by the first_install.sh

 

login_check.workflow - This will open in automator

 

"/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC/eggwd.txt"

 

eggwd.txt is again a file that will be created by first_install.sh

Edited by runaway
added fix

Share this post


Link to post
On 8/22/2019 at 12:23 PM, runaway said:

It's not working in alfred4 because the directories in the "include.sh" doesn't exist anymore.

 

_______________

Edit: I managed to make it work in Alfred 4.

 

After installing the workflow, open it in finder to find where it was installed. Then edit the scripts to fix the old directories. Don't just copy and paste what posted here since the dir is dependent on your user account.

 

include.sh:

 

EGGPREFS="/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC"

 

EGGWD="/Users/<your account>/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC"

 

I'm not sure if naming it the same as the workflow is necessary. But I made the folder in the Cache then edited the include.sh file. That's probably an unnecessary step since the first_install.sh has mkdir "$EGGWD" line in it.

 

first_run_check.sh

 

"/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC/version"

 

a file called version will be created by the first_install.sh

 

login_check.workflow - This will open in automator

 

"/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC/eggwd.txt"

 

eggwd.txt is again a file that will be created by first_install.sh

 

I can confirm that this fix works for me in Alfred 4 on OSX 10.14.  The user.workflow.##### folder was different for me, just find the one corresponding to EggTimer.  Thanks for the fix!

Share this post


Link to post
On 8/22/2019 at 7:23 PM, runaway said:

It's not working in alfred4 because the directories in the "include.sh" doesn't exist anymore.

 

_______________

Edit: I managed to make it work in Alfred 4.

 

After installing the workflow, open it in finder to find where it was installed. Then edit the scripts to fix the old directories. Don't just copy and paste what posted here since the dir is dependent on your user account.

 

include.sh:

 

EGGPREFS="/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC"

 

EGGWD="/Users/<your account>/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC"

 

I'm not sure if naming it the same as the workflow is necessary. But I made the folder in the Cache then edited the include.sh file. That's probably an unnecessary step since the first_install.sh has mkdir "$EGGWD" line in it.

 

first_run_check.sh

 

"/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC/version"

 

a file called version will be created by the first_install.sh

 

login_check.workflow - This will open in automator

 

"/Users/<your account>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8A3F635-78EA-479E-8EE1-6AEE187E68FC/eggwd.txt"

 

eggwd.txt is again a file that will be created by first_install.sh

 

I'm using dropbox to sync prefs between computers and the workflow folders seem to be residing there, as alfred directs me there when I want to see workflow files.

 

So my question is: Do you use syncing? Should we assign the folders in dropbox  (ie.

~/Dropbox/AlfredSync/Alfred.alfredpreferences/

 instead of

~/Library/Application Support/Alfred/Alfred.alfredpreferences/

) if we want to edit those files? Any ideas? 

Share this post


Link to post

Sorry I don't use syncing. As long as you point the scripts to the right directory of your alfred preferences, I think it should work.

Share this post


Link to post
On 4/3/2019 at 1:59 PM, akaralar said:

the `recent` option seems broken for me, even in the version @Russell Davis provided, on macOS 10.14 Mojave. I can't see the alarms I'm setting after typing `recent`, it says there are no alarms or timers set. 

Does anybody else have the same problem?

 

Hey I am experiencing the exact same issue on the most recent versions of OSX and Alfred. Has someone found a way to fix that?

 

EDIT:

Ok found the bug rather quickly:

change `EGGWD` in your includes.sh

For Alfred 4: 

EGGWD="$HOME/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/carlosnz.eggtimer2"
Edited by tillus

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...