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 onLockedChanged: { lock.locked = locked } required property string bg_path property color fieldColor: ctx.failed ? Pywal.colors.color6 : Pywal.colors.color1 IpcHandler { target: "lockscreen" function lock() { root.locked = true; } function unlock() { root.locked = false; } } LockCtx { id: ctx onShouldUnlock: lock.locked = false } LockScreen { id: lockscreen visible: root.locked } WlSessionLock { id: lock locked: root.locked onLockedChanged: { root.locked = 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: root.fieldColor implicitWidth: 200 TextInput { text: "" onTextChanged: { ctx.pass = text } echoMode: TextInput.Password horizontalAlignment: TextInput.AlignHCenter verticalAlignment: TextInput.AlignVCenter font.pointSize: 30 color: Pywal.special.foreground } } Button { text: "unlock" onClicked: { ctx.doUnlock() } } Button { text: "exit" onClicked: root.locked = false } } } } } }