From e70ca4044947590d299463dc654a2e202418de65 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Mon, 20 Oct 2025 01:11:38 +0200 Subject: [PATCH] quickshell: fix: update ip alias at startup --- config/quickshell/Services/IpService.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/config/quickshell/Services/IpService.qml b/config/quickshell/Services/IpService.qml index 52cf565..d62c92e 100644 --- a/config/quickshell/Services/IpService.qml +++ b/config/quickshell/Services/IpService.qml @@ -82,9 +82,11 @@ Singleton { fetchTimer.start(); } - Component.onCompleted: { - } - onIpChanged: { + function updateAlias() { + if (!ip || ip === "N/A") { + alias = ""; + return ; + } alias = ""; for (let i = 0; i < aliasFileAdapter.aliases.length; i++) { let entry = aliasFileAdapter.aliases[i]; @@ -96,6 +98,13 @@ Singleton { } } + Component.onCompleted: () => { + return updateAlias(); + } + onIpChanged: () => { + return updateAlias(); + } + NetworkFetch { id: curl }