Skip to content

launcher: add vpn connections as a search provider - #3391

Merged
bbedward merged 4 commits into
duxlabs-dev:masterfrom
avesst:feat/launcher-vpn-toggle
Sep 15, 2026
Merged

bbedward merged 4 commits into
duxlabs-dev:masterfrom
avesst:feat/launcher-vpn-toggle

Conversation

@avesst

@avesst avesst commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a dms_vpn built-in launcher plugin that indexes every configured VPN profile and toggles it on enter, so a VPN can be brought up or down without leaving the keyboard.

Rows reflect connection state: connected profiles get a lock icon and a Connected badge, in-progress ones show Connecting..., the rest get a crossed-out key. The subtitle is the connection type (WireGuard, OpenVPN, and so on), which is also matched when searching.

Profiles come from DMSNetworkService.profiles, which is populated from the network state the shell already fetches at startup. No new timer, process, subscription or request is introduced, and nothing runs while the launcher is closed. The provider returns nothing when the backend is not NetworkManager.

Toggling reuses the existing toggleVpn, the same call the Control Center VPN list uses, so credential prompts and error toasts behave identically.

Two notes on the design:

  • It ships without a trigger. A matched trigger prefix replaces the entire result set, so claiming vpn would have hidden every application whenever someone typed it to find their VPN client, and would have produced an empty launcher on iwd or wpa_supplicant. Matching on a vpn keyword instead keeps applications and profiles in one list. A trigger can still be set per user in Settings.
  • Connected state is read from the same predicate the toggle branches on. Core reports activating and deactivating in the active connection list, so testing only for activated would have shown a connection still coming up as disconnected while enter tore it down.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Closes #3352

Screenshots / video

Disconnected state:

1789068266209977869

Connected state:

1789068280152218439

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean N/A — no Go in this PR, QML only
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document any new behaviors: https://github.com/AvengeMedia/DankLinux-Docs N/A

Adds a dms_vpn built-in launcher plugin that lists every configured VPN
profile and toggles it on enter. Connected rows show a lock icon and a
Connected badge, in-progress rows show Connecting, everything else shows
a crossed-out key.

Profiles come from the network state the shell already fetches at
startup, so there is no new timer, process or request. The provider
returns nothing when the backend is not NetworkManager.

It ships without a trigger. A trigger prefix replaces the whole result
set, so claiming "vpn" would have hidden every application whenever
someone typed it to find their VPN client. Matching on the vpn keyword
instead keeps apps and profiles in the same list.

Co-Authored-By: Claude Opus 5 <[email protected]>
@avesst
avesst marked this pull request as ready for review September 10, 2026 19:25
@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Claude review

One finding; the rest of the provider holds up.

  • Empty-query path lists every VPN profile in the launcher home view, quickshell/Services/AppSearchService.qml:395

Checked: action round-trip through executeBuiltInLauncherItem and toggleVpn, vpnAvailable/profiles/isActiveVpnUuid/isVpnConnectingUuid against DMSNetworkService, badgeLabel support in ItemTransformers/ResultItem, dms_vpn registration in LauncherTab, and all four new strings (VPN, Connected, Connecting..., Disconnected) already existing in en.json. Model: claude-opus-5.

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@avesst

avesst commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Accepted Claude's proposed fix.

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Claude review

One follow-up finding from the guard added since the last review; the rest of the provider still holds up.

  • Empty-trigger guard also empties the plugin's Browse view, quickshell/Services/AppSearchService.qml:396

Checked: all 7 getBuiltInLauncherItems call sites against the new guard, plugin_browse activation path, action round-trip through executeBuiltInLauncherItem/toggleVpn, vpnAvailable/profiles/isActiveVpnUuid/isVpnConnectingUuid against DMSNetworkService (state fetched at startup, no new ref or timer), getVpnTypeFromProfile always returning a string, badgeLabel propagation via transformBuiltInLauncherItem, section priority 2.4 not colliding with settings (2.35) or clipboard (2.45), and all four strings reusing existing en.json terms with en.json untouched. Model: claude-opus-5.

avesst and others added 2 commits September 15, 2026 18:12
The empty query guard also applied when opening VPN from the Browse
section, so the plugin view came up empty. The plugin filter path now
opts out of the guard, while the home view still hides the profiles.

Co-Authored-By: Claude Opus 5 <[email protected]>
Keywords match by substring, so "connect" also matched "disconnect" and
listed connected profiles too. Picking one of those disconnected it.

Co-Authored-By: Claude Opus 5 <[email protected]>
@avesst

avesst commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Pushed two follow-ups:

  • e2fd9d0 Browsing the VPN plugin showed an empty list after the previous fix. It now lists all profiles again, and the home view still hides them.
  • c51cd45 Searching "connect" also matched connected profiles, since "disconnect" contains "connect". Dropped those keywords.

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.

Checked: the two follow-up commits (e2fd9d02 empty-query opt-out, c51cd45c keyword removal) against all 7 getBuiltInLauncherItems call sites — home view (_performPluginPhase no-query branch) and the plugins-mode empty-trigger branch still pass no allowEmptyQuery, so profiles stay hidden without a trigger, while the pluginFilter branch lists them for Browse; trigger path at Controller.qml:740 unaffected since a set trigger satisfies the guard. Also re-checked the action round-trip (vpn:<uuid> -> executeItem type plugin -> executeBuiltInLauncherItem -> toggleVpn, which no-ops while vpnIsBusy), credential prompts going through the global WifiPasswordModal rather than the Control Center, vpnAvailable/profiles/isActiveVpnUuid/isVpnConnectingUuid on DMSNetworkService (state fetched once at startup, no new ref/timer/process), getVpnTypeFromProfile always returning a string so the keyword filter cannot throw, badgeLabel propagation through transformBuiltInLauncherItem, dms_vpn gated by the plugin enabled/allow-without-trigger settings like the other built-ins, section priority 2.4 not colliding, and all four strings (VPN, Connected, Connecting..., Disconnected) already in en.json with context matching the term, catalogs untouched. Model: claude-opus-5.

@bbedward
bbedward merged commit 447997b into duxlabs-dev:master Sep 15, 2026
2 checks passed
@avesst
avesst deleted the feat/launcher-vpn-toggle branch September 15, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toggle VPN from Launcher/Spotlight

2 participants