From 09631b3530475cefebed2cd278c09eedf9d8c712 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 1 Feb 2026 18:32:53 +0000 Subject: [PATCH] Add Claude Code settings and alias - Add cc alias for claude --internet - Add Claude settings.json with plugins and statusline config - Add custom statusline.sh script with context usage display --- dot_bash_aliases | 1 + dot_claude/executable_statusline.sh | 17 +++++++++++++++++ dot_claude/settings.json | 17 +++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 dot_claude/executable_statusline.sh create mode 100644 dot_claude/settings.json diff --git a/dot_bash_aliases b/dot_bash_aliases index e3691c9..8781118 100644 --- a/dot_bash_aliases +++ b/dot_bash_aliases @@ -556,3 +556,4 @@ alias calicoctl="kubectl exec -i -n kube-system calicoctl -- /calicoctl" alias ss-tunnel="snap run shadowsocks-libev.ss-tunnel" alias ss-local="snap run shadowsocks-libev.ss-local" alias cr="cargo run" +alias cc="claude --internet" diff --git a/dot_claude/executable_statusline.sh b/dot_claude/executable_statusline.sh new file mode 100644 index 0000000..840c385 --- /dev/null +++ b/dot_claude/executable_statusline.sh @@ -0,0 +1,17 @@ +#!/bin/bash +input=$(cat) + +MODEL=$(echo "$input" | jq -r '.model.display_name // "Claude"') +PERCENT_USED=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | xargs printf "%.1f") + +# Color coding based on context usage +if (( $(echo "$PERCENT_USED > 80" | bc -l) )); then + COLOR="\033[31m" # Red for high usage +elif (( $(echo "$PERCENT_USED > 50" | bc -l) )); then + COLOR="\033[33m" # Yellow for moderate usage +else + COLOR="\033[32m" # Green for low usage +fi +RESET="\033[0m" + +echo -e "[$MODEL] ${COLOR}Context: ${PERCENT_USED}%${RESET}" diff --git a/dot_claude/settings.json b/dot_claude/settings.json new file mode 100644 index 0000000..fedd89f --- /dev/null +++ b/dot_claude/settings.json @@ -0,0 +1,17 @@ +{ + "env": { + "DISABLE_AUTOUPDATER": "1" + }, + "statusLine": { + "type": "command", + "command": "~/.claude/statusline.sh", + "padding": 0 + }, + "enabledPlugins": { + "code-simplifier@claude-plugins-official": true, + "llm-rules@Meta": true, + "meta@Meta": true, + "ralph-loop@claude-plugins-official": true, + "trajectory@Meta": true + } +}