This commit is contained in:
Hannes
2026-06-14 00:49:24 +02:00
parent 5c91cec113
commit 6ab83915a1
35 changed files with 550 additions and 486 deletions
+8 -26
View File
@@ -1,48 +1,30 @@
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import "../../../colors"
import "../../../config"
MouseArea {
id: powerButton
width: Math.max(powerText.width + Config.spacing, bar.height)
width: Math.max(powerText.width + Config.spacing_fun(height), height)
height: bar.height
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
console.log("[PowerButton] Opening wlogout")
root.openWlogout()
}
Rectangle {
anchors.fill: parent
color: powerButton.containsMouse ? Colors.secondaryContainer_fg : Qt.alpha(Colors.secondary, 0.75)
radius: Config.radius
Item {
anchors.fill: parent
// Process {
// id: powerOff
// command: ["wlogout", "-b", "2"]
// stdout: StdioCollector {
// onStreamFinished: console.log(`line read: ${this.text}`)
// }
// }
MouseArea {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: {
console.log("Running PowerOff Menu")
root.openWlogout()
}
}
}
border.width: 0
Text {
id: powerText
anchors.centerIn: parent
text: ""
font.pixelSize: Config.big_font_size(bar.height)
font.pixelSize: Config.bigIconSize(bar.height)
font.family: Config.font
color:powerButton.containsMouse ? Colors.secondaryContainer : Colors.secondary_fg
}