DesktopWidget

Almost all Mac users know what a Dashboard widget is.
It’s a simple and small HTML/WebKit based application bundled with some optional code plugins. That’s all in theory…
DesktopWidget is a light and powerful Dashboard extension specially designed for either active widget users and developers.
You can organize your widget collection and simulate almost every widget. Extend your possibilities with our simple but powerful tool.

DesktopWidget is not a replacement for the Dashboard of course. In the Dashboard you can leave tons of widgets you don’t need every moment.

But do you ever wanted to have important informers like a small semi-transparent world clock, king sized weather, important stickies and currency rate widgets pined right to your desktop or floating above all windows and totally ignore mouse at the same time?

No problem at all – pin your widgets to the Desktop wallpaper, adjust transparency and zoom them with fun. Two-way scaling feature (transform & zoom) is just for you. It is experimental but useful at least for the following purposes – zoomed-out mode to save screen space, zoomed-in mode for presentation mode or for people with disabilities.
With DesktopWidget all your widgets will receive second breath, really!

Leave main widget collection on the built-in OSX dashboard, and use subset of them as desktop widgets. Show and hide all desktop widgets with a single hotkey!

You’ll receive total control over your widget collection behavior.
It’s not a joke! Give a chance to DesktopWidget and try it right now.

Check its security sandbox options while developing or before launching 3rd party widgets to try.

Furthermore, you can convert a widget to a standalone application, so you can run it anytime right via Finder or from your Dock
(note: there is only one limitation – DesktopWidget.app contains required runtime, so it must be installed at the same Mac).

If you are developer – you can visually check control regions and java script errors while developing, inspect any parts of your widget on the fly.

The missed Sync – yeah, it’s true, with DesktopWidget you can sync either your widgets and their preferences between all your Macs via Dropbox.

With a simple custom CSS & HTML/JS, you can adjust content and styles, and clip required area of a widget, on the fly, even without touching widget content at all.

Do you really think that’s all?

There is one more thing…

Widget automatization with scripting!

Now you can interact with simulated widgets right from your projects written in any language (Objective-C, AppleScript, Shell, etc).
Discover your new possibilities with DesktopWidget.

Now check the Great Features summary:

  • Mountain Lion compatible
  • Simulate dashboard widgets with 99.9% accuracy
  • All widgets can run outside of dashboard right where you want
  • Organizer with grouping (by locations via folders), locations renaming
  • Menubar mode with the amazing popover
  • Loading and running Widgets from any place (e.g. personal folder, sharing with Dropbox)
  • Developer mode (Web Inspector + Control Regions Visualizer)
  • You can create widgets by cloning any existing widget’s configuration
  • Transparency control (per widget)
  • Zoom control to scale Widget (experimental)
  • Compilation of a widget to a standalone application
  • Mouse indifference option
  • Widget window level control (Normal, Desktop or Topmost levels)
  • Appearance control (effects)
  • Sync your widgets and preferences between your Macs (via Dropbox)
  • Advanced security control: define your own permissions for every widget before launching
  • Tweaks (built-in + custom CSS, HTML and JS injections on the fly, per widget)
  • Widget automatization

 

DesktopWidget Tips

You can create instance of a widget via simple Drag&Drop from the widget list, via double click to the widget name or by pressing the Enter key.

You can do the same with the menubar popover.

You have to select appropriate display mode option in the Preferences to enable the menubar popover.

To destroy a widget

  • You can simple close widgets while Widget List window has focus
  • Hold Ctrl key while hovering mouse on widget, then click close button
  • Use DesktopWidget main menu – Window – My Widgets – click to a widget while holding Ctrl key
  • Click to a widget and press CMD-Ctrl-Q
  • To close all widgets press CMD-OPT-Shift-U

We changed Dashboard OPT to Ctrl due to system issues – the OSX actively uses clicks with OPT to hiding applications, to prevent collisions we changed this behavior.
Please note, widgets with Desktop level don’t react to mouse at all (except time while you are holding Ctrl key), you have to return their level to Normal or Above all to close them, or just use Window – My Widgets way. See also tooltips with coordinates.

To temporary hide a widget – click to widget window, then press CMD-H. Or use File menu – Hide (CMD-OPT-U).
You can show hidden widgets back from main menu – Window – My Widgets, or Dock contextual menu.
You can use hotkey to hide/show all widgets.

You can temporary unload all widgets via CMD-U (or File menu ‘Unload’ item). You can load widgets back via CMD-L.
All widgets will load automatically on program run.
All widgets will unload automatically on program quit, but only when ‘Close my widgets on quit’ option is active.

Add custom location to the list. You can also add any widget to the root of the list (but not as child nodes). You can rename root entries, including either location or partial widget.

List has two modes – locations and merged view, so you can customize view from the main menu.
Merged mode shows widgets only without duplicates. Just keep in mind one simple rule – widget from location bellow in the list will have priority and will override previous instance. Menubar popover always works in merged mode.

To adjust widget preferences select a widget in the list, then click the preferences button at the bottom of the list, or simple use contextual menu in the list. You can do the same via standard Preferences menu item while holding OPT key (CMD-OPT-,), or by changing selection in the list while Preferences panel is open.

Please note

  • Permissions will be applied after next widget load
  • Scaling, CSS/HTML preferences will apply for new widget instances only, and will not affect already existing widgets
  • Opacity, Mouse transparency and Window level will be applied permanently for all widget instances of the same kind

To access Web-inspector, select a widget instance then press CMD-OPT-C. You can show widget instance client menu and Dock icon via CMD-OPT-Ctrl-C.

Custom CSS

Some examples.

Clipping for AlfaBank widget:

body { position: absolute; clip: rect(156px 210px 224px 15px); }

Rotate for Stocks:

body
{
 -webkit-transform-origin: 100px 270px;
 -webkit-transform: rotate(15deg) translateY(30px);
}

<script>
 widget.resizeAndMoveTo(0,0,window.innerWidth+60,window.innerHeight+50);
</script>

Scripting

To query widgets you have to send simple JavaScript request via dwcomm and process an answer.
You can use dwcomm calls with almost any language.

./dwcomm
com.apple.widget.dictionary "document.getElementById('searchField').value = 'slim';
searchFieldKeyPressed({'keyCode':13}); searchFieldSearched(null);"

./dwcomm
com.apple.widget.dictionary "document.getElementById('definitionViewDiv').innerHTML" 1

./dwcomm
com.apple.widget.dictionary "document.getElementById('searchField').value = '';
searchFieldKeyPressed({'keyCode':27}); searchFieldSearched(null);"

All dwcomm calls must be present as single line.
You can find dwcomm inside DesktopWidget.app/Contents/Resources folder.

Usage: ./dwcomm <identifier|bundleID> <command> [<timeout>]

Error codes:

1 - invalid args count
2 - empty widget identifier/bundleID or command
3 - can't convert identifier/bundleID or command to UTF-8 encoding
4 - empty widget identifier/bundleID or command (after args conv.)
5 - exit by timeout

Timeout in seconds, 0 to disable waiting for an answer
(and even disable requesting it at all).
Default timeout is 0, so it means no wait and no answer is required.

Syncing

Configure a Dropbox folder for sharing between your Mac computers, then select it as preset base – you can do it via DesktopWidget main menu, menu item named DesktopWidget / Set Storage Folder…
Note: you may want to copy your existing configuration from~/Library/Application Support/DesktopWidget.