[Sync] Lua Hyprland chain, licence cleanup
This commit is contained in:
1 parent
93b4f695ce
commit
47166d877f
183 files changed
+5618
-5839
No files matched your search
@@ -41,6 +41,16 @@ items="settings.json statusline.py keybindings.json CLAUDE.md hooks skills"
|
||||
# Expose each item in ~/.claude (where Claude actually reads).
|
||||
for item in $items; do
|
||||
[ -e "$SRC/$item" ] || continue
|
||||
# Files link straight at the repo copy, not through ~/.config/claude: Claude Code
|
||||
# resolves ONE symlink hop, then writes atomically (temp + rename) at that path —
|
||||
# verified on 2.1.296 with `claude plugin disable` against a scratch CLAUDE_CONFIG_DIR.
|
||||
# Through a ~/.claude -> ~/.config/claude -> repo chain, every settings write (/model,
|
||||
# effort, plugins, /config) swapped the middle link for a plain file and severed the
|
||||
# repo. One hop puts the rename inside the checkout, so both links survive. A SRC file
|
||||
# that already drifted into a plain file keeps being the target (it may hold the newest
|
||||
# edits) until the drift guard below is reconciled. Dirs keep the stow path.
|
||||
target="$SRC/$item"
|
||||
[ -f "$repo/$item" ] && [ -L "$SRC/$item" ] && target="$repo/$item"
|
||||
if [ -d "$DST/$item" ] && [ ! -L "$DST/$item" ]; then
|
||||
echo "skip ~/.claude/$item (real directory in the way — move it aside first)" >&2
|
||||
continue
|
||||
@@ -62,14 +72,14 @@ for item in $items; do
|
||||
if [ "$same" != 1 ]; then
|
||||
echo "DRIFT ~/.claude/$item is a real file that differs from the repo copy —" >&2
|
||||
echo " it may hold newer edits. Review, then re-link:" >&2
|
||||
echo " diff '$DST/$item' '$SRC/$item' # compare; keep whichever is right" >&2
|
||||
echo " ln -sfn '$SRC/$item' '$DST/$item' # re-link" >&2
|
||||
echo " diff '$DST/$item' '$target' # compare; keep whichever is right" >&2
|
||||
echo " ln -sfn '$target' '$DST/$item' # re-link" >&2
|
||||
continue
|
||||
fi
|
||||
echo "healed ~/.claude/$item (plain copy identical to repo — re-linking)"
|
||||
fi
|
||||
ln -sfn "$SRC/$item" "$DST/$item"
|
||||
echo "linked ~/.claude/$item -> ~/.config/claude/$item"
|
||||
ln -sfn "$target" "$DST/$item"
|
||||
echo "linked ~/.claude/$item -> ${target/#$HOME/\~}"
|
||||
done
|
||||
|
||||
# Stow-layer drift guard: each SRC *file* should be a symlink into the repo, so edits
|
||||
|
||||
Reference in new issue
Block a user