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