Files
omarchycn/migrations/1785002349.sh
T
David Heinemeier HanssonandClaude Opus 5 195df4f5c7 Repair Neovim theme symlinks the earlier relink missed
1781158082.sh matched an explicit list of three legacy spellings for
~/.config/nvim/lua/plugins/theme.lua. At least one more exists in the
wild -- "../../../../.config/omarchy/current/theme/neovim.lua" -- so
those installs fell through the case, kept a dangling link, and Neovim
loaded no colorscheme spec at all. The failure looks theme-specific
because it only surfaces when you next switch themes.

Editing that migration would not help anyone, since it is already marked
applied. Add a new one that matches the shared suffix instead of an
enumerated list, so every spelling of the pre-state-dir path is caught.
It exits early when the link already points at the state directory and
ignores targets outside omarchy/current, leaving custom links alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LjeyQZsNBxqyYy9z8KaKm7
2026-07-25 11:04:55 -07:00

23 lines
864 B
Bash

echo "Repair Neovim theme symlinks the earlier relink missed"
theme_link="$HOME/.config/nvim/lua/plugins/theme.lua"
current_absolute_target="$HOME/.local/state/omarchy/current/theme/neovim.lua"
current_relative_target="../../../../.local/state/omarchy/current/theme/neovim.lua"
[[ -L $theme_link ]] || exit 0
target=$(readlink "$theme_link") || exit 0
# Already pointing at the state directory.
[[ $target == "$current_relative_target" || $target == "$current_absolute_target" ]] && exit 0
# 1781158082.sh matched an explicit list of legacy spellings and missed at least
# one ("../../../../.config/omarchy/current/theme/neovim.lua"), leaving those
# links dangling. Match the shared suffix instead so every spelling is repaired.
case "$target" in
*/omarchy/current/theme/neovim.lua) ;;
*) exit 0 ;;
esac
ln -sfn "$current_relative_target" "$theme_link"