diff --git a/config/omarchy/plugins/omacom.elsewhen b/config/omarchy/plugins/omacom.elsewhen deleted file mode 120000 index 19840c51..00000000 --- a/config/omarchy/plugins/omacom.elsewhen +++ /dev/null @@ -1 +0,0 @@ -/usr/share/omarchy/plugins/omacom.elsewhen \ No newline at end of file diff --git a/docs/omarchy-shell.md b/docs/omarchy-shell.md index d62661a7..b0da00e4 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. The normal update flow restarts the shell after migrations; the migration does not interrupt plugin loading with an immediate restart. +Elsewhen (`omacom.elsewhen`) ships in the `elsewhen` package at `/usr/share/omarchy/shell/plugins/omacom.elsewhen`, where the shell discovers it automatically. 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 5c022e1c..7a848550 100644 --- a/migrations/1789581661.sh +++ b/migrations/1789581661.sh @@ -2,11 +2,5 @@ echo "Install Elsewhen, the world clock plugin" omarchy-pkg-add elsewhen -plugin="$HOME/.config/omarchy/plugins/omacom.elsewhen" -mkdir -p "$(dirname "$plugin")" -if [[ ! -e $plugin && ! -L $plugin ]]; then - ln -s /usr/share/omarchy/plugins/omacom.elsewhen "$plugin" -fi - omarchy-shell shell rescanPlugins omarchy-bar put omacom.elsewhen --before omarchy.clock diff --git a/test/shell.d/elsewhen-default-migration-test.sh b/test/shell.d/elsewhen-default-migration-test.sh index c0a2de8f..585f65ba 100644 --- a/test/shell.d/elsewhen-default-migration-test.sh +++ b/test/shell.d/elsewhen-default-migration-test.sh @@ -40,12 +40,12 @@ if PACKAGE_STATUS=1 run_migration; then fi [[ ! -e $plugin && ! -L $plugin && $(cat "$CALL_LOG") == "package elsewhen" ]] || fail "package failure leaves the plugin and shell untouched" -pass "package failure stops before linking or changing the shell" +pass "package failure stops before changing the shell" run_migration -[[ $(readlink "$plugin") == /usr/share/omarchy/plugins/omacom.elsewhen ]] || fail "package link is installed" -[[ $(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" +[[ ! -e $plugin && ! -L $plugin ]] || fail "migration does not create a user plugin link" +[[ ! -e $ROOT/config/omarchy/plugins/omacom.elsewhen && ! -L $ROOT/config/omarchy/plugins/omacom.elsewhen ]] || fail "fresh installs do not ship a user plugin link" +pass "migration and fresh installs rely on the packaged plugin directory" 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")" @@ -53,10 +53,10 @@ pass "real bar helper enables and places before the clock without restarting dur run_migration [[ $(cat "$CALL_LOG") == "$expected" ]] || fail "migration can be rerun" -pass "migration can be rerun with its package link present" +[[ ! -e $plugin && ! -L $plugin ]] || fail "rerunning the migration does not create a user plugin link" +pass "migration can be rerun without a user plugin link" -rm "$plugin" -mkdir "$plugin" +mkdir -p "$plugin" printf 'local work\n' >"$plugin/notes" run_migration [[ ! -L $plugin && $(cat "$plugin/notes") == "local work" ]] || fail "existing checkout is preserved"