Problem trying to solve
I use multiple terminal windows to develop web applications. I'll have a terminal open for vim
, a terminal open for git
and a terminal open for basic file/directory commands. The terminal application doesn't remember window settings so whenever I quit the terminal or have to restart I must manually resize and position my terminal windows. I would like to automate this process using AppleScript.
- 1 window, big, fills up left half of screen (
vim
) - 2 windows, smaller, stacked on top of one another, filling up other half of screen
My attempted solution
tell application "Terminal"
activate
set the bounds of the front window to {5, 0, 1000, 950}
do script "clear" -- opens up the second window
set the bounds of the front window to {1105, 0, 400, 500}
-- haven't gotten to third window yet
end tell
The problem
The second window, the one being created by do script "clear"
, is being positioned oddly. The left, top and height are all behaving as expected. However, the window is set to it's minimum width, regardless of the value passed in the width parameter. It could be 1000 and it's still set to minimum. I've search high and low on Google, SO, Super User and Ask Different with no luck.
Any advice on what I'm doing wrong or what could be causing this issue with the weird width on the window created by do script "clear"
?
Disclaimer
I'm an AppleScript beginner. The syntax is unlike anything I've ever worked with (PHP, VBA, JavaScript) and I'm almost positive this is not the best, or even correct, way to be doing what I want to do. However, I don't know AppleScript enough to really tell, other than gut feeling.