From 7187fabcf8b3b6fd347f0c75a5b4155186dc88c8 Mon Sep 17 00:00:00 2001 From: poprhythm Date: Tue, 24 Feb 2026 02:52:20 +0000 Subject: [PATCH] Add claude config and rework bash dotfile management - Add claude stow package (settings.json, statusline-command.sh) - Replace .bashrc stow with source-injection approach to avoid conflicts with tools like oh-my-bash that want to own ~/.bashrc - Move all bash customizations into .bashrc.omb, sourced conditionally - setup.sh now checks for existing source lines before appending --- claude/.claude/settings.json | 12 ++++++++++++ claude/.claude/statusline-command.sh | 8 ++++++++ setup.sh | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 claude/.claude/settings.json create mode 100644 claude/.claude/statusline-command.sh diff --git a/claude/.claude/settings.json b/claude/.claude/settings.json new file mode 100644 index 0000000..de7a881 --- /dev/null +++ b/claude/.claude/settings.json @@ -0,0 +1,12 @@ +{ + "attribution": { + "commit": "", + "pr": "" + }, + "model": "sonnet", + "alwaysThinkingEnabled": true, + "statusLine": { + "type": "command", + "command": "bash ~/.claude/statusline-command.sh" + } +} diff --git a/claude/.claude/statusline-command.sh b/claude/.claude/statusline-command.sh new file mode 100644 index 0000000..d6799cd --- /dev/null +++ b/claude/.claude/statusline-command.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +input=$(cat) +cwd=$(echo "$input" | jq -r '.workspace.current_dir // .cwd') +chroot_part="" +if [ -n "${debian_chroot:-}" ]; then + chroot_part="(${debian_chroot})" +fi +printf "${chroot_part}\033[01;32m$(whoami)@$(hostname -s)\033[00m:\033[01;34m${cwd}\033[00m" diff --git a/setup.sh b/setup.sh index cbad8e5..432f242 100755 --- a/setup.sh +++ b/setup.sh @@ -34,6 +34,13 @@ ensure_sourced() { # ssh — always available stow_pkg ssh +# claude +if [ -d "$HOME/.claude" ]; then + stow_pkg claude +else + echo "SKIP: claude (~/.claude not found)" +fi + # bash — stow dotfiles, then ensure ~/.bashrc sources them stow_pkg bash ensure_sourced "$HOME/.bashrc.omb"