Fade login handoff through black, spinner while authenticating
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
554eec97b0
commit
55ac1c67ed
5 changed files with 51 additions and 9 deletions
|
|
@ -194,6 +194,23 @@ Item {
|
|||
Keys.onEscapePressed: text = ""
|
||||
}
|
||||
|
||||
// Spinner while PAM checks the password (and, in the greeter,
|
||||
// through the fade-out into the session).
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
visible: view.busy
|
||||
text: "loader-circle"
|
||||
font.family: view.theme.iconFont
|
||||
font.pixelSize: 20
|
||||
color: view.theme.accent
|
||||
RotationAnimation on rotation {
|
||||
running: view.busy
|
||||
from: 0; to: 360
|
||||
duration: 900
|
||||
loops: Animation.Infinite
|
||||
}
|
||||
}
|
||||
|
||||
// Visible confirm button (after TextInput: on top)
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue