forked from Shinonome/dots-hyprland
wbar: make update button update when clicked
This commit is contained in:
@@ -147,6 +147,7 @@ Singleton {
|
|||||||
property string networkEthernet: "kcmshell6 kcm_networkmanagement"
|
property string networkEthernet: "kcmshell6 kcm_networkmanagement"
|
||||||
property string taskManager: "plasma-systemmonitor --page-name Processes"
|
property string taskManager: "plasma-systemmonitor --page-name Processes"
|
||||||
property string terminal: "kitty -1" // This is only for shell actions
|
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"`
|
property string volumeMixer: `~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
import qs
|
import qs
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
@@ -8,8 +9,12 @@ BarButton {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
visible: Updates.available && Updates.updateAdvised
|
visible: Updates.available && Updates.updateAdvised
|
||||||
|
|
||||||
padding: 4
|
padding: 4
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
Quickshell.execDetached(["bash", "-c", Config.options.apps.update]);
|
||||||
|
}
|
||||||
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
implicitWidth: iconContent.implicitWidth
|
implicitWidth: iconContent.implicitWidth
|
||||||
|
|||||||
Reference in New Issue
Block a user