Refer to Quattro

This commit is contained in:
David Heinemeier Hansson
2026-06-21 14:59:18 +02:00
parent 428b9c7b29
commit 36c1bc7dc5
+31 -31
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# omarchy:summary=Upgrade a legacy Omarchy install to the package-backed Omarchy 4 layout.
# omarchy:summary=Upgrade a legacy Omarchy install to the package-backed Omarchy quattro layout.
# omarchy:args=[--yes] [--reboot] [--dev] [--channel stable|rc|edge] [--user USER]
# omarchy:examples=omarchy upgrade to quattro | omarchy upgrade to quattro --dev
# omarchy:requires-sudo=true
@@ -11,7 +11,7 @@ usage() {
cat <<'USAGE'
Usage: omarchy-upgrade-to-quattro [--yes] [--reboot] [--dev] [--channel stable|rc|edge] [--user USER]
Upgrade any pre-4 Omarchy install to the package-backed Omarchy 4 layout.
Upgrade any pre-quattro Omarchy install to the package-backed Omarchy quattro layout.
This script is intentionally self-contained so it can be shipped as a command
in Omarchy 3.8.x or run directly with curl | bash on older systems.
@@ -295,11 +295,11 @@ if (( ! yes )); then
cat <<EOF
This will upgrade Omarchy for user '$target_user' to Omarchy 4 using the '$channel' channel and $package_mode.
This will upgrade Omarchy for user '$target_user' to Omarchy quattro using the '$channel' channel and $package_mode.
It will install the package-backed Omarchy 4 stack, overwrite files previously
It will install the package-backed Omarchy quattro stack, overwrite files previously
written by the legacy installer, remove retired default packages, and apply the
Omarchy 4 system/user transition inline. A reboot is strongly recommended afterward.
Omarchy quattro system/user transition inline. A reboot is strongly recommended afterward.
EOF
if [[ -r /dev/tty ]]; then
@@ -397,8 +397,8 @@ install_keyrings() {
remove_legacy_installer_package() {
if pacman -Q omarchy-installer >/dev/null 2>&1; then
log "Removing legacy omarchy-installer package"
# The pre-4 omarchy meta package may depend on omarchy-installer. Ignore
# that edge temporarily; the next transaction installs the Omarchy 4 meta.
# The pre-quattro omarchy meta package may depend on omarchy-installer. Ignore
# that edge temporarily; the next transaction installs the Omarchy quattro meta.
as_root pacman -Rdd --noconfirm omarchy-installer
fi
}
@@ -440,14 +440,14 @@ normalize_limine_config() {
log "Normalizing Limine config"
# Mirrors old 1777570652: normalize British/American spelling, the old color
# index, and help colors that pre-4 installs may never have migrated.
# index, and help colors that pre-quattro installs may never have migrated.
as_root sed -i -E 's/^interface_branding_colou?r: 2$/interface_branding_color: 9ece6a/' /boot/limine.conf
as_root sed -i 's/^interface_branding_colour: /interface_branding_color: /' /boot/limine.conf
as_root sed -i -E '/^interface_help_colou?r(_bright)?:/d' /boot/limine.conf
as_root sed -i '/^interface_branding_color:/a interface_help_color_bright: 9ece6a' /boot/limine.conf
as_root sed -i '/^interface_branding_color:/a interface_help_color: 9ece6a' /boot/limine.conf
# Pre-4 custom-UKI installs used <machine-id>_linux.efi. Omarchy 4 uses the
# Pre-quattro custom-UKI installs used <machine-id>_linux.efi. Omarchy quattro uses the
# stable omarchy_linux.efi path generated by limine-entry-tool.
machine_id=$(as_root cat /etc/machine-id 2>/dev/null || true)
legacy_uki="/boot/EFI/Linux/${machine_id}_linux.efi"
@@ -469,7 +469,7 @@ configure_snapper_policy() {
}
remove_conflicting_legacy_packages() {
# Remove legacy packages that are known to conflict with Omarchy 4 defaults
# Remove legacy packages that are known to conflict with Omarchy quattro defaults
# before the main package transaction. Broader retired-package cleanup runs
# after NetworkManager and the rest of the new stack are installed.
local conflicting_packages=(
@@ -488,9 +488,9 @@ remove_conflicting_legacy_packages() {
local pkg
for pkg in "${conflicting_packages[@]}"; do
if package_installed_exact "$pkg"; then
# Some pre-4 meta packages depend on these retired/default packages. We
# Some pre-quattro meta packages depend on these retired/default packages. We
# intentionally break those old dependency edges before installing the
# Omarchy 4 meta, otherwise pacman prompts to remove conflicts (for
# Omarchy quattro meta, otherwise pacman prompts to remove conflicts (for
# example ttf-jetbrains-mono-nerd -> ttf-jetbrains-mono-nerd-basic) and
# --noconfirm answers "no".
as_root pacman -Rdd --noconfirm "$pkg" || warn "Could not remove conflicting legacy package '$pkg'; continuing."
@@ -509,7 +509,7 @@ migrate_1password_beta_package() {
fi
}
install_omarchy_4_packages() {
install_omarchy_quattro_packages() {
local omarchy_package=omarchy
local settings_package=omarchy-settings
if (( use_dev_packages )); then
@@ -527,7 +527,7 @@ install_omarchy_4_packages() {
)
local base_packages=()
log "Upgrading system packages and installing Omarchy 4 packages"
log "Upgrading system packages and installing Omarchy quattro packages"
(( use_dev_packages )) && log "Using dev packages [omarchy-dev / omarchy-settings-dev]"
# --noconfirm answers "no" to conflict-removal prompts. --ask 4 preselects
# removing the conflicting package, which is required for legacy packages like
@@ -536,7 +536,7 @@ install_omarchy_4_packages() {
mark_packages_explicit "${core_packages[@]}"
if [[ -f /usr/share/omarchy/install/omarchy-base.packages ]]; then
log "Installing Omarchy 4 default package set"
log "Installing Omarchy quattro default package set"
mapfile -t base_packages < <(sed -e 's/[[:space:]]*#.*$//' -e '/^[[:space:]]*$/d' /usr/share/omarchy/install/omarchy-base.packages)
if (( ${#base_packages[@]} )); then
as_root pacman -S --needed --noconfirm --ask 4 --overwrite='*' "${base_packages[@]}"
@@ -624,7 +624,7 @@ remove_retired_default_packages() {
zoom
)
log "Removing packages retired from the Omarchy 4 default install"
log "Removing packages retired from the Omarchy quattro default install"
local pkg
local installed_retired=()
for pkg in "${retired_packages[@]}"; do
@@ -858,7 +858,7 @@ USER_UNITS
}
cleanup_retired_services() {
log "Disabling services retired by Omarchy 4"
log "Disabling services retired by Omarchy quattro"
# Do not stop iwd or systemd-networkd mid-upgrade; disabling is enough and
# avoids dropping a running Wi-Fi connection before the user can reboot into
@@ -921,7 +921,7 @@ stop_retired_session_processes() {
}
start_omarchy_shell_session() {
# Omarchy 4 starts Quickshell from Hyprland autostart, not a user service.
# Omarchy quattro starts Quickshell from Hyprland autostart, not a user service.
# Reboot is still the real cutover, but start the new shell in the current
# Wayland session when possible so users do not sit without a bar after the
# retired waybar/walker/elephant processes are stopped.
@@ -1212,7 +1212,7 @@ should_enable_sddm_autologin() {
}
apply_system_transition() {
log "Applying Omarchy 4 system transition"
log "Applying Omarchy quattro system transition"
[[ -d /usr/share/omarchy ]] || fail "/usr/share/omarchy was not installed."
as_root install -d -m 0755 /usr/share/icons/Yaru/scalable/actions
@@ -1349,7 +1349,7 @@ EOF
}
apply_user_transition() {
log "Applying Omarchy 4 user transition"
log "Applying Omarchy quattro user transition"
[[ -d /usr/share/omarchy ]] || fail "/usr/share/omarchy was not installed."
run_as_user env \
@@ -1539,8 +1539,8 @@ backup_config_file() {
mapfile -t retired_config_files < <(default_hash_paths retire)
# These are new Omarchy 4 config entry points. Older installs cannot have an
# Omarchy-shipped legacy copy to hash-match, so always install the v4 default.
# These are new Omarchy quattro config entry points. Older installs cannot have an
# Omarchy-shipped legacy copy to hash-match, so always install the quattro default.
always_copy_config_files=(
hypr/.luarc.json
hypr/autostart.lua
@@ -1583,7 +1583,7 @@ migrate_uwsm_env_customizations() {
mkdir -p "$(dirname "$dest")"
{
echo '# Preserved custom ~/.config/uwsm/env content during Omarchy 4 upgrade.'
echo '# Preserved custom ~/.config/uwsm/env content during Omarchy quattro upgrade.'
echo '# Exact legacy Omarchy-managed setup lines were replaced with no-op markers where safe.'
cat "$tmp"
} >"$dest"
@@ -1796,7 +1796,7 @@ done
# Existing user config may be customized. Refresh only files whose hash matches
# a default Omarchy has shipped before, fill in missing defaults for old installs,
# and always write the v4-only entry points that older installs cannot have.
# and always write the quattro-only entry points that older installs cannot have.
refresh_known_config_defaults
copy_missing_config_defaults "$root/config" "$HOME/.config"
mark_removed_preinstalls_from_legacy_bindings
@@ -1805,7 +1805,7 @@ repair_chromium_copy_url_extension_flags
# Carry over user-added backgrounds from the legacy git checkout backup, then
# remove old symlinks that pointed ~/.config/omarchy/themes/* back into the
# pre-4 checkout. Omarchy 4 reads stock themes from /usr/share/omarchy/themes.
# pre-quattro checkout. Omarchy quattro reads stock themes from /usr/share/omarchy/themes.
legacy_omarchy_backup="$HOME/.local/share/omarchy.omarchy-upgrade-to-quattro.$BACKUP_SUFFIX.bak"
if [[ -d $legacy_omarchy_backup/themes && -d $legacy_omarchy_backup/.git ]]; then
(
@@ -1882,7 +1882,7 @@ if [[ -f $root/default/hypr/toggles/flags.lua ]]; then
cp "$root/default/hypr/toggles/flags.lua" "$HOME/.local/state/omarchy/toggles/hypr/"
fi
# Legacy Hyprland .conf entry points source ~/.local/state/omarchy/toggles/hypr/*.conf.
# Keep an empty match around for the live pre-reboot session; v4 Lua ignores it.
# Keep an empty match around for the live pre-reboot session; quattro Lua ignores it.
if [[ -f $HOME/.config/hypr/hyprland.conf ]]; then
: >"$HOME/.local/state/omarchy/toggles/hypr/flags.conf"
fi
@@ -2203,7 +2203,7 @@ refresh_current_theme_after_upgrade() {
theme_name=${theme_name//$'\n'/}
[[ -n $theme_name ]] || theme_name="Tokyo Night"
log "Refreshing current theme with Omarchy 4 templates ($theme_name)"
log "Refreshing current theme with Omarchy quattro templates ($theme_name)"
runtime_dir="$target_runtime_dir"
[[ -d $runtime_dir ]] || runtime_dir=/tmp
@@ -2244,7 +2244,7 @@ install_keyrings
remove_legacy_installer_package
remove_legacy_limine_configs
remove_conflicting_legacy_packages
install_omarchy_4_packages
install_omarchy_quattro_packages
normalize_limine_config
configure_snapper_policy
migrate_1password_beta_package
@@ -2262,7 +2262,7 @@ refresh_current_theme_after_upgrade
# Do not force-reload Hyprland in the live upgraded session. The legacy
# default/hypr and theme hyprland.conf shims above exist specifically so the
# pre-reboot session can keep running safely; the reboot performs the real
# Omarchy 4 Lua-config cutover.
# Omarchy quattro Lua-config cutover.
restore_hyprland_config_reload
if start_omarchy_shell_session; then
stop_retired_session_processes
@@ -2272,12 +2272,12 @@ fi
cat <<EOF
Omarchy 4 upgrade complete.
Omarchy quattro upgrade complete.
IMPORTANT: Review the output above before rebooting.
DO NOT REBOOT IF THERE ARE ERRORS above; fix the errors or ask for help first.
A reboot is required to finish switching to the package-backed Omarchy 4 session.
A reboot is required to finish switching to the package-backed Omarchy quattro session.
EOF
if (( auto_reboot )); then