Jump to content

Interesting difference in behaviour between Alfred 1 & 2


Recommended Posts

I was just trying to update my EggTimer extension to work with Alfred 2 and I discovered that Alfred 2 will now wait for all processes launched from a workflow to complete before allowing the extension to be called again.

 

I used to have this in Alfred to call the timer script:

#Okay, just launch the main timer script then...
./timer.sh "{query}"

But now, with Alfred 2, the timer extension won't respond to any further commands until that timer has elapsed.

 

So now I've had to modify it to:

#Okay, just launch the main timer script then...
./timer.sh "{query}" > /dev/null 2>&1 &

in order to get Alfred to ignore the spawned process completely and allow further input.

 

I'm assuming this was a decision on Andrew's part to curtail rampant BG process launching from Alfred. Can we then assume this is to be the expected behaviour in Alfred 2 final?

 

So there you go, just a little heads-up for anyone writing shell scripts that launch background processes.

Link to comment

I wonder if Andrew might confirm whether this will be the established behaviour for V2.

 

You see, I'm working on getting my EggTimer script playing nice with V2 (there's a prelim version on my site), and this affects how I launch the BG processes. If Alfred waits before allowing a new input, then I have to make my BG timers be "disowned" from Alfred. Which is fine, but then I can't feedback output to Alfred, so I have to do my own notifications. However, if the behaviour is as it was in V1, then I can use Alfred notifications, which would be simpler for the user to configure.

 

Be good to have the definitive word on this.

 

Cheers.

Link to comment
I was really enjoying your EggTimer extension on v1. Hopefully you get it all ironed out, wish I could help… on my way to grab the v2 version from your site… 

Cheers. It's working fine, I just want to know which direction to go in for further development—Alfred notifications or roll-my-own Growl notifications.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...