kasper / phoenix

A lightweight macOS window and app manager scriptable with JavaScript
https://kasper.github.io/phoenix/
Other
4.38k stars 127 forks source link

Focus screen when moving window to new screen #228

Open konstantinkobs opened 6 years ago

konstantinkobs commented 6 years ago

I wrote a config that moves the currently focused window to a new screen by setting the Rect of the window to coordinates inside the target screen. This works fine, however, the new screen won't get focused. The old screen is focused instead and if I use another shortcut, for example to center the window on the screen, the window jumps back to the old window.

Is there a way to focus the new screen explicitly or is there a function better than setting the Rect for the window to move the window to the new screen?

kasper commented 6 years ago

Hi! Hmm, you could try focusing the window again after moving…

konstantinkobs commented 6 years ago

I tried that, but unfortunately, this did not have any effect. I also got the target screen's active space and manually added the window to it, but this didn't work either. 🙁

kasper commented 6 years ago

Ok, thanks! I’ll look into it.

konstantinkobs commented 6 years ago

Nice, thank you very much! Phoenix is a beautiful tool that I really like! Keep up the good work! 😊

jameslittle230 commented 5 years ago

Any updates on this?

kasper commented 4 years ago

@jameslittle230 Sorry, I haven’t had time to look into this yet. Feel free to contribute.