feat: initial commit

This commit is contained in:
johannes committed 2026-07-26 11:45:12 +02:00
commit 4b3cd1d2b1
453 files changed
+52428

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Services.SystemTray
import qs.Theme
Item {
id: root
property var panelWindow: null
implicitWidth: trayRow.implicitWidth
implicitHeight: trayRow.implicitHeight
RowLayout {
id: trayRow
anchors.fill: parent
spacing: 4
Repeater {
model: SystemTray.items
delegate: Item {
Layout.preferredWidth: 24
Layout.preferredHeight: 24
Layout.alignment: Qt.AlignVCenter
Image {
id: icon
anchors.centerIn: parent
width: 20
height: 20
source: modelData.icon || ""
sourceSize: Qt.size(width, height)
smooth: true
mipmap: true
visible: !!modelData.icon
}
MouseArea {
id: ma
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onClicked: function(mouse) {
if (mouse.button === Qt.LeftButton)
modelData.activate()
else if (mouse.button === Qt.RightButton && root.panelWindow) {
var p = ma.mapToItem(root.panelWindow.contentItem, mouse.x, mouse.y)
modelData.display(root.panelWindow, p.x, p.y)
} else if (mouse.button === Qt.MiddleButton)
modelData.secondaryActivate()
}
onWheel: function(wheel) {
modelData.scroll(wheel.angleDelta.y, false)
}
}
}
}
}
}