Created
January 23, 2022 22:33
-
-
Save chockenberry/197c15f615e61b6a5ab4d19b040dae09 to your computer and use it in GitHub Desktop.
Fix Terminal Windows
This file contains 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 "Terminal" | |
set ws to windows | |
if (true) then -- set to false to see current window positions | |
set c to 80 | |
set ps to {{4215, 27}, {3629, 27}, {3043, 27}, {3043, 734}, {2457, 734}, {3629, 734}, {4215, 734}} | |
set r to 48 | |
set ix to 1 | |
repeat with p in ps | |
set w to item ix of ws | |
set position of w to p | |
set number of rows of w to r | |
set number of columns of w to c | |
set ix to ix + 1 | |
end repeat | |
else | |
set ps to {} | |
repeat with w in ws | |
set p to position of w | |
set ps to ps & {p} | |
end repeat | |
ps | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run the script with the first conditional set to "false": this will print out a list of your current window positions.
Then update the script with that list and change the conditional to "true".