uɐʎɹ ррoʇ uɐʎɹ bio photo

uɐʎɹ ррoʇ uɐʎɹ

Hello. Is is me you're looking for?
robotic life signs.
makes noise, hears sounds, intafon.
affe auf deux roues.

Email Twitter Github Github Gist Last.fm Soundcloud Flickr

PlasticWare Downloadable ::
Tile Windows Version 1.0 (Nov. 1, 2006)
Download (~4k) :: TMBundle.zip

So I spent a few minutes looking about today for something that would allow me to tile my open windows in TextMate. I couldn’t find anything except for people wishing that TextMate could arrange windows like BBEdit, so I mocked up a little applescript application and then copied it over into a TextMate command in the bundle editor wrapped in an osascript call. Its by far not perfect, but here is what it does in a nutshell.

The script gets all the TextMate windows and, for now, grabs only the ones that are both zoomable and visible. I didn’t yet filter out some of the possible windows that would be caught by this that you wouldn’t want, such as the Bundle Editor window, but I wanted to get something working. It then runs through the windows and does a little math to determine which of the windows is closest to where the new positions should be, and moves them. This algorithm isn’t perfect, but it does ok. The default minimum window width is 700px. The default setting for the key command is control-option-command-shift-T (didn’t want to overwrite something else 😉 ).

You should be able to unzip and install the bundle as you would any other TextMate bundle. Enjoy it, and if you have any thoughts, let me know.