@@ -378,21 +378,51 @@ MIGRATION_TMPDIR=$(mktemp -d)
378378mkdir -p \
379379 " $MIGRATION_TMPDIR /.config/omarchy/current/theme" \
380380 " $MIGRATION_TMPDIR /.config/alacritty" \
381+ " $MIGRATION_TMPDIR /.config/hypr" \
381382 " $MIGRATION_TMPDIR /.config/hyprland-preview-share-picker" \
382383 " $MIGRATION_TMPDIR /.config/btop/themes"
383384printf ' tokyo-night\n' > " $MIGRATION_TMPDIR /.config/omarchy/current/theme.name"
384385printf ' x\n' > " $MIGRATION_TMPDIR /.config/omarchy/current/theme/colors.toml"
385386printf ' general.import = [ "~/.config/omarchy/current/theme/alacritty.toml" ]\n' > " $MIGRATION_TMPDIR /.config/alacritty/alacritty.toml"
386387printf ' stylesheets: ["../omarchy/current/theme/hyprland-preview-share-picker.css"]\n' > " $MIGRATION_TMPDIR /.config/hyprland-preview-share-picker/config.yaml"
388+ cat > " $MIGRATION_TMPDIR /.config/hypr/hyprland.lua" << 'LUA '
389+ package.path = os.getenv("HOME")
390+ .. "/.config/?.lua;"
391+ .. (os.getenv("OMARCHY_PATH") or "/usr/share/omarchy")
392+ .. "/?.lua;"
393+ .. package.path
394+ LUA
387395ln -s " $MIGRATION_TMPDIR /.config/omarchy/current/theme/btop.theme" " $MIGRATION_TMPDIR /.config/btop/themes/current.theme"
388396HOME=" $MIGRATION_TMPDIR " bash -euo pipefail " $ROOT /migrations/user/1781043107.sh" > /dev/null
389397[[ -f $MIGRATION_TMPDIR /.local/state/omarchy/current/theme.name ]] || fail " current theme migration moves theme name"
390398[[ ! -e $MIGRATION_TMPDIR /.config/omarchy/current ]] || fail " current theme migration removes legacy config state"
391399grep -Fq ' ~/.local/state/omarchy/current/theme/alacritty.toml' " $MIGRATION_TMPDIR /.config/alacritty/alacritty.toml" || fail " current theme migration updates alacritty import"
392400grep -Fq ' ../../.local/state/omarchy/current/theme/hyprland-preview-share-picker.css' " $MIGRATION_TMPDIR /.config/hyprland-preview-share-picker/config.yaml" || fail " current theme migration updates relative stylesheet"
401+ grep -Fq ' /.local/state/?.lua;' " $MIGRATION_TMPDIR /.config/hypr/hyprland.lua" || fail " current theme migration keeps Hyprland theme modules discoverable"
393402[[ $( readlink " $MIGRATION_TMPDIR /.config/btop/themes/current.theme" ) == " $MIGRATION_TMPDIR /.local/state/omarchy/current/theme/btop.theme" ]] || fail " current theme migration updates btop symlink"
394403pass " current theme migration moves state and rewrites shipped references"
395404
405+ NVIM_MIGRATION_TMPDIR=$( mktemp -d)
406+ nvim_theme_link=" $NVIM_MIGRATION_TMPDIR /.config/nvim/lua/plugins/theme.lua"
407+ nvim_expected_target=" ../../../../.local/state/omarchy/current/theme/neovim.lua"
408+ nvim_expected_resolved_target=" $NVIM_MIGRATION_TMPDIR /.local/state/omarchy/current/theme/neovim.lua"
409+ mkdir -p \
410+ " $( dirname " $nvim_theme_link " ) " \
411+ " $NVIM_MIGRATION_TMPDIR /.config/omarchy/current/theme" \
412+ " $NVIM_MIGRATION_TMPDIR /.local/state/omarchy/current/theme"
413+ touch " $NVIM_MIGRATION_TMPDIR /.local/state/omarchy/current/theme/neovim.lua"
414+ for nvim_legacy_target in \
415+ " ../../../omarchy/current/theme/neovim.lua" \
416+ " $NVIM_MIGRATION_TMPDIR /.config/omarchy/current/theme/neovim.lua" ; do
417+ ln -sfn " $nvim_legacy_target " " $nvim_theme_link "
418+ HOME=" $NVIM_MIGRATION_TMPDIR " bash -euo pipefail " $ROOT /migrations/user/1781158082.sh" > /dev/null
419+ nvim_actual_target=$( readlink " $nvim_theme_link " )
420+ nvim_resolved_target=$( readlink -f " $nvim_theme_link " )
421+ [[ $nvim_actual_target == $nvim_expected_target ]] || fail " nvim theme migration updates theme symlink"
422+ [[ $nvim_resolved_target == $nvim_expected_resolved_target ]] || fail " nvim theme migration points to current theme"
423+ done
424+ pass " nvim theme migration relinks current theme"
425+
396426cp " $NEXT_THEME /colors.toml" " $CURRENT_THEME /colors.toml"
397427cp " $NEXT_THEME /vscode-theme.json" " $CURRENT_THEME /vscode-theme.json"
398428
0 commit comments