Initial SysTray Implementation
This commit is contained in:
43
SysTrayWidget.qml
Normal file
43
SysTrayWidget.qml
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user