From c3cd129478fa44552ec7b6603f7c0a0cd6c92934 Mon Sep 17 00:00:00 2001 From: Brian Pooe Date: Mon, 6 Jul 2026 21:17:37 +0200 Subject: [PATCH] feat: manage bat and Claude Code configs; add --unlink mode - New managed configs: .config/bat (ANSI theme so bat follows the terminal palette) and .claude/settings.json, with a .gitignore guard so only settings.json under .claude/ is trackable. - dotfiles.sh: drive linking from a single link map and add unlink_dotfiles; install.sh grows --unlink to cleanly remove every symlink pointing into the repo. Co-Authored-By: Claude Fable 5 --- .claude/settings.json | 7 +++++++ .config/bat/config | 5 +++++ .gitignore | 5 +++++ install/install.sh | 10 ++++++++- install/lib/dotfiles.sh | 46 ++++++++++++++++++++++++++++++++--------- 5 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 .claude/settings.json create mode 100644 .config/bat/config diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..f829d01 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,7 @@ +{ + "effortLevel": "medium", + "tui": "fullscreen", + "skipDangerousModePermissionPrompt": true, + "theme": "dark", + "model": "claude-fable-5[1m]" +} diff --git a/.config/bat/config b/.config/bat/config new file mode 100644 index 0000000..d0982f1 --- /dev/null +++ b/.config/bat/config @@ -0,0 +1,5 @@ +# Follow the terminal's ANSI palette so bat matches the active Kanagawa +# variant instead of shipping its own colorscheme. +--theme="ansi" +--style="numbers,changes,header" +--italic-text=always diff --git a/.gitignore b/.gitignore index 3c831ff..d0b88d6 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ nvim.log # Track only the managed application configurations. .config/* +!.config/bat/ !.config/nvim/ !.config/lazygit/ !.config/starship/ @@ -34,3 +35,7 @@ nvim.log # Track only the ssh client config — never keys or anything else. .ssh/* !.ssh/config + +# Track only Claude Code settings — never history, sessions, or caches. +.claude/* +!.claude/settings.json diff --git a/install/install.sh b/install/install.sh index b833f06..e1c5876 100755 --- a/install/install.sh +++ b/install/install.sh @@ -15,6 +15,7 @@ # install/install.sh Full install # install/install.sh --packages-only Only packages/tools (apt + brew) # install/install.sh --dotfiles-only Only link dotfiles + tpm/nvm + chsh +# install/install.sh --unlink Remove symlinks pointing into this repo # install/install.sh --help set -eEo pipefail @@ -28,7 +29,7 @@ source "$SCRIPT_DIR/lib/fonts.sh" source "$SCRIPT_DIR/lib/dotfiles.sh" usage() { - sed -n '2,18p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//' + sed -n '2,19p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//' } MODE=all @@ -36,6 +37,7 @@ for arg in "$@"; do case $arg in --packages-only) MODE=packages ;; --dotfiles-only) MODE=dotfiles ;; + --unlink) MODE="unlink" ;; -h | --help) usage exit 0 @@ -53,6 +55,12 @@ preflight() { } main() { + # Unlinking only removes symlinks; skip preflight and the closing hints. + if [[ $MODE == unlink ]]; then + unlink_dotfiles + return + fi + preflight case $MODE in diff --git a/install/lib/dotfiles.sh b/install/lib/dotfiles.sh index aa0914e..4ee4196 100644 --- a/install/lib/dotfiles.sh +++ b/install/lib/dotfiles.sh @@ -1,20 +1,46 @@ #!/bin/bash # Symlink the dotfiles into ~ and ~/.config; switch login shell to zsh. +# Each entry: "|". +# Drives both link_dotfiles and unlink_dotfiles — add new links here. +dotfile_links() { + cat <