DesktopWidget

Help

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.

You can use source code of dwcomm in your projects.

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.