jswifty Posted June 4, 2022 Share Posted June 4, 2022 Hello, Is there a way of configuring a workflow in Alfred that will launch a new workspace (or tab - I’m not sure what they are called in macOS) and launch specific applications within that workspace? Please advise, Jason Link to comment
vitor Posted June 5, 2022 Share Posted June 5, 2022 (edited) 1 hour ago, jswifty said: a new workspace (or tab Those are wildly different things. Are you referring to spaces? If so, there’s no programatic way to do what you ask. Closest you can get is GUI automation, faking keypresses and clicks to create a new space. But launching apps there is a whole different matter. To use the code in that post, copy the bottom block (“For other languages”) in a Run Script Action with /usr/bin/osascript (AppleScript) as the Language. Try it in the Script Editor app first to see how it works. For better ways than that, you’ll need to open the Feedback Assistant app and make a request to Apple. Edited June 5, 2022 by vitor Link to comment
Pearcen Posted June 5, 2022 Share Posted June 5, 2022 (edited) Hi Jason, Closest I can get you is opening an app full screen in its own space in a fairly clunky way with a script filter to pick the app and then some AppleScript to as @vitor says "Fake the button presses" https://github.com/pearcenuk/Alfred-public/blob/main/FullScreen/FullScreen.alfredworkflow Launch by typing "fs" and choose your app from there. BetterTouchTool or KeyboardMaestro might be able to do more of what you need. Edited June 5, 2022 by Pearcen Link to comment
vitor Posted June 5, 2022 Share Posted June 5, 2022 20 minutes ago, Pearcen said: BetterTouchTool or KeyboardMaestro might be able to do more of what you need. Checked BetterTouchTool, and its solution is pretty much the same as the AppleScript from the linked Stack Overflow (acts the same). Pearcen 1 Link to comment
jswifty Posted June 5, 2022 Author Share Posted June 5, 2022 Thank you @vitorand @Pearcen. I'll give it a shot. Link to comment
Pearcen Posted June 6, 2022 Share Posted June 6, 2022 (edited) Have just noticed my very quick and dirty bash script to get to the app names doesn't take into account apps with a space in the name App Store.app comes out as 2 things: App and Store.app 🤦♂️ I'll fix it up soon. EDIT: Updated workflow to my first love Perl and it works now. https://github.com/pearcenuk/Alfred-public/blob/main/FullScreen/FullScreen.alfredworkflow Edited June 6, 2022 by Pearcen Link to comment
vitor Posted June 6, 2022 Share Posted June 6, 2022 10 hours ago, Pearcen said: Updated workflow to my first love Perl and it works now. Fun to see a Workflow in Perl! But keep in mind that’s one of the scripting languages Apple mentioned they will eventually remove from macOS. Link to comment
Pearcen Posted June 6, 2022 Share Posted June 6, 2022 3 minutes ago, vitor said: Fun to see a Workflow in Perl! But keep in mind that’s one of the scripting languages Apple mentioned they will eventually remove from macOS. True, true. I'll update one day, but until that day it does the job nice and simply. 😆 Perl shows my age. vitor 1 Link to comment
active1 Posted July 22, 2022 Share Posted July 22, 2022 Worth looking at TotalSpaces for Mac https://totalspaces.binaryage.com. You can designate which space an app opens in. Link to comment
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