The re-point of a user plugin link stranded by the elsewhen package moving from plugins/ to shell/plugins/ landed in migration 1789581661, which every machine updated between that migration shipping and the package moving had already applied. omarchy-migrate keys completion on the filename alone, so the repair never ran where it was needed. On a dev checkout the shell discovers the packaged plugin only through that link, and a rescan drops a dangling one, so Elsewhen vanished from the bar on the first shell start after the package upgrade. Renaming the file runs the whole migration again everywhere. Each step is safe to repeat: the package add is a no-op once installed, both link branches are guarded, the rescan is best-effort, and the put keeps an existing placement. The new test holds a state directory with only the old marker and checks the renamed file is still pending, which the old name could not pass.
24 lines
1.0 KiB
Bash
24 lines
1.0 KiB
Bash
echo "Install Elsewhen, the world clock plugin"
|
|
|
|
omarchy-pkg-add elsewhen
|
|
|
|
packaged_plugin="/usr/share/omarchy/shell/plugins/omacom.elsewhen"
|
|
user_plugin="$HOME/.config/omarchy/plugins/omacom.elsewhen"
|
|
|
|
# The package moved from plugins/ to shell/plugins/ once, stranding the link an
|
|
# earlier run made to the old path. A link the user made is left alone.
|
|
if [[ -L $user_plugin && ! -e $user_plugin && $(readlink "$user_plugin") == /usr/share/omarchy/* && -d $packaged_plugin ]]; then
|
|
ln -sfn "$packaged_plugin" "$user_plugin"
|
|
fi
|
|
|
|
# Dev checkouts do not contain plugins installed by system packages.
|
|
if [[ ! $OMARCHY_PATH -ef /usr/share/omarchy && -d $packaged_plugin && ! -e $user_plugin && ! -L $user_plugin ]]; then
|
|
mkdir -p "${user_plugin%/*}"
|
|
ln -s "$packaged_plugin" "$user_plugin"
|
|
fi
|
|
|
|
# Best-effort, like the put below: an update whose shell cannot be asked still
|
|
# finishes, and restarts the shell once the migrations are through.
|
|
omarchy-shell -q shell rescanPlugins
|
|
omarchy-bar put omacom.elsewhen --before omarchy.clock
|