Applescript to arrange your desktop
Here's a very cool tip we first saw at Lifehacker. Jeff Kelley is a MacBook Pro user who, like many others, connects it to several displays, depending on context and the task at hand. If you've done this, you may be familiar with the same irritation that has bothered Jeff. Namely, application windows re-sizing themselves across displays. The difference between Jeff and the rest of us is that he did something about it.
Here is a great AppleScript that notices his screen resolution and sizes his application windows according to his likes. Now, Mail, iCal and so on will appear just where they ought to. Very cool!
Share
Categories
Here's a very cool tip we first saw at Lifehacker. Jeff Kelley is a MacBook Pro user who, like many others, connects it to several...
Add a Comment
FYI, I've made some changes to the original script on my blog. It's now much more user-friendly.
May 29 2008 at 7:27 PM Report abuse Permalink rate up rate down ReplyI have been playing with this since last night and I think I am finally satisfied with the outcome; here are some things I ran into...
1) The quotation marks are not copying correctly from the site into script editor so you will have to replace them manually prior to compiling.
2) The format of the bounds for the windows is also useful to know. First notice that the very top of the desktop is y=0 and the very left the screen is x=0. The window bounds follow this format (dist x left, dist y top, dist x right, dist y bottom). Distance from x(y)=0 to [window side]. If that doesn't make sense I'll try to make a visual diagram.
3) You can quickly find the values of distances using CMD+SHIFT+3 and looking at the coordinates as you drag the selector around the screen.
4) Because of how I like my windows I found it easier to do all of the resizing within two if-statements. ie. If Width = 1920 size the windows this way, If Width = 1440 size the windows that way.
I'll also go ahead and put all of this on my site as well as a copy of my script so anyone who cares can take a look.
http://aroncares.com
Hot Apps on TUAW
Deals of the Day
more deals- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- miFrame Picture Frame Dock for iPad for $64 + $8 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
- Hannspree Apple-Shaped 28" 1080p LCD HDTV for $270 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



2 Comments