Add dpms button to lockscreen

This commit is contained in:
outfoxxed 2024-05-08 16:01:19 -07:00
parent 497ca48ada
commit 57d9f9a72e
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 28 additions and 0 deletions

View file

@ -64,6 +64,7 @@ misc {
disable_splash_rendering = true
vrr = 1
no_direct_scanout = false
key_press_enables_dpms = true
}
binds {

View file

@ -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" ]
}
}
}