Repository navigation
feat(wifi): keep showing Wi-Fi while a VPN is connected - #1207
JanDeDobbeleer wants to merge 1 commit into
Conversation
A connected VPN becomes the internet connection profile, so the widget showed
the Ethernet icon and the worker could report the VPN as the Wi-Fi name. The
worker now classifies the online profiles once per poll, looks up the Wi-Fi or
Ethernet connection under a VPN, and the widget no longer calls WinRT on the UI
thread.
Adds {vpn_icon} and {vpn_name} label placeholders and a vpn_icon option. Label
parts that format to nothing are hidden, so a VPN badge only shows while a VPN
is connected.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39cb3d0 to
d4a55ec
Compare
|
@JanDeDobbeleer Thanks for the PR, but let's wait a little bit because we've started working on moving YASB to Qt Quick, which will change pretty much everything. All the old code, documentation, and so on will be replaced. Once we fully switch over, there won't be the same limitations on how you can create widgets, plugins, bars, and more. Here are just a few examples of where we are now. 2026-10-28.01-11-26_2.mp4And here's an example of how you can group everything inside your own QML file, with three widgets and services all running under one roof. 2026-10-28.04-04-08.mp4And there's also a lot of other cool stuff already committed or planned. You'll be able to create your own widgets without needing to open a pull request, because your custom widgets will live directly inside your config folder. So, with all that in mind, let's keep this PR open for now. But to avoid feature requests and having to rewrite services, let's wait a little until we finish everything on our side. |
|
Cool! Thanks for sharing, I'll keep my own build in the meantime in that case. |
Problem
When a VPN is connected (tested with ProtonVPN/WireGuard), Windows makes the VPN adapter the internet connection profile. The Wi-Fi widget treats every non-WLAN internet profile as Ethernet, so it switches to the Ethernet icon while the machine is still on Wi-Fi. The worker also took the name from the first profile with internet access, which is the VPN, so
{wifi_name}showedProtonVPN.Fix
classify_connectionsfunction. VPN adapters are recognised by IANA interface type (23 PPP, 53 proprietary virtual, 131 tunnel). Under a VPN, the Wi-Fi or Ethernet profile carrying it decides the icon, name and signal bars.WiFiInfogainsethernetandvpn_name, so the widget no longer calls WinRT on the UI thread to decide between Wi-Fi and Ethernet.{vpn_icon}and{vpn_name}placeholders and avpn_iconoption. Label parts that format to nothing are hidden, so a VPN badge only takes space while a VPN is connected:Testing
tests/widgets/test_wifi.py: VPN over Wi-Fi, VPN over Ethernet, Wi-Fi, Ethernet preferred over Wi-Fi, offline, and the badge showing only while a VPN is connected.ruff check/ruff formatclean, pyright clean on the changed files, full test suite passes.