feat(config): user-dots convenience symlink with config-settings toggle #69

Merged
rootiest merged 2 commits from feat-user-dots-symlink into main 2026-07-04 06:36:10 +00:00
Owner

Summary

Adds a git-ignored user-dots symlink in the fish config directory that points at $__fish_user_dots_path, so the private overlay can be browsed from ~/.config/fish/ — plus a dedicated toggle to opt out.

  • Created on interactive startup if missing; repointed if __fish_user_dots_path changes (cheap: one readlink per startup, ln only on mismatch)
  • Only ever manages a symlink — never clobbers a real file/dir at that path
  • Creation is a C2 startup side-effect (__fish_config_op_autoexec); C2 master-off suppresses it like every other C2 item

Dedicated toggle

__fish_user_dots_symlink gets its own control — Dots link on the Paths page of config-settings. Unlike the opinionated categories it has no universal/session split, since it acts on a literal path. Setting it falsy (or toggling off) stops generation and removes any existing link immediately, honoured regardless of the C2 master switch.

Logic lives in the new __fish_user_dots_link helper, called from config.fish and from the TUI on toggle.

Docs

  • README overlay section: symlink + opt-out
  • docs/fish-config.md: C2 table, config-settings Paths page, machine-local section
  • docs/fish-config.index: user-dots / dots-link keywords

Manual Verification

  • rm ~/.config/fish/user-dots, open a new interactive shell → link is recreated pointing at $__fish_user_dots_path
  • ln -sfn /tmp ~/.config/fish/user-dots, open a new shell → link is repointed back to the overlay path
  • config-settingsPaths page shows a Dots link row; toggle it off (←/h) → existing user-dots link is removed immediately
  • With the toggle off, open a new shell → link is not regenerated
  • Toggle it on (→/l) → link is recreated
  • Start a shell with __fish_config_op_autoexec=0 after removing the link → link is not created (C2 gate)
  • With the toggle off, removal still happens even when C2 is enabled
  • Place a real dir at ~/.config/fish/user-dots → it is left untouched (not clobbered)
  • git status shows user-dots is ignored (not tracked)
## Summary Adds a git-ignored `user-dots` symlink in the fish config directory that points at `$__fish_user_dots_path`, so the private overlay can be browsed from `~/.config/fish/` — plus a dedicated toggle to opt out. - Created on interactive startup if missing; repointed if `__fish_user_dots_path` changes (cheap: one `readlink` per startup, `ln` only on mismatch) - Only ever manages a symlink — never clobbers a real file/dir at that path - Creation is a **C2 startup side-effect** (`__fish_config_op_autoexec`); C2 master-off suppresses it like every other C2 item ## Dedicated toggle `__fish_user_dots_symlink` gets its own control — **Dots link** on the **Paths** page of `config-settings`. Unlike the opinionated categories it has no universal/session split, since it acts on a literal path. Setting it falsy (or toggling off) **stops generation and removes any existing link immediately**, honoured regardless of the C2 master switch. Logic lives in the new `__fish_user_dots_link` helper, called from `config.fish` and from the TUI on toggle. ## Docs - README overlay section: symlink + opt-out - `docs/fish-config.md`: C2 table, config-settings Paths page, machine-local section - `docs/fish-config.index`: `user-dots` / `dots-link` keywords ## Manual Verification - [x] `rm ~/.config/fish/user-dots`, open a new interactive shell → link is recreated pointing at `$__fish_user_dots_path` - [x] `ln -sfn /tmp ~/.config/fish/user-dots`, open a new shell → link is repointed back to the overlay path - [x] `config-settings` → **Paths** page shows a **Dots link** row; toggle it **off** (←/h) → existing `user-dots` link is removed immediately - [x] With the toggle off, open a new shell → link is **not** regenerated - [x] Toggle it **on** (→/l) → link is recreated - [x] Start a shell with `__fish_config_op_autoexec=0` after removing the link → link is **not** created (C2 gate) - [x] With the toggle **off**, removal still happens even when C2 is enabled - [x] Place a real dir at `~/.config/fish/user-dots` → it is left untouched (not clobbered) - [x] `git status` shows `user-dots` is ignored (not tracked)
rootiest added 1 commit 2026-07-04 06:24:57 +00:00
Point $__fish_config_dir/user-dots at $__fish_user_dots_path on interactive
startup so the private overlay can be browsed from the fish config dir. The
link is created if missing and repointed if the path variable changes, only
ever managing a symlink (never clobbering a real file/dir). Gated as a C2
startup side-effect (__fish_config_op_autoexec) and git-ignored.

Docs: README overlay section and fish-config.md C2 table updated.
rootiest added 1 commit 2026-07-04 06:34:29 +00:00
Extract the user-dots symlink logic into the __fish_user_dots_link helper and
add a dedicated __fish_user_dots_symlink toggle, surfaced as a 'Dots link' bool
row on the config-settings Paths page. Unlike the opinionated categories it has
no universal/session split — it acts on a literal path.

Setting it falsy (or toggling off) stops symlink generation and removes any
existing link immediately, honoured regardless of the C2 master switch.
Creation remains a C2 startup side-effect. config.fish now calls the helper.

Docs: README, fish-config.md (C2 table, Paths page, machine-local section),
and fish-config.index updated.
rootiest changed title from feat(config): auto-manage user-dots convenience symlink to feat(config): user-dots convenience symlink with config-settings toggle 2026-07-04 06:34:43 +00:00
rootiest merged commit 3362c33339 into main 2026-07-04 06:36:10 +00:00
rootiest deleted branch feat-user-dots-symlink 2026-07-04 06:36:10 +00:00
Sign in to join this conversation.