diff --git a/dotfiles/.config/quickshell/modules/bar/PinnedTray.qml b/dotfiles/.config/quickshell/modules/bar/PinnedTray.qml index 335d6ff..ff44f62 100644 --- a/dotfiles/.config/quickshell/modules/bar/PinnedTray.qml +++ b/dotfiles/.config/quickshell/modules/bar/PinnedTray.qml @@ -16,12 +16,14 @@ RowLayout { { name: "Bitwarden", icon: Qt.resolvedUrl("../../assets/bitwarden.png"), + binary: "bitwarden", launch: ["bitwarden"], + secondary: ["pkill", "bitwarden"] }, { name: "Sunshine", - icon: Qt.resolvedUrl("../../assets/sunshine.svg"), + binary: "sunshine", launch: ["systemctl", "--user", "start", "app-dev.lizardbyte.app.Sunshine.service"], secondary: ["xdg-open", "https://xol.twhomelab.local:47990"], }, @@ -44,10 +46,18 @@ RowLayout { required property var modelData readonly property var trayItem: root.findTrayItem(modelData.name) readonly property bool running: trayItem !== null + property bool installed: false // Application installation check + visible: slot.installed implicitWidth: Appearance.iconSize implicitHeight: Appearance.iconSize + Process { + running: true + command: ["which", slot.modelData.binary] + onExited: (exitCode) => slot.installed = exitCode === 0 + } + IconImage { anchors.fill: parent source: slot.running