KaputtZimon Posted January 20, 2023 Share Posted January 20, 2023 (edited) Hello, I am working in a multi monitor and multi space setup. I often use Alfred with the normal "App launch" behaviour to quickly jump to an already open app in which space this app might be. This works great. However sometimes I am in a space where I want to open a new window of the app in that space. There is a small workflow for chrome which does that, but I actually need this for any app. Furthermore, sometimes I am in a space and I want to use an app which is another space, but I don't want to create a new instance, I just want to move this app in this space. Ideal I would like to achieve this with the normal app launch behaviour, so when I type in 'chrome' I then can press a modifier key to choose between 'move here', 'create new window'. Is there anyway to achieve this with a workflow or with any other extension/scripting? thanks for the input. Edited January 20, 2023 by KaputtZimon Link to comment
KaputtZimon Posted January 22, 2023 Author Share Posted January 22, 2023 I found this workflow to start a new instance of an app, however I have no idea how to use is, or how to use is from a modifier key when I search for an app... Link to comment
KaputtZimon Posted January 22, 2023 Author Share Posted January 22, 2023 I know have a workflow which uses a file filter on the /Application folder and rund `open -n "${1}"`. So is there a way to call this from a modifier key when I normally would start an app? However I have no clue how to move an existing application to the current space, if that is even possible... Link to comment
Stephen_C Posted January 22, 2023 Share Posted January 22, 2023 I have not tried this (because I'm not currently connected to my separate monitor) but, assuming you're using Alfred 5, have you looked at connecting to an app launcher an Automation Task Move Window to Different Screen? Note: there are options for which screen; and the result centres the topmost window on the specified screen. Stephen Link to comment
KaputtZimon Posted January 22, 2023 Author Share Posted January 22, 2023 yes I am using Alfred 5. However it looks like that there is no input for this automation task, so how do I use it? And how can I connect this to the normal app launch? Link to comment
Stephen_C Posted January 22, 2023 Share Posted January 22, 2023 I'm assuming (still unable to test it, sorry) that if you create a workflow that: starts with either a hotkey or a keyword action; which is linked to a Launch Apps/Files action; which is in turn linked to an Automation Task configured to Move Window to a Different Screen you'll end up with the new app window displayed, centred, on the screen you select when configuring the Automation Task. In other words, the first steps provide you with the "topmost window” that the Automation Task requires in order to move it to a different screen. Of course, there's no reason why you can't use the same launcher to launch, and leave, the app on your first screen—using a key modifier to launch the app and move it to a different screen. Stephen Link to comment
KaputtZimon Posted January 23, 2023 Author Share Posted January 23, 2023 (edited) Well I am looking to solve two problems: 1. I want to open a new instance of an app, which I tried using the approach above with open -n "${1}" This works with some apps but apparently every app implements this different, so in my case 50% of apps do not open a new instance when using this command. So I guess this is just not possible. 2. I want to move an already open app to the monitor and space where the cursor is. When I launch an App which is not open yet, it automatically appears in the right space and monitor. The problem is when I want to launch an app which is already open in another space. When this happens then the space is changed where the app is, but I want to move the app to my current space. One first step solution could be, to first get all open apps, and then select one which is then moved to the current space and screen. But the solution for this should be using the normal app launch behaviour, since I don't want to have to remember which apps are open or not. Also, apparently there is no easy way to move a window to a different space without the mouse.... Edited January 23, 2023 by KaputtZimon Link to comment
Stephen_C Posted January 23, 2023 Share Posted January 23, 2023 2 hours ago, KaputtZimon said: Also, apparently there is no easy way to move a window to a different space without the mouse.... The whole thing is much easier using an app like Moom. Stephen Link to comment
vitor Posted January 23, 2023 Share Posted January 23, 2023 @KaputtZimon Apple does not provide an API to programmatically move windows to specific spaces. Until that changes, it can’t be done (or requires hacky methods). To request to Apple that they add the feature, use the Feedback Assistant app. They say that the more requests they have, the likelier something is to be implemented. Link to comment
mjs271 Posted January 31 Share Posted January 31 Does anyone know if Apple's made any changes on this? I would also love to see this functionality... Link to comment
vitor Posted January 31 Share Posted January 31 They have not. It’s unlikely it’ll happen unless enough people ask for it. 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