Jump to content

Recommended Posts

I really appreciate how the GitHub Desktop app makes it easy to open repositories with different tools, using different keyboard shortcuts:

 

image.png.1166f02405bdf1c5d58e6aca8d85fbfc.png

 

I'd find it really helpful if Alfred Workflows offered the same functionality, and in particular if this "Open Workflow folder in Finder" allowed me to right-click and choose to open with a specific app, i.e. Atom, TextMate, or some other editor.

 

Of course it would also be great if keyboard shortcuts were supported too.

 

623445710_CleanShot2020-08-11at11_24_45.png.4fd9470b83986763cb57c94539f54cec.png

Link to post
Share on other sites

@chris If you use a Run Script instead of the Run Apple Script, then select "External Script" as the language, then you get an "Open File" option, and your editing is done externally.

 

It's also worth noting that the Run Apple Script blocks Alfred until the script completes, so unless it's a very fast script, it's advisable to use Run Script instead anyway.

Link to post
Share on other sites

A workaround would be to Open in Terminal, then do a quick command

atom .

 to open the workflow folder in your editor.

 

Or opening in Finder and then, maybe, clicking a toolbar icon to open that folder in your editor.

 

But I like your idea of allowing a user-configurable external editor.

Edited by gingerbeardman
Link to post
Share on other sites
5 hours ago, gingerbeardman said:

A workaround would be to Open in Terminal, then do a quick command


atom .

 to open the workflow folder in your editor.

 

Or opening in Finder and then, maybe, clicking a toolbar icon to open that folder in your editor.

 

So, I actually downloaded and installed the Open with Atom workflow, so I just tap that button and then execute a keyboard shortcut to achieve the intended outcome, but it seems like this would be a useful adjustment to Alfred that would benefit everyone. 

 

Of course there are many ways to achieve the same thing; just seems it would be a really nice touch to configure the openers for tapping on that button.

Link to post
Share on other sites
4 hours ago, chris said:

Of course there are many ways to achieve the same thing; just seems it would be a really nice touch to configure the openers for tapping on that button.

 

Why would it be a "nice touch"? You can already open a script directly in your editor, as Andrew explained. Everyone already has a simple way to open the contents of a Finder window in their editor of choice. So what's the benefit in being able to reconfigure that button to do the same thing as the other button, while removing the ability to open the workflow in Finder?

Link to post
Share on other sites
30 minutes ago, deanishe said:

 

Why would it be a "nice touch"? You can already open a script directly in your editor, as Andrew explained. Everyone already has a simple way to open the contents of a Finder window in their editor of choice. So what's the benefit in being able to reconfigure that button to do the same thing as the other button, while removing the ability to open the workflow in Finder?

 

It wouldn't remove the ability to open the workflow in Finder. That could remain the default. I'm suggesting that if you option-click on the button, options to open the workflow in other apps that accept Folders would be shown. 

 

@Andrew's solution doesn't work for me; he was talking about a different problem. 

Link to post
Share on other sites
10 hours ago, chris said:

he was talking about a different problem. 

 

I'm talking about a similar thing. If you use a Run Script object instead, and configure it to use an external script, then you get a button to open that script in your default associated editor.

 

Depending on how you have your editor configured, this will also take you to the folder tree for that file.

Screenshot 2020-08-13 at 10.31.24.png

 

If the script is not set as External in somebody's workflow, then you wouldn't be able to edit that script externally anyway because the script isn't in a separate file.

 

Having said that, I do see what you're talking about for being able to open the workflow folder in a different app from the button next to the cancel button.

Link to post
Share on other sites
12 hours ago, Andrew said:

Having said that, I do see what you're talking about for being able to open the workflow folder in a different app from the button next to the cancel button.

 

I'm not sure the use case for using "External Script", but can see how that would achieve the same thing if that's the "Language" I had chosen. 

 

Again, since I'm interested in editing other people's Workflows (for example, updating them to support Alfred 4), I was only commenting on the button next to Cancel.

 

Thanks!

Link to post
Share on other sites
11 hours ago, chris said:

I'm not sure the use case for using "External Script"

 

It's for putting code in a separate script file in the workflow instead of in the Script box, which is a poor editor. Also having all your code embedded in info.plist kinda sucks with source control. The only reason not to use External Script is if your script requires option flags.

Link to post
Share on other sites

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