From 4e07aa52bab875013cc315963f1842f4585d31b8 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 15 Nov 2025 22:03:34 +0100 Subject: [PATCH] wbar: make update button update when clicked --- dots/.config/quickshell/ii/modules/common/Config.qml | 1 + .../quickshell/ii/modules/waffle/bar/UpdatesButton.qml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index c9330d78e..c71b77cc9 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -147,6 +147,7 @@ Singleton { property string networkEthernet: "kcmshell6 kcm_networkmanagement" property string taskManager: "plasma-systemmonitor --page-name Processes" property string terminal: "kitty -1" // This is only for shell actions + property string update: "kitty -1 --hold=yes fish -i -c 'sudo pacman -Syu'" property string volumeMixer: `~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol"` } diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/UpdatesButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/UpdatesButton.qml index ac6118e8b..232f025c3 100644 --- a/dots/.config/quickshell/ii/modules/waffle/bar/UpdatesButton.qml +++ b/dots/.config/quickshell/ii/modules/waffle/bar/UpdatesButton.qml @@ -1,4 +1,5 @@ import QtQuick +import Quickshell import qs import qs.services import qs.modules.common @@ -8,8 +9,12 @@ BarButton { id: root visible: Updates.available && Updates.updateAdvised - padding: 4 + + onClicked: { + Quickshell.execDetached(["bash", "-c", Config.options.apps.update]); + } + contentItem: Item { anchors.centerIn: parent implicitWidth: iconContent.implicitWidth