Created
March 1, 2017 12:46
-
-
Save tentacode/a7b3586ef77fd24e98bedd1c7502c6c5 to your computer and use it in GitHub Desktop.
AppleScript to reposition every app (that are not Finder or iTerm2) of one specific screen to center position and specific dimension
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" | |
repeat with p in (processes where background only is false) | |
tell p | |
if name is not in {"Finder", "iTerm2"} then | |
repeat with x from 1 to (count windows) | |
set winPos to position of window x | |
set xPos to item 1 of winPos | |
if xPos > 0 then | |
set position of windows to {100, 100} | |
set size of windows to {2340, 1240} | |
end if | |
end repeat | |
end if | |
end tell | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment