[TxMt] Re: silly question about the zoom button

Ben Soprano Alpert spicyjalapeno at gmail.com
Fri Nov 17 23:16:09 UTC 2006


For those too lazy to type in that script, click below:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Resize to Screen Height.tmCommand
Type: application/octet-stream
Size: 969 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20061117/dd711bc5/attachment.tmCommand>
-------------- next part --------------


:)

On Nov 16, 2006, at 11:39 PM, Dan Lowe wrote:

>
> 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
>
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>


More information about the textmate mailing list