diff --git a/bin/omarchy-hibernation-setup b/bin/omarchy-hibernation-setup index d8e32c94..5ae13ac0 100755 --- a/bin/omarchy-hibernation-setup +++ b/bin/omarchy-hibernation-setup @@ -38,8 +38,10 @@ if [[ -f $MKINITCPIO_CONF ]] && grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF"; if [[ -n $RESUME_OFFSET ]]; then echo "Fixing empty resume_offset ($RESUME_OFFSET)" sudo sed -i "s/resume_offset=\"$/resume_offset=$RESUME_OFFSET\"/" "$RESUME_DROP_IN" - sudo sed -i "s/resume_offset=\"$/resume_offset=$RESUME_OFFSET\"/" /etc/default/limine - $NO_REBUILD || sudo limine-mkinitcpio + if ! $NO_REBUILD; then + sudo sed -i "s/resume_offset=\"$/resume_offset=$RESUME_OFFSET\"/" /etc/default/limine + sudo limine-mkinitcpio + fi fi fi echo "Hibernation is already set up" @@ -100,7 +102,7 @@ if [[ ! -f $RESUME_DROP_IN ]]; then if [[ -n $RESUME_OFFSET ]]; then sudo mkdir -p /etc/limine-entry-tool.d echo "KERNEL_CMDLINE[default]+=\" resume=$RESUME_DEVICE resume_offset=$RESUME_OFFSET\"" | sudo tee "$RESUME_DROP_IN" >/dev/null - sudo tee -a /etc/default/limine < "$RESUME_DROP_IN" >/dev/null + $NO_REBUILD || sudo tee -a /etc/default/limine < "$RESUME_DROP_IN" >/dev/null else echo "Warning: Could not determine resume offset for $SWAP_FILE" >&2 fi @@ -113,7 +115,7 @@ if grep -q "\[s2idle\]" /sys/power/mem_sleep 2>/dev/null; then echo "Enabling ACPI RTC alarm for s2idle suspend" sudo mkdir -p /etc/limine-entry-tool.d echo 'KERNEL_CMDLINE[default]+=" rtc_cmos.use_acpi_alarm=1"' | sudo tee "$LIMINE_DROP_IN" >/dev/null - sudo tee -a /etc/default/limine < "$LIMINE_DROP_IN" >/dev/null + $NO_REBUILD || sudo tee -a /etc/default/limine < "$LIMINE_DROP_IN" >/dev/null fi fi diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index 64ca6033..2d39e152 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -154,7 +154,9 @@ echo "$THEME_NAME" >"$HOME/.config/omarchy/current/theme.name" # the theme hooks run. colors_payload=$([[ -f $CURRENT_THEME_PATH/colors.toml ]] && base64 -w 0 "$CURRENT_THEME_PATH/colors.toml") shell_payload=$([[ -f $CURRENT_THEME_PATH/shell.toml ]] && base64 -w 0 "$CURRENT_THEME_PATH/shell.toml") -if [[ $OMARCHY_THEME_SKIP_BACKGROUND == "1" ]]; then +if [[ ${OMARCHY_THEME_OFFLINE:-} == "1" ]]; then + : # No shell/session bus exists during ISO chroot finalization. +elif [[ $OMARCHY_THEME_SKIP_BACKGROUND == "1" ]]; then shell_ipc shell applyTheme "$colors_payload" "$shell_payload" || true else set_theme_background @@ -181,13 +183,15 @@ post_theme_commands=( omarchy-theme-set-keyboard ) -run_parallel "${post_theme_commands[@]}" +if [[ ${OMARCHY_THEME_OFFLINE:-} != "1" ]]; then + run_parallel "${post_theme_commands[@]}" -# Call hook on theme set -omarchy-hook theme-set "$THEME_NAME" >/dev/null + # Call hook on theme set + omarchy-hook theme-set "$THEME_NAME" >/dev/null -# Warm selector caches after the theme is applied. The shell hot-reloads theme -# colors/backgrounds, so keep the running instance alive and preload the picker -# rows/selection to avoid first-open carousel settling after a theme change. -omarchy-theme-switcher --preload >/dev/null 2>&1 -omarchy-theme-bg-cache >/dev/null 2>&1 & + # Warm selector caches after the theme is applied. The shell hot-reloads theme + # colors/backgrounds, so keep the running instance alive and preload the picker + # rows/selection to avoid first-open carousel settling after a theme change. + omarchy-theme-switcher --preload >/dev/null 2>&1 + omarchy-theme-bg-cache >/dev/null 2>&1 & +fi diff --git a/bin/omarchy-upload-log b/bin/omarchy-upload-log index 975e6a6e..3673720b 100755 --- a/bin/omarchy-upload-log +++ b/bin/omarchy-upload-log @@ -39,6 +39,23 @@ else } >"$SYSTEM_INFO" fi +same_or_prefix_log() { + local a="$1" b="$2" size_a size_b min_size + [[ -s $a && -s $b ]] || return 1 + cmp -s "$a" "$b" && return 0 + + size_a=$(stat -c '%s' "$a" 2>/dev/null) || return 1 + size_b=$(stat -c '%s' "$b" 2>/dev/null) || return 1 + if (( size_a < size_b )); then + min_size=$size_a + else + min_size=$size_b + fi + (( min_size > 0 )) || return 1 + + cmp -n "$min_size" "$a" "$b" >/dev/null 2>&1 +} + case "$LOG_TYPE" in install) # In the live ISO before reboot, the target system is mounted at /mnt so the @@ -58,7 +75,7 @@ install) cat "$LIVE_OMARCHY_LOG" >>"$TEMP_LOG" fi - if [[ -s $TARGET_OMARCHY_LOG ]] && ! cmp -s "$LIVE_OMARCHY_LOG" "$TARGET_OMARCHY_LOG" 2>/dev/null; then + if [[ -s $TARGET_OMARCHY_LOG ]] && ! same_or_prefix_log "$LIVE_OMARCHY_LOG" "$TARGET_OMARCHY_LOG"; then printf '\n========================================\nTARGET OMARCHY INSTALL LOG (%s)\n========================================\n\n' "$TARGET_OMARCHY_LOG" >>"$TEMP_LOG" cat "$TARGET_OMARCHY_LOG" >>"$TEMP_LOG" fi diff --git a/install/config/theme.sh b/install/config/theme.sh index f276392d..20bb6e35 100644 --- a/install/config/theme.sh +++ b/install/config/theme.sh @@ -9,8 +9,14 @@ mkdir -p ~/.config/omarchy/themes sudo mkdir -p /etc/chromium/policies/managed sudo chmod a+rw /etc/chromium/policies/managed -# Set initial theme -omarchy-theme-set "Tokyo Night" +# Set initial theme. Offline ISO installs only need the user's theme files and +# symlinks seeded; there is no running desktop/session bus in the chroot, so +# skip shell IPC, dconf, app retint hooks, and background transition work. +if install_mode_is offline; then + OMARCHY_THEME_OFFLINE=1 OMARCHY_THEME_SKIP_BACKGROUND=1 omarchy-theme-set "Tokyo Night" +else + omarchy-theme-set "Tokyo Night" +fi rm -rf ~/.config/chromium/SingletonLock # otherwise archiso will own the chromium singleton # Set specific app links for current theme diff --git a/install/login/all.sh b/install/login/all.sh index 09f6506d..341068f6 100644 --- a/install/login/all.sh +++ b/install/login/all.sh @@ -1,4 +1,6 @@ run_logged $OMARCHY_INSTALL/login/default-keyring.sh run_logged $OMARCHY_INSTALL/login/sddm.sh -run_logged $OMARCHY_INSTALL/login/hibernation.sh +if install_mode_is online; then + run_logged $OMARCHY_INSTALL/login/hibernation.sh +fi run_logged $OMARCHY_INSTALL/login/limine-snapper.sh diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh index ec8e4eca..cc140675 100644 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -133,19 +133,23 @@ EOF LIMINE_CONFIGURED=true fi -echo "Re-enabling mkinitcpio hooks..." +# Restore legacy hook moves from older offline installer paths. Current ISO +# installs mask/unmask hooks in the orchestrator, so these files usually do not +# exist; stay quiet unless there is real cleanup to do. +if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled || -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]]; then + echo "Re-enabling mkinitcpio hooks..." -# Restore the specific mkinitcpio pacman hooks -if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]]; then - sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook + if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]]; then + sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook + fi + + if [[ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]]; then + sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook + fi + + echo "mkinitcpio hooks re-enabled" fi -if [[ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]]; then - sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook -fi - -echo "mkinitcpio hooks re-enabled" - # Final sanity check: assert the Limine config and UKI actually contain what # they need to boot. Run AFTER snapper setup and hook re-enable so a # validation failure doesn't leave the system half-configured. diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index ad4b7db7..0196aa87 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -72,6 +72,7 @@ libqalculate libreoffice-fresh llvm localsend +lua51 luarocks man-db mariadb-libs diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh index dfa836b8..4751a55a 100644 --- a/install/post-install/pacman.sh +++ b/install/post-install/pacman.sh @@ -2,6 +2,13 @@ sudo cp -f $OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf /etc/pacman.conf sudo cp -f $OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable} /etc/pacman.d/mirrorlist +# omarchy-settings skips this override until cups-browsed is actually present +# to avoid pacman creating cups-browsed.conf.pacnew during ISO package install. +if [[ -f $OMARCHY_PATH/etc-overrides/cups-cups-browsed.conf && -d /etc/cups ]]; then + sudo cp -f "$OMARCHY_PATH/etc-overrides/cups-cups-browsed.conf" /etc/cups/cups-browsed.conf + sudo rm -f /etc/cups/cups-browsed.conf.pacnew +fi + if lspci -nn | grep -q "106b:180[12]"; then cat </dev/null