chore(hygiene): final script cleanup and plymouth optimization

- 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
This commit is contained in:
Bernardo Magri
2026-04-04 21:34:02 +01:00
parent 4abd4d4686
commit 9d5049aed5
11 changed files with 125 additions and 86 deletions

View File

@@ -1,40 +1,53 @@
# 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
# 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() / 3 - logo_image.GetHeight() / 2);
logo_sprite.SetOpacity(1);
logo_sprite.SetY(Window.GetHeight() / 2 - logo_image.GetHeight() / 2);
# Message Display (for LUKS password, etc)
# 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.SetX(Window.GetWidth() / 2);
message_sprite.SetY(Window.GetHeight() * 0.6);
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
status = "normal";
# Password Entry Handling
fun password_callback(text, bullet_count) {
# When typing password, show bullets
bullets = "";
for (i = 0; i < bullet_count; i++) bullets += "*";
display_message_callback(bullets);
}
# Plymouth State Hooks
Plymouth.SetDisplayPasswordFunction(password_callback);
Plymouth.SetDisplayNormalFunction(fun() { status = "normal"; message_sprite.SetImage(NULL); });
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);