This commit is contained in:
2026-03-20 11:26:02 -05:00
parent 02d6688a74
commit 8c912861e3
12 changed files with 443 additions and 7 deletions

View File

@@ -0,0 +1,86 @@
import Quickshell // for PanelWindow
import QtQuick // for Text
import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell.Io
import Quickshell.Widgets
import Quickshell.Wayland
import Quickshell.Hyprland
import Quickshell.Services.Pam
Item {
id: root
property bool locked: false
required property string bg_path
required property LockCtx ctx
LockCtx {
id: ctx
lock: root.lock
}
WlSessionLock {
id: lock
locked: root.locked
WlSessionLockSurface {
color: "transparent"
Image {
anchors.fill: parent
source: Qt.resolvedUrl(bg_path)
ClippingWrapperRectangle {
anchors.centerIn: parent
radius: 10
color: Pywal.special.background
RowLayout {
ClippingWrapperRectangle {
color: Pywal.colors.color1
implicitWidth: 200
TextInput {
text: ""
onTextChanged: {
ctx.pass = text
}
horizontalAlignment: TextInput.AlignHCenter
font.pointSize: 30
//echoMode: TextInput.Password
color: Pywal.special.foreground
}
}
Button {
text: "unlock"
onClicked: {
ctx.unlock()
}
}
Button {
text: "exit"
onClicked: root.locked = false
}
}
}
}
}
}
}