Fade login handoff through black, spinner while authenticating

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-09-23 10:59:58 +01:00
parent 554eec97b0
commit 55ac1c67ed
5 changed files with 51 additions and 9 deletions

View file

@ -19,6 +19,8 @@ Window {
password = "";
busy = false;
errorMessage = message;
handoff.stop();
veil.opacity = 0;
}
Connections {
target: Greetd
@ -38,13 +40,25 @@ Window {
function onError(error) { root.failed("Login unavailable; try again"); }
function onReadyToLaunch() {
root.password = "";
// PAM/logind must know this is a graphical session before the
// compositor starts, including for the pre-suspend lock check.
Greetd.launch([Quickshell.env("FRED_SESSION_COMMAND")], [
"XDG_SESSION_TYPE=wayland",
"XDG_CURRENT_DESKTOP=Hyprland",
"XDG_SESSION_DESKTOP=Hyprland"
]);
handoff.start();
}
}
// Fade to black before greetd swaps compositors. Hyprland starts on
// black and Quickshell fades the wallpaper in, so the VT gap between
// the two hides inside the dark instead of flashing.
SequentialAnimation {
id: handoff
NumberAnimation { target: veil; property: "opacity"; to: 1; duration: 350; easing.type: Easing.InQuad }
ScriptAction {
script: {
// PAM/logind must know this is a graphical session before the
// compositor starts, including for the pre-suspend lock check.
Greetd.launch([Quickshell.env("FRED_SESSION_COMMAND")], [
"XDG_SESSION_TYPE=wayland",
"XDG_CURRENT_DESKTOP=Hyprland",
"XDG_SESSION_DESKTOP=Hyprland"
]);
}
}
}
AuthView {
@ -64,4 +78,5 @@ Window {
Greetd.createSession("fred");
}
}
Rectangle { id: veil; anchors.fill: parent; color: "black"; opacity: 0 }
}