From 16cc7d7a9dcf40320016dae37da8b97889d7cb58 Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Sat, 19 Sep 2026 00:06:29 -0500 Subject: [PATCH] Leave the shell restart to the update flow Restarting immediately after the plugin rescan races Quickshell IPC handler creation and can crash the exiting shell. The normal update flow already restarts after migrations. Let this migration finish through live enablement and placement without adding timing workarounds. --- docs/omarchy-shell.md | 2 +- migrations/1789581661.sh | 1 - test/shell.d/elsewhen-default-migration-test.sh | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/omarchy-shell.md b/docs/omarchy-shell.md index 6e999682..d62661a7 100644 --- a/docs/omarchy-shell.md +++ b/docs/omarchy-shell.md @@ -90,7 +90,7 @@ The lower-level IPC methods remain available through `omarchy-shell shell ...`. ## Elsewhen -Elsewhen (`omacom.elsewhen`) ships in the `elsewhen` package at `/usr/share/omarchy/plugins/omacom.elsewhen`. A symlink in `~/.config/omarchy/plugins/` makes it available to the shell. New installs place it immediately before the clock; the migration uses `omarchy bar put omacom.elsewhen --before omarchy.clock`, which preserves an existing placement and uses Elsewhen's normal right-side placement if the clock is absent. Existing plugin directories and symlinks are left intact. +Elsewhen (`omacom.elsewhen`) ships in the `elsewhen` package at `/usr/share/omarchy/plugins/omacom.elsewhen`. A symlink in `~/.config/omarchy/plugins/` makes it available to the shell. New installs place it immediately before the clock; the migration uses `omarchy bar put omacom.elsewhen --before omarchy.clock`, which preserves an existing placement and uses Elsewhen's normal right-side placement if the clock is absent. Existing plugin directories and symlinks are left intact. The normal update flow restarts the shell after migrations; the migration does not interrupt plugin loading with an immediate restart. ## IPC diff --git a/migrations/1789581661.sh b/migrations/1789581661.sh index 10f18e66..5c022e1c 100644 --- a/migrations/1789581661.sh +++ b/migrations/1789581661.sh @@ -10,4 +10,3 @@ fi omarchy-shell shell rescanPlugins omarchy-bar put omacom.elsewhen --before omarchy.clock -omarchy-restart-shell diff --git a/test/shell.d/elsewhen-default-migration-test.sh b/test/shell.d/elsewhen-default-migration-test.sh index bda62fd6..c0a2de8f 100644 --- a/test/shell.d/elsewhen-default-migration-test.sh +++ b/test/shell.d/elsewhen-default-migration-test.sh @@ -23,7 +23,8 @@ printf '%s\n' "${TEST_PUT_RESULT:-ok}" SH cat >"$test_dir/bin/omarchy-restart-shell" <<'SH' #!/bin/bash -printf 'restart\n' >>"$CALL_LOG" +echo 'migration must leave the restart to omarchy update' >&2 +exit 1 SH chmod +x "$test_dir/bin/"* @@ -46,9 +47,9 @@ run_migration [[ $(readlink "$ROOT/config/omarchy/plugins/omacom.elsewhen") == "$(readlink "$plugin")" ]] || fail "fresh installs use the same package link" pass "migration and fresh installs link to the package" -expected=$'package elsewhen\nshell rescanPlugins\nshell putBarWidget omacom.elsewhen {"before":"omarchy.clock"}\nrestart' -[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "install, scan, placement and restart run in order" "$(cat "$CALL_LOG")" -pass "real bar helper enables and places before the clock, then restarts" +expected=$'package elsewhen\nshell rescanPlugins\nshell putBarWidget omacom.elsewhen {"before":"omarchy.clock"}' +[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "install, scan and placement run in order" "$(cat "$CALL_LOG")" +pass "real bar helper enables and places before the clock without restarting during reload" run_migration [[ $(cat "$CALL_LOG") == "$expected" ]] || fail "migration can be rerun"