diff --git a/TODO.md b/TODO.md index cf1cdf0..e5bc6f4 100644 --- a/TODO.md +++ b/TODO.md @@ -12,8 +12,8 @@ - [x] Create custom theme assets in `assets/plymouth/`. - [x] Center official logo on splash screen. - [x] Declarative integration in `modules/system/plymouth.nix`. -- [ ] Implement full LUKS password entry support (password prompt, bullet indicators). -- [ ] Add smooth fade-in/fade-out animations for the logo. +- [x] Implement full LUKS password entry support (password prompt, bullet indicators). +- [x] Add smooth fade-in/fade-out animations for the logo. - [ ] Add system message display (e.g., "Rebooting...", "Checking Disk..."). ## 3. System Branding (Fastfetch & Terminal) [DONE] diff --git a/assets/branding/logo.png b/assets/branding/logo.png index 09da500..dbcde56 100644 Binary files a/assets/branding/logo.png and b/assets/branding/logo.png differ diff --git a/assets/branding/logo.svg b/assets/branding/logo.svg new file mode 100644 index 0000000..ea44270 --- /dev/null +++ b/assets/branding/logo.svg @@ -0,0 +1,56 @@ + + + + diff --git a/assets/branding/logo.txt b/assets/branding/logo.txt index bf3ea8f..0bdd125 100644 --- a/assets/branding/logo.txt +++ b/assets/branding/logo.txt @@ -1,26 +1,34 @@ -██████████████████████████████████████████████████████ -██████████████████████████████████████████████████████ -████ ████ ████ -████ ████ ████ -████ █████████████████████ ████████ ████ -████ █████████████████████ ████████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████████████ ████ ████ -████████████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ████ ████ ████ -████ ██████████████████████████████████████ ████ -████ ██████████████████████████████████████ ████ -████ ████ ████ -████ ████ ████ -█████████████████████████████ ████████████████████ -█████████████████████████████ ████████████████████ + ,,, + ,, ,,,,,, + ,,,,,,,, ,,,,,,,,,, + ,,,,,,,,,,,,,, .,,,,,,,,,,,, + ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,, +,,,,,,,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,,,,,,,, .,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,, ,,, +,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,, .,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,, ,,,,,,,,,,,,,, +,,,,,,,,,, ,,,,,,,,,. +,,,,,, ,, +,,,, diff --git a/assets/plymouth/logo.png b/assets/plymouth/logo.png index 09da500..dbcde56 100644 Binary files a/assets/plymouth/logo.png and b/assets/plymouth/logo.png differ diff --git a/assets/plymouth/nomarchy.script b/assets/plymouth/nomarchy.script index e98c02d..f07fac1 100644 --- a/assets/plymouth/nomarchy.script +++ b/assets/plymouth/nomarchy.script @@ -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); diff --git a/bin/nomarchy-cmd-missing b/bin/nomarchy-cmd-missing deleted file mode 100755 index 6f14ec2..0000000 --- a/bin/nomarchy-cmd-missing +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# Returns true if any of the commands passed in as arguments are missing on the system. - -for cmd in "$@"; do - if ! command -v "$cmd" &>/dev/null; then - exit 0 - fi -done - -exit 1 diff --git a/bin/nomarchy-on-boot b/bin/nomarchy-on-boot index 16bbfe1..67d09c2 100755 --- a/bin/nomarchy-on-boot +++ b/bin/nomarchy-on-boot @@ -21,6 +21,11 @@ fi # 3. Declarative hardware configuration check (nixos-hardware) # This part ensures that if we are on an installed system, the correct # nixos-hardware module is selected in the configuration. +# Skip this in the Live ISO environment +if [[ $USER == "nixos" ]] || [[ -f /etc/nixos/hosts/live-iso.nix ]]; then + exit 0 +fi + HW_FILE="/etc/nixos/hardware-selection.nix" if [ -w "$HW_FILE" ]; then PRODUCT_NAME=$(cat /sys/class/dmi/id/product_name 2>/dev/null || echo "Unknown") diff --git a/bin/nomarchy-pkg-missing b/bin/nomarchy-pkg-missing deleted file mode 100755 index 6979036..0000000 --- a/bin/nomarchy-pkg-missing +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -PKG_NAME="$1" - -if [ -z "$PKG_NAME" ]; then - echo "Usage: nomarchy-pkg-missing " - exit 1 -fi - -nomarchy-pkg-present "$PKG_NAME" -if [ $? -eq 0 ]; then - exit 1 -else - exit 0 -fi diff --git a/bin/nomarchy-pkg-present b/bin/nomarchy-pkg-present deleted file mode 100755 index 4890e97..0000000 --- a/bin/nomarchy-pkg-present +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -PKG_NAME="$1" - -if [ -z "$PKG_NAME" ]; then - echo "Usage: nomarchy-pkg-present " - exit 1 -fi - -STATE_FILE="$HOME/.config/home-manager/user-packages.json" - -if [ ! -f "$STATE_FILE" ]; then - exit 1 -fi - -if jq -e ". | index(\"$PKG_NAME\")" "$STATE_FILE" >/dev/null; then - exit 0 -else - exit 1 -fi diff --git a/modules/system/plymouth.nix b/modules/system/plymouth.nix index 0134334..ea6e18e 100644 --- a/modules/system/plymouth.nix +++ b/modules/system/plymouth.nix @@ -18,11 +18,14 @@ let in { boot.initrd.systemd.enable = true; + boot.initrd.verbose = false; + console.earlySetup = true; + boot.consoleLogLevel = 0; boot.plymouth = { enable = true; themePackages = [ nomarchy-plymouth ]; theme = "nomarchy"; }; - boot.kernelParams = [ "quiet" "splash" "loglevel=3" ]; + boot.kernelParams = [ "quiet" "splash" "loglevel=3" "rd.systemd.show_status=false" "rd.udev.log_level=3" "udev.log_priority=3" "boot.shell_on_fail" ]; }