Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/omarchy/plugins/omacom.elsewhen

This file was deleted.

2 changes: 1 addition & 1 deletion docs/omarchy-shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,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

Expand Down
6 changes: 0 additions & 6 deletions migrations/1789581661.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions test/shell.d/elsewhen-default-migration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ 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")"
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"
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"
Expand Down