diff --git a/dots/.config/quickshell/ii/modules/lock/LockSurface.qml b/dots/.config/quickshell/ii/modules/lock/LockSurface.qml index 30b067490..628f4d2fa 100644 --- a/dots/.config/quickshell/ii/modules/lock/LockSurface.qml +++ b/dots/.config/quickshell/ii/modules/lock/LockSurface.qml @@ -143,7 +143,7 @@ MouseArea { Keys.onPressed: event => { root.context.resetClearTimer(); } - + layer.enabled: true layer.effect: OpacityMask { maskSource: Rectangle { @@ -153,6 +153,22 @@ MouseArea { } } + // Shake when wrong password + SequentialAnimation { + id: wrongPasswordShakeAnim + NumberAnimation { target: passwordBox; property: "x"; to: -30; duration: 50 } + NumberAnimation { target: passwordBox; property: "x"; to: 30; duration: 50 } + NumberAnimation { target: passwordBox; property: "x"; to: -15; duration: 40 } + NumberAnimation { target: passwordBox; property: "x"; to: 15; duration: 40 } + NumberAnimation { target: passwordBox; property: "x"; to: 0; duration: 30 } + } + Connections { + target: GlobalStates + function onScreenUnlockFailedChanged() { + if (GlobalStates.screenUnlockFailed) wrongPasswordShakeAnim.restart(); + } + } + // We're drawing dots manually color: ColorUtils.transparentize(Appearance.colors.colOnLayer1) PasswordChars {