Tailscale Widget Plugin for Dank Bar #1
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
Users of Dank Material Shell want a lightweight, native-feeling status widget on the Dank Bar that shows Tailscale connectivity at a glance and provides quick controls (toggle connection, switch exit nodes, copy addresses) without leaving the shell or opening a separate GUI.
Solution
A DMS widget plugin (
tailscale) that renders a compact pill in the Dank Bar using the standardPluginComponent+DankIconpattern. The icon reflects connected/disconnected state. Right-click toggles Tailscale via the official CLI. Left-click opens aPopoutComponentflyout containing current IP, active exit node, and a peer list with one-click exit-node selection and copy-to-clipboard actions. All interaction is driven bytailscale status --json,tailscale up/down, andtailscale set --exit-node=....User Stories
Implementation Decisions
PluginComponentwidget (type: "widget").vpn_key/vpn_key_off) for connected/disconnected states; no custom assets required for v1.Process+StdioCollectorcalling thetailscaleCLI (no direct Tailscale API or daemon socket).Timerinside the QML component (interval exposed only via code, not user settings).popoutContent+PopoutComponentfollowing the DMS widget-with-popout pattern.Quickshell.execDetached(["sh","-c","echo -n '…' | wl-copy"])andToastService.tailscale set --exit-node=<hostname>(andtailscale set --exit-node=to clear).settings_read,settings_write,process.PluginSettingscomponent or persistent user preferences will be provided in v1.horizontalBarPill/verticalBarPillproperties.Testing Decisions
tailscale statusreports Running vs. Stopped, toggle commands are issued on right-click, flyout content matches parsed JSON, copy actions invoke the expected clipboard command.TailscaleWidget.qml.dms-tailscaleplugin in the DMS plugin library uses the sameProcess+StdioCollector+Timerpattern; tests should mirror that style.Out of Scope
Further Notes
The implementation deliberately stays close to the lightweight
dms-tailscalereference while adding the exit-node and copy-to-clipboard features requested. It follows the exact DMS plugin development patterns documented at https://danklinux.com/docs/dankmaterialshell/plugin-development (v1.4).HITL Verification Complete
All 8 user stories verified on a real tailnet. Screenshot attached:
Verification Checklist
Bug Fixed During HITL
Test Results
All 10 unit tests pass (node --test test/lib.test.js).