Jump to content

[Feature request] Workflow, hotkey trigger filtering


NeoDarque

Recommended Posts

It would be great to see some kind of filtering for the hotkey trigger for workflows.

What I'm looking for is the ability to define that a hotkey should only trigger if the frontmost application is listed either in a included list, or not listed in an excluded list.

 

For example, I'm running Parallels on my Mac, and if I have defined a workflow with a keyboard trigger that will open a certain folder, I'd like this workflow NOT to trigger if Parallels is the front most application. Or the other way, a workflow that would only trigger if Parallels was the front most application.

 

Thanks for your excellent work!

Cheers,

Ted 

Link to comment
Share on other sites

It's fairly unlikely that we'll be adding this type of action. Alfred doesn't monitor what app is currently frontmost in order to remain a very lightweight app especially when idle, so he wouldn't know when to trigger (or not) a hotkey.

Link to comment
Share on other sites

Hi,

 

sounds like you misunderstood me. I'm not looking for any new action, nor anything that would monitor frontmost application in the background somehow.

 

Rather to have an optional filter for the Hotkey trigger, so that when a hotkey would be pressed, the application would query NSWorkspace for the current active application, and depending on the filter it would continue with its actions/outputs. 

Link to comment
Share on other sites

I suspect you could write your own script to do this such that a script would query NSWorkspace and depending on the results be executed or not.

 

Alternatively, if you have application specific hotkeys, these could likely be set up using OS X could they not? In particular, I am thinking of System Preferences>Keyboard>Keyboard Shortcuts. 

Link to comment
Share on other sites

I think this is a great suggestion and I would love to see this integrated into Alfred.

 

Interestingly enough, I found a product this morning called Shortstop that allows you to disable global hotkeys from the menu bar, so if you're working in an application that has keyboard shortcuts that are being over-ridden by your global shortcuts, you can temporarily disable them.  It would be much nicer, though, to have this feature integrated into Alfred though as per NeoDarque's suggestion.

 

In the meantime, I found a hack from Brett Terpstra that I've been enjoying:  A useful Caps Lock key, which allows you to change your Caps Lock key into a key macro for Cmd+Shift+Opt+Ctrl and I've since been using it to launch Alfred workflows (it's rare that applications use all those modifiers for a shortcut, so the chance of over-riding a useful function with a global shortcut is lessened).

Link to comment
Share on other sites

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...