Shrink disk images
is a single file that, when double-clicked, appears on your desktop as a typical hard drive does. You can eliminate clutter by tucking away related files you don’t use often in a disk image. Better yet, you can store your sensitive files in an encrypted disk image that requires a password (
You’ve got two choices when you create a disk image via Apple’s helpful Disk Utility (/Applications/Utilities). By default, when you click on New Image in Disk Utility and then click on Create, you’ll get a 40MB “normal” disk image. This will take up 40MB of hard-drive space—even if you’ve yet to place a single file in it. Alternatively, you can click on New Image and then set the Format pop-up menu to Sparse Disk Image. A 40MB sparse disk image will occupy 40MB only if you’ve actually saved that much data in it.
Sparse disk images do spring one surprise on you: though they grow automatically as you add new files, they don’t
when you remove those files. If you remove 40MB of data from a 40MB sparse disk image, it will still require 40MB of space. You can fix this in Terminal (/Applications/Utilities). Open the program and change directories to where the disk image is. (Type
and then drag the folder containing the disk image to the prompt. Press return.) Then type the following command:
That method is fine and dandy, but I prefer a faster way to condense a sparse disk image—control-clicking on the file in the Finder and choosing an Automator workflow from the contextual menu. Start by launching Automator (/Applications). In the Library column, click on Finder and then drag Get Selected Finder Items from the Action column to the blank work area on the right. Next, click on Automator in the Library column and then drag Run Shell Script into the work area, below the first command. In the Run Shell Script action, set the Shell pop-up menu to /bin/bash (it should be that by default), and set the Pass Input pop-up menu to As Arguments. Erase the entire script in the text field, and replace it with this one line:
hdiutil compact "$"
That’s all there is to it. Choose File: Save As Plug-In, and name your workflow something like Compact Sparse Image. Make sure that the Plug-in For pop-up menu is set to Finder, and click on Save. To use your workflow, select a sparse disk image (it will have the file extension
), make sure it’s not mounted, control-click on it, and then choose Automator: Compact Sparse Image (or whatever name you chose for your workflow). As the workflow runs, it will release any free space in your sparse disk image.
See it all on the Dashboard
Mac OS X 10.4’s Dashboard is a place where small, special-purpose applications (called widgets) reside, staying invisible until you need them. Press F12 (or launch the Dashboard program in your Applications folder) to reveal the widgets floating against the dimmed background of your open windows.
Sample What’s There
Apple ships more widgets with OS X than you see at first glance. To see what’s available, activate Dashboard and click on the large plus-sign (+) button at the lower left of the screen. Some useful widgets include Dictionary, Flight Tracker, Ski Report, Unit Converter, and Weather. Add any of these to your Dashboard by clicking on its icon in this list (see “Lots of Tiny Programs”).
Work with Widgets
Widgets aren’t complicated programs—they usually provide discrete bits of information, and as a result, interacting with them is pretty simple: type text into text fields, click on radio buttons, and so on. If your cursor changes into a hand as you move over the widget’s window, that shows you’ve found a clickable hyperlink, just as with a Web page.
There are two ways to close a widget. Hold down the option key as you mouse over an open widget to reveal a small black
in its top left corner. Click on that, and the widget will close. If you’ve revealed the widget bar (by clicking on the big plus sign), you’ll see the
s for all open widgets.
If you see a small
icon in the lower right corner of a widget, click on it to flip the widget over. Here you’ll find information about the widget itself and sometimes settings you can adjust. For the Stocks widget, for instance, you can edit the list of stocks.
You can open many copies of the same widget. Say you want to track the time in multiple locations: add the World Clock widget as many times as necessary by clicking on it in the Widget bar, and then use the
icon on each one to pick a different location.
If you notice that a widget that gets data from the Internet, such as the Stocks widget, has gotten stuck and is showing old data, refresh it manually. Click on it and press 1-R. You’ll see a visual twisting effect, indicating that the widget is reloading.
The Wide World of Widgets
While Apple’s widgets are interesting, they’re really just the tip of the iceberg. At press time, Apple’s
Dashboard Widgets page
included over 3,000 different widgets, most of them completely free.
As you go crazy with your newfound widgets, keep in mind that a little program—just like a big one—takes up some memory. Leave the few you use most often open, and access the rest through the widget bar only as you need them.
Senior Editor Rob Griffiths runs the
Lots of Tiny Programs: OS X 10.4’s Dashboard lets you run small informational programs, also known as widgets, in a layer of their own. Hide or reveal them by pressing F12.