From 02606e5ab3c06a3f5b403fd007fa3214ced0fe4d Mon Sep 17 00:00:00 2001 From: Hannes Date: Tue, 17 Feb 2026 15:29:06 +0100 Subject: [PATCH] tray --- modules/bar/widgets/Tray.qml | 45 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/modules/bar/widgets/Tray.qml b/modules/bar/widgets/Tray.qml index 4974806..dc16fe1 100644 --- a/modules/bar/widgets/Tray.qml +++ b/modules/bar/widgets/Tray.qml @@ -2,6 +2,7 @@ import QtQuick import Quickshell import Quickshell.Hyprland import Quickshell.Services.SystemTray +import Quickshell.Io import "../../../colors" Row { // Workspace Row @@ -19,14 +20,12 @@ Row { // Workspace Row color: "transparent" border.width: 2 - // Text { - // id: iconName - // text: modelData.Name - // anchors.centerIn: parent - // color: "white" - // font.pixelSize: 18 - // font.family: "Inter, sans-serif" - // } + Process { + id: steamRunner + command: ["steam", "steam://open/main"] + running: false + } + MouseArea { id: workspaceButton hoverEnabled: true @@ -40,25 +39,27 @@ Row { // Workspace Row modelData.activate() console.log('Activcate function of ', modelData.title) } - break - case Qt.MiddleButton: - modelData.secondaryActivate?.() - console.log('Activcate secondary function of ', modelData.title) - break - case Qt.RightButton: - if (modelData.hasMenu) { - console.log('Activcate menu of ', modelData.title) - menuAnchor.open(modelData.menu) + if (modelData.title.trim()==="Steam") { + steamRunner.startDetached() } break + case Qt.MiddleButton: + modelData.secondaryActivate() + break + // case Qt.RightButton: + // if (modelData.hasMenu) { + // console.log('Activcate menu of ', modelData.title) + // menuAnchor.open() + // } + // break } } - QsMenuAnchor { - id: menuAnchor - menu: modelData.menu - anchor.window: trayItem - } + // QsMenuAnchor { + // id: menuAnchor + // menu: modelData.menu + // anchor.window: menuHost + // } Rectangle { anchors.fill: parent