Files
DankMaterialShell/quickshell/PLUGINS/DashCounterExample
bbedward ccbf1d38ad widgets: bump qml-common, rename Dank* prefixed widgets to D, add
deprecation notice to plugin compatibility shims

- When qml-common became a thing, we left qs.Widgets shims in place for
  plugin compatibility
- It's annoying to need to maintain them when qml-common has any change,
  add a warning so we can safely deprecate them in the future
- One shot rename the common stuff to D to make it shorter and nicer to
  write
2026-10-05 16:47:19 -04:00
..
2026-09-17 16:51:27 -04:00
2026-09-17 16:51:27 -04:00

Counter Example

A composite plugin with three surfaces that share one counter:

  • components.dash (CounterTab.qml): a dash tab built on DashTabComponent. It hosts a DashWidgetGrid, so the dash Edit, Add widget, Reset and Clear All actions work on it. The Reset widget starts in the Add menu (enabled: false). + and - change the count.
  • components.dashCard (CounterCard.qml): an overview card built on DashCardComponent. Clicking it opens the tab. Left and Right change the count while it has focus.
  • components.widget (CounterWidget.qml): a bar pill. Left click toggles the dash on the counter tab, right click adds one. The same file works in a dock with no extra code.

The count is stored with setData("count", value) / savePluginData and read back through pluginData.count. Every surface reloads pluginData on pluginDataChanged, so they stay in sync.

Open the tab from a terminal with dms ipc call dash open plugin_dashCounterExample. If the tab is hidden from the tab bar it opens as a detail page with a back button.