[TxMt] Re: silly question about the zoom button
Dan Lowe
dan at tangledhelix.com
Fri Nov 17 06:39:20 UTC 2006
On Nov 16, 2006, at 6:38 PM, Jay Soffian wrote:
> Oooh, that's a good idea. I didn't realize Applescript had that
> control over windows. A little googling and:
>
> http://www.bigbold.com/snippets/posts/show/1067
>
> I'll make a few options for various window sizes I use commonly and
> just toss them into my personal bundle.
This seems to work as a vertical maximize for me. Preserves the
horizontal position and size, maximizes only vertically:
#!/bin/sh
/usr/bin/osascript -e '
set screenHeight to word 3 of (do shell script "defaults read /
Library/Preferences/com.apple.windowserver | grep -w Height") as number
tell application "TextMate"
set theBounds to bounds of front window
set xPosition to item 1 of theBounds
set windowWidth to item 3 of theBounds
set bounds of front window to {xPosition, 0, windowWidth,
screenHeight}
end tell
'
I bound it to ctrl-cmd-Z.
--
The best way to predict the future is to invent it. -Alan Kay
More information about the textmate
mailing list