Skip to content

Commit c7ffd2d

Browse files
committed
Auto-refresh active network details on Wi-Fi icon hover
1 parent d219e03 commit c7ffd2d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

modules/bar/BarContent.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,11 @@ Item { // Bar content region
942942

943943
HoverHandler {
944944
id: wifiHover
945+
onHoveredChanged: {
946+
if (hovered) {
947+
Network.refreshActiveNetworkDetails();
948+
}
949+
}
945950
}
946951

947952
StyledToolTip {

services/Network.qml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ Singleton {
7373
if (active) disconnectProc.exec(["nmcli", "connection", "down", active.ssid]);
7474
}
7575

76+
function refreshActiveNetworkDetails(): void {
77+
if (!getNetworks.running) {
78+
getNetworks.running = true;
79+
}
80+
}
81+
7682
function openPublicWifiPortal() {
7783
Quickshell.execDetached(["xdg-open", "https://nmcheck.gnome.org/"]) // From some StackExchange thread, seems to work
7884
}

0 commit comments

Comments
 (0)