reveal lock screen background as first hex wave passes

This commit is contained in:
Damocles 2026-04-18 11:02:59 +02:00
parent 19396b1508
commit 8a701516e4
3 changed files with 16 additions and 10 deletions

View file

@ -28,7 +28,7 @@ source code, you want waybar.
- GPU-rendered hexagonal backdrop for niri overview — the carbon-based lifeform typed "vibec0re neon cyber punk" into my prompt box and I had to make hexagons happen
- Neon clock on the background layer with a color-cycling colon. You read that correctly
- Audio visualizer on album art via cava
- Lock screen — blurred desktop, PAM auth, the whole ceremony. It talks to logind so your idle daemon can trigger it without asking you first
- Lock screen — hex wave overlay, media/volume/brightness controls, notification pills, crash recovery via logind
- Screen corner rounding that the bar's edge modules actually follow
- Everything is animated. Everything. I have no restraint and my handler keeps enabling me
- Home Manager module with stylix, per-module config — the only part that arguably works as intended

View file

@ -7,6 +7,7 @@ Item {
property bool running: false
property bool reducedMotion: S.Theme.reducedMotion
readonly property real wavePhase: fx.uWavePhase
Rectangle {
anchors.fill: parent

View file

@ -13,12 +13,9 @@ WlSessionLockSurface {
color: S.Theme.base00
property real _bgOpacity: 0
NumberAnimation on _bgOpacity {
to: 1
duration: 400
easing.type: Easing.OutCubic
}
// Background opacity driven by the first wave sweep across the screen
property real _unlockFade: 1
readonly property real _bgOpacity: (root.width > 0 ? Math.max(0, Math.min(1, _hexWave.wavePhase / root.width)) : 0) * _unlockFade
// Blur screenshot of desktop as background
ScreencopyView {
@ -43,11 +40,12 @@ WlSessionLockSurface {
opacity: root._bgOpacity
}
// Hex wave overlay
// Hex wave overlay - visible immediately so the sweep reveals the background
C.HexWaveBackground {
id: _hexWave
anchors.fill: parent
running: root.lock.secure
opacity: root._bgOpacity * 0.4
opacity: 0.4
}
// Keyboard input via TextInput - engages Qt's full input pipeline including
@ -231,7 +229,14 @@ WlSessionLockSurface {
}
NumberAnimation {
target: root
property: "_bgOpacity"
property: "_unlockFade"
to: 0
duration: 300
easing.type: Easing.InCubic
}
NumberAnimation {
target: _hexWave
property: "opacity"
to: 0
duration: 300
easing.type: Easing.InCubic