tray
This commit is contained in:
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.SystemTray
|
||||
import Quickshell.Io
|
||||
import "../../../colors"
|
||||
|
||||
Row { // Workspace Row
|
||||
@@ -19,14 +20,12 @@ Row { // Workspace Row
|
||||
color: "transparent"
|
||||
border.width: 2
|
||||
|
||||
// Text {
|
||||
// id: iconName
|
||||
// text: modelData.Name
|
||||
// anchors.centerIn: parent
|
||||
// color: "white"
|
||||
// font.pixelSize: 18
|
||||
// font.family: "Inter, sans-serif"
|
||||
// }
|
||||
Process {
|
||||
id: steamRunner
|
||||
command: ["steam", "steam://open/main"]
|
||||
running: false
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: workspaceButton
|
||||
hoverEnabled: true
|
||||
@@ -40,25 +39,27 @@ Row { // Workspace Row
|
||||
modelData.activate()
|
||||
console.log('Activcate function of ', modelData.title)
|
||||
}
|
||||
break
|
||||
case Qt.MiddleButton:
|
||||
modelData.secondaryActivate?.()
|
||||
console.log('Activcate secondary function of ', modelData.title)
|
||||
break
|
||||
case Qt.RightButton:
|
||||
if (modelData.hasMenu) {
|
||||
console.log('Activcate menu of ', modelData.title)
|
||||
menuAnchor.open(modelData.menu)
|
||||
if (modelData.title.trim()==="Steam") {
|
||||
steamRunner.startDetached()
|
||||
}
|
||||
break
|
||||
case Qt.MiddleButton:
|
||||
modelData.secondaryActivate()
|
||||
break
|
||||
// case Qt.RightButton:
|
||||
// if (modelData.hasMenu) {
|
||||
// console.log('Activcate menu of ', modelData.title)
|
||||
// menuAnchor.open()
|
||||
// }
|
||||
// break
|
||||
}
|
||||
}
|
||||
|
||||
QsMenuAnchor {
|
||||
id: menuAnchor
|
||||
menu: modelData.menu
|
||||
anchor.window: trayItem
|
||||
}
|
||||
// QsMenuAnchor {
|
||||
// id: menuAnchor
|
||||
// menu: modelData.menu
|
||||
// anchor.window: menuHost
|
||||
// }
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
Reference in New Issue
Block a user