If you’re reading these Friday blog entries, chances are you’re a tweaker—you like to explore your system, make changes to things, and see what you can do beneath the hood. That’s a good thing, as it’s a great way to learn about your system. But it’s also a great way to break it, if you do something wrong. So we try to always remind you to make a backup before making any changes, so that you can easily undo something you might have done.
Today’s tip is a quick way to backup widgets you want to modify. Typically, you’d do this by just dragging a copy of the widget from the top-level /Library/Widgets folder to another location. If your altered widget failed to work, you could just replace the modified one with your backup. But thanks to the way OS X’s hierarchy of folders works, there’s a much simpler method.
Instead of copying the widget to your Desktop or other safe location, copy it to your user folder /Library/Widgets. Note that you may have to create this folder first if you haven’t installed any third-party widgets. Now, instead of changing the original, alter the copy in your user’s folder. When you’re done, launch Dashboard, and you’ll find that when activate the widget, you’ll see the customized local copy, and not the system-wide version. It remains on the disk in its original unaltered state.
This works because when Dashboard goes looking for widgets to load, it looks in your personal Widgets folder first and then proceeds up to the top-level Widgets folder. If you have duplicate widgets, OS X ignores the ones in the top-level folder since the user folder versions are already up and running.
This is a great way to safely modify widgets, put the modified versions to use right away, and yet leave the Apple-provided widgets in their original unaltered forms. Slick!