Add dpms button to lockscreen
This commit is contained in:
parent
497ca48ada
commit
57d9f9a72e
|
@ -64,6 +64,7 @@ misc {
|
|||
disable_splash_rendering = true
|
||||
vrr = 1
|
||||
no_direct_scanout = false
|
||||
key_press_enables_dpms = true
|
||||
}
|
||||
|
||||
binds {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls.Basic
|
||||
import Quickshell.Io
|
||||
|
||||
Item {
|
||||
required property AuthContext context
|
||||
|
@ -101,4 +102,30 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 20
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: "Turn off Monitors"
|
||||
color: "#aaeeffff"
|
||||
}
|
||||
|
||||
onClicked: dpms.running = true
|
||||
|
||||
background: Rectangle {
|
||||
color: "#20ffffff"
|
||||
border.color: "#30ffffff"
|
||||
radius: height / 2
|
||||
}
|
||||
|
||||
Process {
|
||||
id: dpms
|
||||
command: [ "hyprctl", "dispatch", "dpms" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue