From 38df0301f2cf277e82fd598db29ba81a76322603 Mon Sep 17 00:00:00 2001 From: thomas Date: Sat, 5 Sep 2026 23:10:26 +0100 Subject: [PATCH] Feature: Icon does not appear unless installed --- .../.config/quickshell/modules/bar/PinnedTray.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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