quickshell work
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
|
||||
property real interval: 100
|
||||
id: root
|
||||
|
||||
radius: 5
|
||||
implicitWidth: 30; height: 30
|
||||
Button {
|
||||
id: button
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
Process {
|
||||
id: idlent
|
||||
running: false
|
||||
command: ["systemd-inhibit", "--what=idle", "sleep", root.interval.toString()]
|
||||
|
||||
onExited: {
|
||||
running = button.text == " " ? false : true
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
idlent.running = button.text == " " ? true : false
|
||||
button.text = button.text == " " ? " " : " "
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user