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