diff --git a/bin/omarchy-first-run b/bin/omarchy-first-run index dc800baf..db885b67 100755 --- a/bin/omarchy-first-run +++ b/bin/omarchy-first-run @@ -5,6 +5,12 @@ set -e +# Run user-level setup FIRST so its outcome (→ branding files, AI skill +# symlinks, xdg dirs, etc.) isn't held hostage to whether one of the +# privileged first-run steps below aborts under set -e. omarchy-setup-user +# is idempotent and gated on its own marker. +omarchy-setup-user || true + FIRST_RUN_MODE=~/.local/state/omarchy/first-run.mode if [[ -f $FIRST_RUN_MODE ]]; then @@ -23,7 +29,3 @@ if [[ -f $FIRST_RUN_MODE ]]; then bash "$OMARCHY_PATH/install/first-run/welcome.sh" bash "$OMARCHY_PATH/install/first-run/wifi.sh" fi - -# omarchy-setup-user is idempotent (gated on its own marker), so this is -# safe to call on every invocation — it'll no-op once user setup is done. -omarchy-setup-user || true diff --git a/install/first-run/gdk-scale.sh b/install/first-run/gdk-scale.sh index ee42e4a4..0da4a7d6 100644 --- a/install/first-run/gdk-scale.sh +++ b/install/first-run/gdk-scale.sh @@ -1,4 +1,8 @@ -# Set the default GDK_SCALE from what the monitor is currently reporting - -scale=$(omarchy-hyprland-monitor-scaling) -sed -i -E "s|^local omarchy_gdk_scale = .*|local omarchy_gdk_scale = ${scale}|" "$HOME/.config/hypr/monitors.lua" +# Persist the detected monitor scale (and matching GDK_SCALE) into +# ~/.config/hypr/monitors.lua. omarchy-hyprland-monitor-scaling with no args +# returns the closest preset to whatever Hyprland chose at startup; passing +# that value back in updates both `omarchy_monitor_scale` and +# `omarchy_gdk_scale` in the lua config so the choice survives a reboot. +scale=$(omarchy-hyprland-monitor-scaling 2>/dev/null || true) +[[ -n $scale ]] || exit 0 +omarchy-hyprland-monitor-scaling "$scale" >/dev/null 2>&1 || true