Initial SysTray Implementation

This commit is contained in:
Amaro Lopes
2025-09-22 03:02:20 -03:00
parent 65497edde2
commit f7479c1e58
3 changed files with 44 additions and 3 deletions

43
SysTrayWidget.qml Normal file
View File

@@ -0,0 +1,43 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import Quickshell.Services.SystemTray
import qs.Common
Item {
property var monitor: ""
MarginWrapperManager {
leftMargin: 5
}
Rectangle {
color:"blue"
implicitHeight: 50
implicitWidth: 50
// color: Theme.backgroudColor
radius: 25
RowLayout {
anchors{
horizontalCenter:parent.horizontalCenter
verticalCenter:parent.verticalCenter
}
Repeater {
model: SystemTray.items.values
delegate: IconImage {
required property var modelData
width:30; height:30
source: modelData.icon
}
}
}
MouseArea {
anchors.fill: parent
onClicked: {
console.log(SystemTray.items.values[0].icon)
}
}
}
}

View File

@@ -3,7 +3,6 @@ import QtQuick.Layouts
// Workspaces.qml // Workspaces.qml
import Quickshell import Quickshell
import Quickshell.Hyprland import Quickshell.Hyprland
import Quickshell.Wayland
import Quickshell.Widgets import Quickshell.Widgets
import qs.Common import qs.Common
import qs.Services import qs.Services
@@ -64,7 +63,6 @@ WrapperMouseArea {
color:"transparent" color:"transparent"
Rectangle { Rectangle {
Component.onCompleted: console.log("Completed Running!")
anchors.fill: parent anchors.fill: parent
color: Theme.backgroudColor color: Theme.backgroudColor
radius: 25 radius: 25

View File

@@ -5,7 +5,7 @@ ShellRoot {
panelMonitor: "DP-1" panelMonitor: "DP-1"
barComponentsLeft: [] barComponentsLeft: []
barComponentsCenter: ["Workspaces.qml"] barComponentsCenter: ["Workspaces.qml"]
barComponentsRight: ["AudioWidget.qml", "ClockWidget.qml"] barComponentsRight: ["AudioWidget.qml", "SysTrayWidget.qml", "ClockWidget.qml"]
} }
Bar { Bar {