Hide Desktop Mess with AppleScript

by David Battino

When I want to concentrate on a computing task, I often invoke the Finder's "hide others" command by Command-Option-clicking on an icon in the Dock. But my screen is so big and my desktop so cluttered that merely hiding the other applications is hardly restful.

In less time that it would take to clean up the piles of icons on my desktop, I whipped up this AppleScript and mapped it to a function key. It grabs the path of the frontmost application, launches Katsura Shareware's free Screenshot Helper — hiding everything on the desktop — and then switches back to the original app.

(* 
db Hide-the-Desktop
By David Battino, Batmosphere.com, 2007-09-30 
This script hides the desktop and then switches back to the previous app.
Requires Screenshot Helper, free at www.katsurashareware.com.
*)

set front_app to (path to frontmost application as Unicode text)

tell application "Screenshot Helper"
	activate
end tell

tell application front_app
	activate
end tell

Hopefully your virtual desktop is tidier than mine, but you may still find the "do something and then switch back" routine helpful.

Katsura Screenshot Helper

Katsura Screenshot Helper covers your messy desktop with a pure color or photo.


10 Comments

Jochen Wolters
2007-10-01 02:45:06
David,


I'm sure you'd love "Think" by Freeverse, which is a little utility designed just for the purpose of letting you concentrate 100% on the front-most application.

Gary
2007-10-01 11:14:18
As soon as I began reading this, I was thinking "Think"... I don't use it often, but it works well when I require it.
rt0
2007-10-01 23:44:21
There are programs like TinkerTool, which allow you to add a Quit item to the Finder menu. Quiting the Finder clears your entire desktop. You can hide the possible 'clutter' from other applications in the usual way. Restore your desktop with relaunching the Finder by clicking its icon in the Dock.
eblu
2007-10-03 07:58:17
why don't you just use spaces in leopard, and leave all the clutter in one space?
David Battino
2007-10-03 09:41:25
Thanks for the suggestions, everyone. There’s certainly more than one way to clean (or cover) a messy desktop.


I completely spaced on Spaces, though of course I don’t have Leopard yet and it may not run on older Macs. Spaces’ ability to simultaneously hide the desktop and show several related applications is appealing, but I could still do that with the AppleScript technique by adding a second activate command.

tf
2007-11-25 08:35:08
Check "Disable Dekstop Features" in TinkerTool and get rid of the Icons without an Icon in your Menubar.
Hide desktop
2008-04-29 06:28:28
Anti-Boss Key - All in one bosskey application. Hide windows quickly.
You can use this all in one bosskey application. A real gem that supports windows vista and hides tray icons too.
David Battino
2008-04-29 21:43:09
@Hide:


Bosskey! What a great word. I like the way your app promises to hide dodgy Windows taskbar items as well.

Allan Cass
2008-05-09 12:05:52
Here is the link again as I missed I guess (http://www.mindgems.com/products/Boss-Key/boss-key-tutorials.htm): Anti-Boss Key - all in one bosskey application. Hide windows quickly.
You can use this all in one bosskey application. A real gem that supports windows vista and hides tray icons too.
homekeyengla
2008-08-08 05:07:12
jhon stone woman water tom all frog see stone