Chris Messina Posted August 11, 2020 Share Posted August 11, 2020 I really appreciate how the GitHub Desktop app makes it easy to open repositories with different tools, using different keyboard shortcuts: 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. Link to comment Share on other sites More sharing options...
Andrew Posted August 11, 2020 Share Posted August 11, 2020 @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 comment Share on other sites More sharing options...
Chris Messina Posted August 11, 2020 Author Share Posted August 11, 2020 @Andrew sorry, I think you're talking about something else? I just want to open other people's Workflow folders in Atom from within Alfred. Link to comment Share on other sites More sharing options...
dfay Posted August 12, 2020 Share Posted August 12, 2020 But the example you posted is from a Run AppleScript object... Link to comment Share on other sites More sharing options...
Chris Messina Posted August 12, 2020 Author Share Posted August 12, 2020 1 hour ago, dfay said: But the example you posted is from a Run AppleScript object... Fair enough! Noob mistake? How about this one? gingerbeardman 1 Link to comment Share on other sites More sharing options...
gingerbeardman Posted August 12, 2020 Share Posted August 12, 2020 (edited) 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 August 12, 2020 by gingerbeardman Link to comment Share on other sites More sharing options...
Chris Messina Posted August 12, 2020 Author Share Posted August 12, 2020 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. gingerbeardman 1 Link to comment Share on other sites More sharing options...
deanishe Posted August 12, 2020 Share Posted August 12, 2020 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 comment Share on other sites More sharing options...
Chris Messina Posted August 12, 2020 Author Share Posted August 12, 2020 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 comment Share on other sites More sharing options...
Andrew Posted August 13, 2020 Share Posted August 13, 2020 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. 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 comment Share on other sites More sharing options...
Chris Messina Posted August 13, 2020 Author Share Posted August 13, 2020 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 comment Share on other sites More sharing options...
deanishe Posted August 14, 2020 Share Posted August 14, 2020 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 comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now