Files
quickshell-config/bar/PowerButton.qml

38 lines
730 B
QML

import qs
import qs.common
import qs.common.widgets
import QtQuick
import QtQuick.Layouts
import Quickshell.Io
Item {
id: root
height: parent.height
implicitWidth: parent.height
Process {
id: powermenu
running: false
command: [ "wlogout" ]
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onPressed: (event) => {
if (!powermenu.running){
powermenu.exec({});
}
}
}
MaterialSymbol {
anchors.fill: parent
visible: true
fill: 1
text: "mode_off_on"
iconSize: Appearance.font.pixelSize.larger
color: Appearance.m3colors.m3onSecondaryContainer
}
}