- Remove unused pkg and cmd helper scripts - Optimize Plymouth settings for cleaner boot in all environments - Skip hardware auto-detection logic in Live ISO environment
54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
# Nomarchy Plymouth Theme Script
|
|
# Centered logo with smooth fade-in and LUKS password support
|
|
|
|
# Set background to black
|
|
Window.SetBackgroundTopColor(0, 0, 0);
|
|
Window.SetBackgroundBottomColor(0, 0, 0);
|
|
|
|
# Logo Setup
|
|
logo_image = Image("logo.png");
|
|
logo_sprite = Sprite(logo_image);
|
|
logo_sprite.SetX(Window.GetWidth() / 2 - logo_image.GetWidth() / 2);
|
|
logo_sprite.SetY(Window.GetHeight() / 2 - logo_image.GetHeight() / 2);
|
|
|
|
# Initial opacity at 0 for fade-in effect
|
|
logo_opacity = 0;
|
|
logo_sprite.SetOpacity(logo_opacity);
|
|
|
|
# Message Display Setup (for LUKS password, system messages)
|
|
message_sprite = Sprite();
|
|
message_sprite.SetY(Window.GetHeight() * 0.7); # Place below logo
|
|
|
|
fun display_message_callback(text) {
|
|
if (!text) return;
|
|
my_image = Image.Text(text, 1, 1, 1); # White text
|
|
message_sprite.SetImage(my_image);
|
|
message_sprite.SetX(Window.GetWidth() / 2 - my_image.GetWidth() / 2);
|
|
message_sprite.SetOpacity(logo_opacity); # Sync message opacity with logo
|
|
}
|
|
|
|
# Password Entry Handling
|
|
fun password_callback(text, bullet_count) {
|
|
bullets = "";
|
|
for (i = 0; i < bullet_count; i++) bullets += "*";
|
|
display_message_callback(bullets);
|
|
}
|
|
|
|
# Plymouth State Hooks
|
|
Plymouth.SetDisplayPasswordFunction(password_callback);
|
|
Plymouth.SetDisplayNormalFunction(fun() { message_sprite.SetImage(NULL); });
|
|
Plymouth.SetDisplayMessageFunction(display_message_callback);
|
|
|
|
# Animation Logic
|
|
fun refresh_callback () {
|
|
# Smooth fade-in
|
|
if (logo_opacity < 1) {
|
|
logo_opacity += 0.02; # Adjust speed here
|
|
if (logo_opacity > 1) logo_opacity = 1;
|
|
logo_sprite.SetOpacity(logo_opacity);
|
|
message_sprite.SetOpacity(logo_opacity);
|
|
}
|
|
}
|
|
|
|
Plymouth.SetRefreshFunction (refresh_callback);
|