Here’s a quick hack for GeekTool users who use Time Machine and don’t have enough stuff on their Desktop. That’s everybody, right?
I wanted a better indicator of whether Time Machine was running and how much it had left to back up. I built a little Geeklet that creates a circular progress indicator on my Desktop. You can do the same using the script below along with the ARC font (it’s hard to find these days for some reason, so I’m hosting a copy here).
The ARC font is basically a partial circle that gets more complete as you move through the alphabet, lowercase first, then uppercase. By the time you get to “Z,” it’s a full circle. Because it’s a font, it works at any size and with any foreground color. For this Geeklet, I’m liking just having a little 50-pixel translucent white circle on a dark area of my desktop.
- Save the script below to a file (e.g. “~/scripts/tmstatus.rb”)
- Make it executable (
chmod a+x ~/scripts/tmstatus.rb)
- Add a shell Geeklet with the path to the script as the command
- Install the ARC font (unzip and double click the font file)
- Set the Geeklet’s font to ARCFont
- Change the size of the circle by adjusting the font size in the font panel
- Pick a foreground color/opacity by clicking the green color well in the font palette
You should be good to go.
Update: I’ve fixed the code to recognize the 100% complete state.
If you want a full-circle background to make it more of a progress meter, create a second shell Geeklet and set it to the ARC font at the same size as the first one. Turn “Override text” on and type “Y” in the field. Set the color to a darker, more transparent version of the main Geeklet’s foreground color. Use the X/Y position numbers to position it exactly over the main Geeklet and then right click and “send to back”.
The script uses
tmutil status (man page) and parses out the raw percentage complete, converting it to an integer between 1 and 50, which it then maps to the alphabetical character that the font uses. If there’s no Time Machine backup running, it disappears. When you’re testing, be sure to “Back up now” from the Time Machine menu bar item so you have something to work with.
The ARC font is a brilliant and flexible tool for GeekTool (and NerdTool) users. The basic concept of this script can be applied to anything that offers a status report within a known range. I use the same style for CPU usage meters. Let me know what you come up with!
Also, don’t forget to grab Marked 2 for 20% off before the 26th. Use the coupon code