From b420072cbad6bed2341e29d912c73e848b577666 Mon Sep 17 00:00:00 2001 From: 28allday Date: Fri, 3 Jul 2026 20:12:44 +0100 Subject: [PATCH] Preserve current route priority on reinstall Co-Authored-By: Claude Fable 5 --- omatether.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/omatether.sh b/omatether.sh index 6ca20e5..9b65b4c 100755 --- a/omatether.sh +++ b/omatether.sh @@ -169,9 +169,13 @@ cmd_install() { || { warn "Package install failed — no internet, or sudo declined."; return 1; } ok "usbmuxd + libimobiledevice installed (usbmuxd starts on demand via udev)" - write_netfile "$METRIC_FALLBACK" || { warn "Could not write $NETFILE."; return 1; } + # Preserve the current priority on reinstall; default to fallback. + local metric + metric=$(current_metric || true) + metric=${metric:-$METRIC_FALLBACK} + write_netfile "$metric" || { warn "Could not write $NETFILE."; return 1; } reload_networkd || { warn "networkd reload failed."; return 1; } - ok "networkd profile written: $NETFILE (fallback priority, metric $METRIC_FALLBACK)" + ok "networkd profile written: $NETFILE (metric $metric)" # Floating TUI launcher for Walker. Uses a dedicated app-id (rather than # Omarchy's generic TUI.float) so our own windowrule can size it smaller.