Jump to content

Redundant hot keys


Recommended Posts

Alfred has a preference to set the "selection hotkey". This means I can select a file in the finder, and then use that hotkey to perform actions on it.

 

Alfred has a sample workflow to "show Alfred with selected text".  

 

Alfred requires me to use two distinct hotkeys for these functions, but I would like to use the same for both. I believe Alfred could detect whether I have text selected, or a file selected.

 

This would partially bridge the lacking "instant send" feature of LaunchBar. (The other missing link would be allowing the selected text to be actioned to any system service).

 

Is there a way to use the same hotkey for both?

Link to comment
3 hours ago, nyc2cal said:

I believe Alfred could detect whether I have text selected, or a file selected.

 

It can, but what should it do then?

 

4 hours ago, nyc2cal said:

Is there a way to use the same hotkey for both?

 

In practice, yes. You can disable the hotkey in Alfred and assign it to a workflow instead. Then your workflow can check if files are selected, and if so, tell Alfred to run its File Actions on them. And if the selection isn't files, the workflow can handle the input itself.

Link to comment

There are actually a few new workflow objects coming in Alfred 4.1 which will help simplify this:

  • An "Action in Alfred" action which takes the passed in file and shows Alfred's action panel.
  • A "File Conditional" object to test if the passed in argument is a file

With these, it should be pretty easy to replace out the default selection hotkey for now, but here are also more distant plans for the selection hotkey which I can't share right now.

 

Cheers,

Andrew

Link to comment
3 hours ago, Andrew said:

There are actually a few new workflow objects coming in Alfred 4.1 which will help simplify this:

  • An "Action in Alfred" action which takes the passed in file and shows Alfred's action panel.
  • A "File Conditional" object to test if the passed in argument is a file

With these, it should be pretty easy to replace out the default selection hotkey for now, but here are also more distant plans for the selection hotkey which I can't share right now.

 

Cheers,

Andrew


Looking forward to the next release... eta 😅

Link to comment
  • 3 weeks later...
On 6/1/2020 at 7:52 AM, Andrew said:

There are actually a few new workflow objects coming in Alfred 4.1 which will help simplify this:

  • An "Action in Alfred" action which takes the passed in file and shows Alfred's action panel.
  • A "File Conditional" object to test if the passed in argument is a file

With these, it should be pretty easy to replace out the default selection hotkey for now, but here are also more distant plans for the selection hotkey which I can't share right now.

 

Cheers,

Andrew

 

Played with the beta this morning. The "Action in Alfred" takes multiple files as input but only passes the first one to the Alfred action panel. This is not ideal.

Link to comment
35 minutes ago, nyc2cal said:

Played with the beta this morning. The "Action in Alfred" takes multiple files as input but only passes the first one to the Alfred action panel. This is not ideal.

 

@nyc2cal It should work fine with multiple files, under what scenario are you seeing this not work as there may be a bug in the beta?

 

For example, If I create a simple workflow which is a Hotkey Trigger which takes the selection in macOS, and wire this directly into an Action in Alfred... then select some files in finder, and use my hotkey, I see both files in the actions panel.

Link to comment

4.1 pre-release b1164 is now available which addresses the issue @nyc2cal was experiencing.

 

Essentially, the Arg/Var utility was passing through an array of files from the selection, instead of a tab separated string (pre 4.1 behaviour). His run script was processing a tab separated array of ARGV[0], instead of an ARGV array. The Arg/Var now has the pre-4.1 behaviour, but with the addition of a checkbox to pass through the argument unprocessed, so you have the choice.

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