Dashboard

From Applepedia

(Redirected from Widget)
Jump to: navigation, search
Dashboard
Image:Dashboard_Icon.png
Min/Max OS Support 10.4
License Apple
Category System Software
Installer Installed with OS X
PowerPC Traitor {{{universal}}}
Website Apple's page
A screen full of Dashboard widgets.
Enlarge
A screen full of Dashboard widgets.

Dashboard is Tiger's implementation of desktop "widgets" -- small objects that sit on their own desktop layer (toggled by pressing F12) and perform simple functions. Widgets that come standard with Tiger include a calculator, a current-weather widget, and a clock widget. Before Tiger, Konfabulator would be desktop widgeteer of choice.

Another way of looking at it is that this is a comeback for Desk accessories.

Contents

Persistent Dashboard Widgets

There is a way to make Dashboard widgets stay on the screen at all times, without having to be in Dashboard mode, much the same way Konfabulator works. It is a hidden feature in Dashboard intended for developers working on a new widget but it works great for anyone who wants this feature.

  1. Type defaults write com.apple.dashboard devmode YES into the Terminal
  2. Logout and log back in
  3. Go into Dashboard mode and click and hold on the widget that you want to stay on the screen
  4. Press F12 to get out of Dashboard mode
  5. Profit

To place a Dashboard widget back into the normal Dashboard mode click and hold on the widget and press F12.

Making Dashboard widgets

Widgets, at their most basic, consist of an HTML file, a background image, and an Info.plist file. Any widget that requires user interaction will also need a JavaScript file to control the widget's behavior. A widget's appearance can also be customized through CSS.

JavaScript written for a widget has access to a custom widget object, which is where the bulk of Dashboard's power lies. The widget object can open other applications, run shell commands, retrieve URLs, and modify the size of a widget, among other things.

Dashboard uses several controversial proprietary extensions to HTML:

  • A canvas tag (for rendering of 2-D objects, like the hands of the clock widget.
  • A composite attribute (for img tags) that controls how an image is displayed.
  • A new search type (<input type="search">) that renders an Aqua-like search box.

Disabling Dashboard

Disabling dashboard is a simple procedure:

  1. Copy and paste defaults write com.apple.dashboard mcx-disabled -boolean YES; killall Dock into Terminal

Dashboard is now disabled

Re-enabling is just as simple:

  1. Copy and paste defaults write com.apple.dashboard mcx-disabled -boolean NO; killall Dock into Terminal

Dashboard is now enabled

Technical Information

The Dashboard's rendering area and the parent process for widgets' DashboardClient processes is the Dock. If you kill the dock, all your widgets will have to restart as if you had just logged in. Since the Dashboard's appear and dismiss effects are done similarly to Exposé, you can use shift to slow them down.

External Links

Personal tools