I've been using the Better Touch Tool and Right Zoom to be able to maximize windows to full screen, and to resize windows to the center, or top right / left quarter of the screen. Those apps are pretty slick.

What I really want is a way to predefine some windows specs and then apply that to a window. For example, the window could be 1024 * 768, or maybe it could be 300px from each edge of the screen.

I know the green button is supposed to choose a nice size for the window but it doesn't always work and with some apps (like TextMate) I'd just prefer to have a preset size / position that I could use.

I could probably somehow use applescript, but at times it seems to take forever before it runs so a native app for this would be cooler.

Thoughts?

link|improve this question

1  
If AppleScript takes too long you're probably wrapping it in a service. It's Automator's fault, not AppleScript. Use FastScripts or the global scripts menu you can enable via AppleScript Editor's preferences. – Daniel Beck Mar 29 '11 at 15:17
@db - off topic, but what if I save applescript as an app and then add it to the toolbar of finder windows? seems like sometimes this takes several seconds before running. – cwd Mar 29 '11 at 15:48
Haven't experienced that yet. How does it perform with the scripts menu I suggested, and placing them in /Users/cwd/Library/Scripts/? I'm not on a Mac right now. Btw, skip the @ or get it right -- I didn't get notified at about your comment. – Daniel Beck Mar 29 '11 at 15:57
I'll try using the scripts menu. regarding the @, I didn't realize it actually notified when using it. Where is the documentation on that? – cwd Mar 29 '11 at 16:05
1  
The Applescript runtime can take up to a few seconds to load, which causes a delay if you haven't run any scripts in a while. I'd say it's usually under a second though. And How do comment @replies work? - Super User Meta. – Lri Mar 29 '11 at 16:22
feedback

1 Answer

up vote 3 down vote accepted

Divvy

divvy

Breeze

breeze

Optimal Layout

Optimal Layout

Applescript for restoring default dimensions

try
    tell application (path to frontmost application as text)
        set s to do shell script "x=`echo '" & (path to it) & "' | sed 's/.*:\\(.*\\).app:/\\1/'`; sed -n \"s/^$x  \\(.*\\)/\\1/p\" /1/bounds.txt"
        set bounds of window 1 to words of s
    end tell
end try

bounds.txt looks like:

AppleScript Editor  420 22 1500 1100
Finder  0 22 960 587

Applescript for resizing to specific dimensions

try
    tell application "Finder" to set {0, 0, dtw, dth} to bounds of window of desktop
    tell application (path to frontmost application as text) to tell window 1
        set b to bounds
        set w to (item 3 of b) - (item 1 of b)
        set h to (item 4 of b) - (item 2 of b)
        set b to {dtw - w, (dth - h) / 2, dtw, dth - (dth - h) / 2}
        set bounds to b
    end tell
end try
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.