November 16, 2012

How to Maintain a Clean and Tidy Desktop

I’m a bit OCD when it comes to my workstation. I like to keep a clean desk in the office, and a clean desktop on my screen. This includes keeping my files organized, my email in-box at a manageable number (preferably zero when possible) and my windows positioned just right. Years ago, I’d use my desktop like a portal to all my projects. That’s not as ideal when you’ve got windows covering up the desktop all the time, but it did work well for a while. To do so, I had a custom wallpaper and snap-to-grid icons organizing everything into groups. This is all before OS X had multiple desktops, Mission Control, and handy Dock features.

Now, I like to keep things clean and simple, no icons on the desktop at all. I also like to keep specific app windows in very precise positions on my screen, different setups for particular activities. Example: Coda (coding app) is positioned on the left side of the screen with my web browsers (Safari, Chrome and/or Firefox) on the right. I can code in one side and refresh in the other without Option-Tab, and be able to see both at all times.

Finder window is a bit tricky sometimes. Each remembers it’s last position and depending on what path you took to open that window, it might not inherit it’s parent’s position and size. So, to manage Finder windows as well as app window size and position, I put together a series of Applescripts in Automator that run as Services. Then, simply set focus on the window I want to position, then go to the menu bar and select[App Title] > Services > [ Position Script ].

In Automator, create a new Service. Drag in “Run Applescript” with “No Input” selected and put in the Applescript code below. The “set bounds” values are top, left, (width+left), (height+top). I found it easiest to set up a Fireworks document and position some boxes on a screenshot of my desktop for specific x, y, width and height values.

on run {input, parameters} 
  set front_app to (path to frontmost application as Unicode text) 
    tell application front_app activate set bounds of window 1 to {1, 1, 500, 500} 
    end tell 
  return input 
end run

You can have as many of these position script services as you want. I keep it simple with just an “App Left”, “Browser Right” and “Finder” positions… most apps will fit into one of those 3 spots. With these handy scripts, if some jerk uses my computer and moves my windows, I can easily get everything back to the way it was.


I’m a full-stack website developer and designer. Whether you’re looking for an online store, portfolio showcase or a blog, I can help make it stand out from the crowd. I love LAMP.