Skip to content

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

Open
avesst wants to merge 1 commit into
AvengeMedia:masterfrom
avesst:feat/launcher-vpn-toggle
Open

launcher: add vpn connections as a search provider#3391
avesst wants to merge 1 commit into
AvengeMedia: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 <noreply@anthropic.com>
@avesst
avesst marked this pull request as ready for review September 10, 2026 19:25
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

1 participant