Created
November 17, 2025 06:27
-
-
Save thangtv611/3dacc3528599183e76b5ee871b55129d to your computer and use it in GitHub Desktop.
Move all windows to built-in desktop without worrying about external's position toward built in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tell application "System Events" | |
| set allApps to every application process whose visible is true | |
| repeat with appProc in allApps | |
| try | |
| repeat with w in (every window of appProc) | |
| try | |
| set {xPos, yPos} to position of w | |
| if xPos < 0 or yPos < 0 then | |
| set position of w to {100, 100} | |
| end if | |
| end try | |
| end repeat | |
| end try | |
| end repeat | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment