Remove obsolete Elsewhen plugin symlink
This commit is contained in:
1 parent
e38c1d1289
commit
45748a2812
4 files changed
+8
-15
No files matched your search
@@ -1 +0,0 @@
|
|||||||
/usr/share/omarchy/plugins/omacom.elsewhen
|
|
||||||
@@ -90,7 +90,7 @@ The lower-level IPC methods remain available through `omarchy-shell shell ...`.
|
|||||||
|
|
||||||
## Elsewhen
|
## 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
|
## IPC
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,5 @@ echo "Install Elsewhen, the world clock plugin"
|
|||||||
|
|
||||||
omarchy-pkg-add elsewhen
|
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-shell shell rescanPlugins
|
||||||
omarchy-bar put omacom.elsewhen --before omarchy.clock
|
omarchy-bar put omacom.elsewhen --before omarchy.clock
|
||||||
@@ -40,12 +40,12 @@ if PACKAGE_STATUS=1 run_migration; then
|
|||||||
fi
|
fi
|
||||||
[[ ! -e $plugin && ! -L $plugin && $(cat "$CALL_LOG") == "package elsewhen" ]] ||
|
[[ ! -e $plugin && ! -L $plugin && $(cat "$CALL_LOG") == "package elsewhen" ]] ||
|
||||||
fail "package failure leaves the plugin and shell untouched"
|
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
|
run_migration
|
||||||
[[ $(readlink "$plugin") == /usr/share/omarchy/plugins/omacom.elsewhen ]] || fail "package link is installed"
|
[[ ! -e $plugin && ! -L $plugin ]] || fail "migration does not create a user plugin link"
|
||||||
[[ $(readlink "$ROOT/config/omarchy/plugins/omacom.elsewhen") == "$(readlink "$plugin")" ]] || fail "fresh installs use the same package 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 link to the package"
|
pass "migration and fresh installs rely on the packaged plugin directory"
|
||||||
|
|
||||||
expected=$'package elsewhen\nshell rescanPlugins\nshell putBarWidget omacom.elsewhen {"before":"omarchy.clock"}'
|
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")"
|
[[ $(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
|
run_migration
|
||||||
[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "migration can be rerun"
|
[[ $(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 -p "$plugin"
|
||||||
mkdir "$plugin"
|
|
||||||
printf 'local work\n' >"$plugin/notes"
|
printf 'local work\n' >"$plugin/notes"
|
||||||
run_migration
|
run_migration
|
||||||
[[ ! -L $plugin && $(cat "$plugin/notes") == "local work" ]] || fail "existing checkout is preserved"
|
[[ ! -L $plugin && $(cat "$plugin/notes") == "local work" ]] || fail "existing checkout is preserved"
|
||||||
|
|||||||
Reference in new issue
Block a user