From 923d5fb0cde7ccbb426fd27c0802ef11c51ab8fc Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 5 Jan 2026 15:07:25 +0100 Subject: [PATCH] Extract the duplicated limine confs into distinct files (#4084) * Extract the duplicated limine.conf into its own file * Extract the /etc/limine/default config as well --- bin/omarchy-refresh-limine | 22 +------------- default/limine/default.conf | 20 +++++++++++++ default/limine/limine.conf | 18 ++++++++++++ install/login/limine-snapper.sh | 51 ++------------------------------- 4 files changed, 42 insertions(+), 69 deletions(-) create mode 100644 default/limine/default.conf create mode 100644 default/limine/limine.conf diff --git a/bin/omarchy-refresh-limine b/bin/omarchy-refresh-limine index 6260ebc6..61261634 100755 --- a/bin/omarchy-refresh-limine +++ b/bin/omarchy-refresh-limine @@ -10,27 +10,7 @@ echo "Resetting limine config" sudo mv /boot/limine.conf /boot/limine.conf.bak -sudo tee /boot/limine.conf </dev/null -### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md -#timeout: 3 -default_entry: 2 -interface_branding: Omarchy Bootloader -interface_branding_color: 2 -hash_mismatch_panic: no - -term_background: 1a1b26 -backdrop: 1a1b26 - -# Terminal colors (Tokyo Night palette) -term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6 -term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 - -# Text colors -term_foreground: c0caf5 -term_foreground_bright: c0caf5 -term_background_bright: 24283b - -EOF +sudo cp ~/.local/share/omarchy/default/limine/limine.conf /boot/limine.conf sudo limine-update sudo limine-snapper-sync diff --git a/default/limine/default.conf b/default/limine/default.conf new file mode 100644 index 00000000..eb34057a --- /dev/null +++ b/default/limine/default.conf @@ -0,0 +1,20 @@ +TARGET_OS_NAME="Omarchy" + +ESP_PATH="/boot" + +KERNEL_CMDLINE[default]="@@CMDLINE@@" +KERNEL_CMDLINE[default]+="quiet splash" + +ENABLE_UKI=yes +CUSTOM_UKI_NAME="omarchy" + +ENABLE_LIMINE_FALLBACK=yes + +# Find and add other bootloaders +FIND_BOOTLOADERS=yes + +BOOT_ORDER="*, *fallback, Snapshots" + +MAX_SNAPSHOT_ENTRIES=5 + +SNAPSHOT_FORMAT_CHOICE=5 diff --git a/default/limine/limine.conf b/default/limine/limine.conf new file mode 100644 index 00000000..9868fbc7 --- /dev/null +++ b/default/limine/limine.conf @@ -0,0 +1,18 @@ +### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md +#timeout: 3 +default_entry: 2 +interface_branding: Omarchy Bootloader +interface_branding_color: 2 +hash_mismatch_panic: no + +term_background: 1a1b26 +backdrop: 1a1b26 + +# Terminal colors (Tokyo Night palette) +term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6 +term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 + +# Text colors +term_foreground: c0caf5 +term_foreground_bright: c0caf5 +term_background_bright: 24283b diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh index a9a13553..e54579a5 100644 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -29,28 +29,8 @@ EOF CMDLINE=$(grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//') - sudo tee /etc/default/limine </dev/null -TARGET_OS_NAME="Omarchy" - -ESP_PATH="/boot" - -KERNEL_CMDLINE[default]="$CMDLINE" -KERNEL_CMDLINE[default]+="quiet splash" - -ENABLE_UKI=yes -CUSTOM_UKI_NAME="omarchy" - -ENABLE_LIMINE_FALLBACK=yes - -# Find and add other bootloaders -FIND_BOOTLOADERS=yes - -BOOT_ORDER="*, *fallback, Snapshots" - -MAX_SNAPSHOT_ENTRIES=5 - -SNAPSHOT_FORMAT_CHOICE=5 -EOF + sudo cp $OMARCHY_PATH/default/limine/default.conf /etc/default/limine + sudo sed -i "s|@@CMDLINE@@|$CMDLINE|g" /etc/default/limine # UKI and EFI fallback are EFI only if [[ -z $EFI ]]; then @@ -58,32 +38,7 @@ EOF fi # We overwrite the whole thing knowing the limine-update will add the entries for us - sudo tee /boot/limine.conf </dev/null -### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md -#timeout: 3 -default_entry: 2 -interface_branding: Omarchy Bootloader -interface_branding_color: 2 -hash_mismatch_panic: no - -term_background: 1a1b26 -backdrop: 1a1b26 - -# Terminal colors (Tokyo Night palette) -term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6 -term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 - -# Text colors -term_foreground: c0caf5 -term_foreground_bright: c0caf5 -term_background_bright: 24283b - -EOF - - # Remove the original config file if it's not /boot/limine.conf - if [[ "$limine_config" != "/boot/limine.conf" ]] && [[ -f "$limine_config" ]]; then - sudo rm "$limine_config" - fi + sudo cp $OMARCHY_PATH/default/limine/limine.conf /boot/limine.conf # Match Snapper configs if not installing from the ISO