Files
Nomarchy/assets/plymouth/nomarchy.script

41 lines
1.2 KiB
Plaintext

# Set background to black
Window.SetBackgroundTopColor(0, 0, 0);
Window.SetBackgroundBottomColor(0, 0, 0);
# Logo
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);
# Message Display (for LUKS password, etc)
message_sprite = Sprite();
message_sprite.SetX(Window.GetWidth() / 2);
message_sprite.SetY(Window.GetHeight() * 0.6);
fun display_message_callback(text) {
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);
}
# Password Entry
status = "normal";
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.SetDisplayPasswordFunction(password_callback);
Plymouth.SetDisplayNormalFunction(fun() { status = "normal"; message_sprite.SetImage(NULL); });
Plymouth.SetDisplayMessageFunction(display_message_callback);
fun refresh_callback () {
}
Plymouth.SetRefreshFunction (refresh_callback);