Apple includes many high-quality desktop pictures with all Macs, including NASA’s iconic Blue Marble picture of the Earth from space. While I hold nothing against Apple for including the version of the image that shows the western hemisphere, primarily North and South America, I thought it would be nice to have a version of the image that actually shows the part of the planet where I live, namely the eastern hemisphere.
NASA provides a high-resolution image (7.2MB TIFF) of the eastern hemisphere Blue Marble. Download the image, and place it in the same folder as Apple’s pre-installed Nature images: /Library/Desktop Pictures/Nature
The Apple image is simply the Blue Marble superimposed on a pure black background to fit a 16:10-ratio widescreen display without distorting the image. However, NASA’s original image is perfectly square. You therefore need to select the image from the Desktop tab of the Desktop & Screen Saver preference pane and choose Fit to Screen. The sides will probably be filled with a default aqua blue colour, so click on the color palette picker and select a black fill color for the remainder of the screen space (try the Licorice crayon).
Extending the original image file to fill a computer screen without any space left on the sides (Apple’s image is at 2,560 x 1,600 pixels) is an easy exercise in Photoshop or GIMP that is left to the reader! Note that users who have the latest iMac models have a 16:9-ratio screen, which may affect the desired extended image size.
I was looking for a weird (don't ask why) background for my desktop, and I thought of the pattern for Dashboard's widget bar (a Mac Pro-like perforated metal strip). How could I make this into a uniform desktop pattern? The answer lies in /System » Library » Dock.app » (Control-click and pick Show Package Contents from the pop-up menu) » Contents » Resources.
First, I located perf.png in that folder, and dragged it to my desktop. Then, I opened that copy in Preview. I cropped this to 10x10 pixels, starting from the top hole with a one-pixel left margin, and ending below the hole to right (see example at right).
(On certain computers, for some reason, there is a different bottom to the hole. Leave a margin of one pixel if the hole is 3x4, and no margin if it is 3x5.) Save the file as a PNG, and then set it as your desktop picture with the Tile option. Result? Full metal desktop.
[robg adds: The image above is from my machine, and it's actually 9x10, but it worked in my testing...though I reverted to my rotating set of desktop pictures after testing.]
Generally, when files are dropped in your ~/Public/Drop Box you can only read them. You have to save a copy if you edit it. I wanted a script that would enable writing and that moved them to your desktop. So I wrote a Folder Action that let me do both things. If I could not enable them because of limitations, I want a sudo (SuperUser Do) to be used.
Here is my AppleScript to do this:
on adding folder items to thisFolder after receiving theseItems -- create list of files & folders
try -- in case you can't due to limitations
repeat with thisItem in theseItems -- take a file to repeat with
set thisPath to quoted form of POSIX path of thisItem -- puts the shell path in quotes for ease of use
set thisCommand to "chmod u+w " & thisPath -- the command
do shell script thisCommand -- execute the file
end repeat
move theseItems to desktop
on error
repeat with thisItem in theseItems -- same except with sudo
set thisPath to quoted form of POSIX path of thisItem
set thisCommand to "sudo chmod u+w " & thisPath
do shell script thisCommand with administrator privileges -- added the sudo part
end repeat
move theseItems to desktop
end try
end adding folder items to
[robg adds: To use this, save the script in your user's Library » Scripts » Folder Action Scripts folder, and then attach it to your Drop Box folder as a Folder Action. In 10.5, Control-click on the Drop Box folder and select More » Attach a Folder Action from the contextual menu; in 10.6, choose Folder Actions Setup from the contextual menu. I haven't tested this one. Also note this hint, which explains Drop Box folder permissions in a clear and easy-to-understand manner.]
This simple Automator Service will copy the path of a Finder item to the clipboard as a file:// URL; this is very helpful in my environment, where I need to send a shared file's location to someone, rather than emailing around copies of a file.
In Automator, create a new Service and set it to receive selected files or folders in the Finder. Next add the Copy to Clipboard action. For the final step, drag in the Run a Shell Script action, and paste in the following code (all on one line, replacing any existing code):
sed -e 's/:/\//g' -e 's/\ /%20/g' -e 's/^/file:\/\//g' | pbcopy
This transforms the Mac-style colon-delimited path into a POSIX path, and prepends file://, so the path becomes a clickable link when pasted into an email.
[robg adds: This worked as described in my testing.]
Do you like the slow motion effect on minimization, but do not like to hold the Shift key every time you do it -- and you dislike double-clicking the title bar when you want to minimize a window? If so, then take a look at the following AppleScript. I use this AppleScript with CornerClick, which is a (free) utility that lets you assign actions, including running AppleScripts, to the corners of your screen.
With the following Applescript, you can trigger a "Minimize with slow motion effect." Assign it to a corner using CornerClick, and you can minimize a window in slow motion with a flick of the mouse. Here's the script:
tell application "System Events"
keystroke "m" using command down
key down shift
delay 0.3
key up shift
end tell
tell application "System Events"
set proc to name of the first process whose frontmost is true
tell process proc
-- add error trapping here
tell its window 1
set w to its name
if get value of attribute "AXMinimized" is false then
tell application "System Events"
keystroke "m" using command down
key down shift
delay 0.3
key up shift
end tell
end if
end tell
--
end tell
end tell
say "Collapse" using "Alex"
You'll see the script tries to minimize twice, as sometimes OS X does not react on the first try with CornerClick. It also provides audio feedback when it's done. Try it out if you like; it's just a visual effect, nothing more.
I noticed that if you have your desktop picture (wallpaper) set to shuffle between a number of images, and you don't like the currently-selected picture, you can manually skip it by killing and restarting the Dock. Just type the following into Terminal:
killall Dock
When the Dock restarts, it will shuffle to another desktop picture.
[robg adds:I believe a "friendlier" version of this command is killall -QUIT Dock, which tells the Dock to quit nicely, instead of force quitting it. (This is wrong; see the comments!) If you find yourself doing this regularly, you could turn it into a simple Automator application, using the above command, or the AppleScript alternative (tell application "Dock" to quit). Then again, if you're doing this a lot, perhaps you should look to change your collection of desktop images!]
I've noticed that a number of people (in addition to myself) like to display the output of the cal utility in a GeekLog geeklet (see this older hint, for example).
Unfortunately, there's no easy way to highlight the current date in the output, and the only workaround I've seen mentioned is to run the output through awk to put braces around the current day. That's a bit ugly for my taste, so I endeavored to find a way to highlight the current day with another color.
My solution uses perl, and instead of putting braces around the current date, it replaces everything but the current date with a space, and strips out the header lines (the month and the weekdays):
cal | perl -wne 'BEGIN{chomp($d = `date "+%e"`)} if (/^ *\d/) {s/\b$d\b/"#" x length($d)/e; s/\d/ /g; s/#+/$d/g; print}'
To use this, you make two calendar Geeklets in GeekTool: one which displays the normal output of cal, and one which displays the output of the above command with the text in a different color (I chose yellow), both in a monospace font, of course. Finally, you position the single-day calendar precisely over the full-month calendar, so that the highlighted day sits exactly over the current day.
As the day changes, it should always align with the full-month calendar behind it, making it appear as though the current day is highlighted. The end result is seen in the image at right.
There's one caveat: GeekTool does weird things to the spaces if you center the single-day calendar output, so you'll need to make sure that at least that Geeklet is left-aligned. The full-month calendar can still be center-aligned, though.
In OS X 10.5, to view available disk space on your drive (or partition), you had to either open Activity Monitor, or open an Inspector/Get Info window for your hard drive.
In OS X 10.6, you can use Quick Look instead. Select the drive in the Finder, then press the Space Bar. In the Quick Look window, you'll see the drive's capacity and unused space details.
In Mac OS X 10.5, if you select more than 10 files and then choose File » Get Info from the contextual menu, Finder automatically opens the Inspector, showing a summary of all 10 files.
In Snow Leopard, though, Finder opens the Get Info window for each item, quickly filling the entire screen on smaller displays. If you want the summary style Get Info window instead, hold down the Control key before pressing Command-I; this changes the Get Info menu item to Get Summary Info, and you'll see one summary Get Info window for your selected files.
[robg adds: Control-Command-I works in 10.4 and 10.5, too. I marked this one Snow Leopard only, though, because it's related to Snow Leopard's handling of move than 10 selected items with multiple Get Info windows. A brief history of Get Info and multiple selections:
10.3: Get Info displays a summary window for all selected files.
10.4 and 10.5: Get Info displays individual windows for each selection up to 10 total, unless you use Control-Command-I to view the summary window. With more than 10 files selected, you always get the summary window. The only way (that I know of) to see more than 10 individual Get Info windows is to select files in batches smaller than 10, then do Command-I on each batch.
10.6: Get Info displays individual windows for each selection, regardless of how many files are displayed. Use Control-Command-I if you want the summary window, regardless of the number of files in the selection.
The Snow Leopard implementation seems like it's the most flexible, but it does require some training time to remember to hold down Control and Command when you know you want the summary window.]
In 10.5, you could bring up the Get Info window (or Inspector) for a file you downloaded with Safari, and view the URL from where you downloaded it (in the More Info section), which was useful. However, you could not copy or select the URL, and had to retype it to visit that address.
Now, in 10.6 you can now drag-select across the URL field, making it easy to copy and paste -- or you can Control-click on the selection and select Open URL from the contextual menu.