added systemd tray
This commit is contained in:
@@ -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 {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
31
bar/SystemTray.qml
Normal file
31
bar/SystemTray.qml
Normal file
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user