diff --git a/bar/StatusBar.qml b/bar/StatusBar.qml index 6e8f56f..765bf84 100644 --- a/bar/StatusBar.qml +++ b/bar/StatusBar.qml @@ -45,10 +45,21 @@ PanelWindow { Pill { id: music - anchors.right: parent.right + anchors.right: tray.left anchors.rightMargin: 10 Music { player: Mpris.players.values.find(e => e.identity == "Spotify") } } + + // Pill { + // id: tray + // + // anchors.right: parent.right + // anchors.rightMargin: 10 + // + // SystemTray { + // + // } + // } } diff --git a/bar/SystemTray.qml b/bar/SystemTray.qml new file mode 100644 index 0000000..7e21aa2 --- /dev/null +++ b/bar/SystemTray.qml @@ -0,0 +1,31 @@ +import QtQuick +import QtQuick.Layouts +import Quickshell +import Quickshell.Services.SystemTray +import Quickshell.Widgets + +RowLayout { + Repeater { + model: ScriptModel { + values: SystemTray.items.values.filter(e => e.status != Status.Passive) + } + + IconImage { + required property SystemTrayItem modelData + + width: 25 + height: 15 + + source: modelData.icon + + MouseArea { + anchors.fill: parent + onClicked: (event) => { + console.log( JSON.stringify(parent.modelData)) + // parent.modelData.display(parent,0,0) + // menu.open() + } + } + } + } +}