Skip to content

Instantly share code, notes, and snippets.

@chockenberry
Created January 23, 2022 22:33
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chockenberry/197c15f615e61b6a5ab4d19b040dae09 to your computer and use it in GitHub Desktop.
Save chockenberry/197c15f615e61b6a5ab4d19b040dae09 to your computer and use it in GitHub Desktop.
Fix Terminal Windows
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
@chockenberry
Copy link
Author

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment