From 049266271a2b4c798a6c1601c11107afe592decb Mon Sep 17 00:00:00 2001 From: Thomas Kroll <99196436+tkroll-ionos@users.noreply.github.com> Date: Thu, 9 Apr 2026 16:49:15 +0200 Subject: [PATCH] fix(system-update): popout first-click and AUR package listing (#2183) * fix(system-update): open popout on first click The SystemUpdate widget required two clicks to open its popout. On the first click, the LazyLoader was activated but popoutTarget (bound to the loader's item) was still null in the MouseArea handler, so setTriggerPosition was never called. The popout's open() then returned early because screen was unset. Restructure the onClicked handler to call setTriggerPosition directly on the loaded item (matching the pattern used by Clock, Clipboard, and other bar widgets) and use PopoutManager.requestPopout() instead of toggle() for consistent popout management. Co-Authored-By: Claude Opus 4.6 (1M context) * fix(system-update): include AUR packages in update list When paru or yay is the package manager, the update list only showed official repo packages (via checkupdates or -Qu) while the upgrade command (paru/yay -Syu) also processes AUR packages. This mismatch meant AUR updates appeared as a surprise during the upgrade. Combine the repo update listing with the AUR helper's -Qua flag so both official and AUR packages are shown in the popout before the user triggers the upgrade. The output format is identical for both sources, so the existing parser works unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 (1M context) --- quickshell/Modules/DankBar/DankBarContent.qml | 15 ++++++++++++--- quickshell/Services/SystemUpdateService.qml | 5 ++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/quickshell/Modules/DankBar/DankBarContent.qml b/quickshell/Modules/DankBar/DankBarContent.qml index a2e88862..0c977bf7 100644 --- a/quickshell/Modules/DankBar/DankBarContent.qml +++ b/quickshell/Modules/DankBar/DankBarContent.qml @@ -1438,12 +1438,21 @@ Item { parentScreen: barWindow.screen onClicked: { systemUpdateLoader.active = true; + if (!systemUpdateLoader.item) + return; + const popout = systemUpdateLoader.item; const effectiveBarConfig = topBarContent.barConfig; const barPosition = barWindow.axis?.edge === "left" ? 2 : (barWindow.axis?.edge === "right" ? 3 : (barWindow.axis?.edge === "top" ? 0 : 1)); - if (systemUpdateLoader.item && systemUpdateLoader.item.setBarContext) { - systemUpdateLoader.item.setBarContext(barPosition, effectiveBarConfig?.bottomGap ?? 0); + if (popout.setBarContext) { + popout.setBarContext(barPosition, effectiveBarConfig?.bottomGap ?? 0); } - systemUpdateLoader.item?.toggle(); + if (popout.setTriggerPosition) { + const globalPos = visualContent.mapToItem(null, 0, 0); + const currentScreen = parentScreen || Screen; + const pos = SettingsData.getPopupTriggerPosition(globalPos, currentScreen, barWindow.effectiveBarThickness, visualWidth, effectiveBarConfig?.spacing ?? 4, barPosition, effectiveBarConfig); + popout.setTriggerPosition(pos.x, pos.y, pos.width, section, currentScreen, barPosition, barWindow.effectiveBarThickness, effectiveBarConfig?.spacing ?? 4, effectiveBarConfig); + } + PopoutManager.requestPopout(popout, undefined, "systemUpdate"); } } } diff --git a/quickshell/Services/SystemUpdateService.qml b/quickshell/Services/SystemUpdateService.qml index 2416d567..53ca7ade 100644 --- a/quickshell/Services/SystemUpdateService.qml +++ b/quickshell/Services/SystemUpdateService.qml @@ -231,7 +231,10 @@ Singleton { return; isChecking = true; hasError = false; - if (updChecker.length > 0) { + if (pkgManager === "paru" || pkgManager === "yay") { + const repoCmd = updChecker.length > 0 ? updChecker : `${pkgManager} -Qu`; + updateChecker.command = ["sh", "-c", `(${repoCmd} 2>/dev/null; ${pkgManager} -Qua 2>/dev/null) || true`]; + } else if (updChecker.length > 0) { updateChecker.command = [updChecker].concat(updateCheckerParams[updChecker].listUpdatesSettings.params); } else { updateChecker.command = [pkgManager].concat(packageManagerParams[pkgManager].listUpdatesSettings.params);