Control D for DankMaterialShell
August 24, 2026 ยท View on GitHub
A DankMaterialShell plugin for monitoring and controlling one Control D endpoint from DankBar. A single background daemon owns credentials, polling, DNS checks, cached state, and writes, so multiple widget instances share the same confirmed state.
Preview
Features
- Shows the selected endpoint, active profile, protection state, API health, and local DNS status.
- Switches between existing Control D profiles without updating the UI until the server confirms the change.
- Turns protection on or soft-disables it while keeping DNS resolution active. The plugin never hard-disables an endpoint.
- Pauses the active profile for 5 minutes, 15 minutes, 1 hour, or 1 day, with a warning when that profile is shared by multiple endpoints.
- Checks the local
verify.controld.comroute independently from the account API, distinguishing a Control D misconfiguration from a general DNS or network failure. - Keeps sanitized cached state visible as stale when Control D is temporarily unavailable.
Requirements
- DankMaterialShell 1.5.0 or newer.
nslookupon thePATHinherited by DMS.- A Control D API token: Read access is sufficient for monitoring; Write access is required for controls.
- One credential provider:
secret-tooland a Freedesktop Secret Service provider, such as GNOME Keyring or KWallet; orCONTROL_D_API_TOKENin the environment inherited by DMS.
Installation
Clone the repository into the DMS plugin directory:
git clone https://github.com/clementpoiret/dms-controld \
~/.config/DankMaterialShell/plugins/controld
Then:
- Open DMS Settings โ Plugins.
- Scan for plugins and enable Control D.
- Add Control D to the DankBar widget list.
Setup
- Open the plugin settings and select a credential provider.
- For Secret Service, paste a token and choose Save and test. For Environment variable, make
CONTROL_D_API_TOKENavailable to the DMS process, restart DMS, and choose Test environment token. - Enter an organization ID only when the token needs to act on a child organization.
- Refresh the account, select the endpoint representing this machine, and choose Use this endpoint.
- Run the DNS check to confirm that the machine is using Control D locally.
Endpoint association is intentionally manual because the account API does not identify which endpoint represents the current Linux machine.
Usage
Click the DankBar pill to open the controls:
- Protection sends status
1when enabled and status2when disabled. No plugin action sends hard-disabled status3. - Profile assigns an existing profile to the selected endpoint.
- Profile pause writes a profile-wide expiry. Pausing a shared profile affects every endpoint using it.
- DNS routing runs an immediate local check without changing account configuration.
Mutations are serialized, never retried automatically, and displayed only after server read-back. A timed-out write triggers a refresh because the remote result may be uncertain.
Unconfirmed profile pauses
Some Control D responses accept disable_ttl writes without returning that field in later profile reads. Allow unconfirmed pauses is therefore off by default.
When enabled, the countdown is a local estimate. Reloading the plugin or restarting DMS can lose that estimate while the remote pause remains active. Reactivate profile remains available to send disable_ttl=0 manually.
Security and permissions
The API token is never saved in DMS settings, plugin state, shared variables, diagnostics, or process arguments. Secret Service storage sends the token to secret-tool store through standard input; the environment provider reads it into daemon memory and never persists it.
The plugin requests:
settings_readandsettings_writefor non-secret configuration and sanitized cached state;networkfor the fixedhttps://api.controld.comendpoint;processfornslookupand optionalsecret-toolaccess.
DMS plugins share the user's desktop process and are not isolated from one another. Install only trusted plugins when using a Write token.
Troubleshooting
The plugin cannot be enabled
Confirm that nslookup is available to DMS:
command -v nslookup
Secret Service is unavailable
Confirm that secret-tool is installed and a Secret Service provider is running:
command -v secret-tool
The environment provider remains available when Secret Service tooling is missing.
Controls are read-only
A Read token can load account state but cannot change protection, profiles, or pauses. Configure a dedicated Write token; write access is confirmed by the first legitimate change rather than a no-op test write.
DNS is healthy but a browser is not using Control D
The DNS probe checks the operating system route. Browser-specific DNS-over-HTTPS can bypass that route.
Control D's account API is unversioned. If required response fields change, the plugin fails closed instead of acting on partial data.
Development
Run the automated QML tests with Qt 6:
QML_XHR_ALLOW_FILE_READ=1 qmltestrunner -input tests -o -,txt
If Qt modules are outside the default search path, set QML2_IMPORT_PATH before running the command. The fixtures contain only sanitized example data.
Run the Secret Service process-lifecycle smoke test with Quickshell:
quickshell --path SecretStoreSmoke.qml
Reload an installed development copy with:
dms ipc call plugins reload controlD