This commit is contained in:
Miguel Palhas
2026-03-18 09:41:46 +00:00
parent c9f554e276
commit a8e27ee9d3
6 changed files with 53 additions and 25 deletions
+7
View File
@@ -11,6 +11,9 @@
bubblewrap
socat
libseccomp
# voice
sox
];
# Commands
@@ -43,6 +46,10 @@
home.file.".claude/skills/worktree-compare/SKILL.md".source = ./skills/worktree-compare/SKILL.md;
home.file.".claude/skills/worktree-list/SKILL.md".source = ./skills/worktree-list/SKILL.md;
home.file.".claude/statusline.sh" = {
source = ./statusline.sh;
executable = true;
};
home.file.".claude/settings.json".source = ./settings.json;
home.file.".claude/CLAUDE.md".source = ./CLAUDE.md;
}
@@ -40,6 +40,7 @@
"release-assets.githubusercontent.com"
]
},
"voiceEnabled": true,
"defaultMode": "acceptEdits",
"feedbackSurveyState": {
"lastShownTime": 1754052643456
@@ -54,5 +55,9 @@
"url": "https://mcp.linear.app/mcp"
}
},
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh"
},
"$schema": "https://json.schemastore.org/claude-code-settings.json"
}
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
input=$(cat)
# Extract values from JSON input
MODEL=$(echo "$input" | jq -r '.model.display_name // "Claude"')
DIR=$(echo "$input" | jq -r '.workspace.current_dir // "~"')
DIR_NAME="${DIR##*/}"
CONTEXT_USED=$(echo "$input" | jq -r '.context_window.used_percentage // 0')
COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
# Get git repo root path (abbreviated with ~) and branch/PR info
GIT_INFO=""
REPO_PATH=""
if git -C "$DIR" rev-parse --git-dir > /dev/null 2>&1; then
REPO_ROOT=$(git -C "$DIR" rev-parse --show-toplevel 2>/dev/null)
# For worktrees, get the main repo root instead of the worktree path
MAIN_GIT_DIR=$(git -C "$DIR" rev-parse --git-common-dir 2>/dev/null)
if [ -n "$MAIN_GIT_DIR" ] && [[ "$MAIN_GIT_DIR" == /* ]]; then
REPO_ROOT=$(dirname "$MAIN_GIT_DIR")
fi
# Abbreviate ~/projects/ to p/
REPO_PATH=" | ${REPO_ROOT/#$HOME\/projects\//p/}"
BRANCH=$(git -C "$DIR" branch --show-current 2>/dev/null)
if [ -n "$BRANCH" ]; then
PR_NUMBER=$(GIT_DIR="$DIR/.git" GIT_WORK_TREE="$DIR" gh pr view --json number -q '.number' 2>/dev/null)
if [ -n "$PR_NUMBER" ]; then
GIT_INFO=" | $BRANCH (#$PR_NUMBER)"
else
GIT_INFO=" | $BRANCH"
fi
fi
fi
# Format cost
COST_FMT=$(printf "%.2f" "$COST")
echo "YOLO$REPO_PATH$GIT_INFO | [$MODEL] | \$$COST_FMT | ${CONTEXT_USED}%"
-22
View File
@@ -24,10 +24,6 @@
# Update Hyprland cursor theme
${pkgs.hyprland}/bin/hyprctl setcursor Nordzy-cursors 24
'';
kitty-theme = ''
# Reload kitty config to pick up noctalia theme changes
kill -SIGUSR1 $(pidof kitty) 2>/dev/null || true
'';
claude-theme = ''
# Switch Claude Code to dark theme
CLAUDE_CONFIG=~/.claude.json
@@ -38,13 +34,6 @@
noctalia-theme = ''
noctalia-shell ipc call darkMode setDark
'';
neovim-theme = ''
for sock in /run/user/$(id -u)/nvim.*.0; do
[ -S "$sock" ] && ${pkgs.neovim}/bin/nvim --server "$sock" \
--remote-expr 'luaeval("require(\"theme-sync\").apply_theme(\"dark\")")' \
2>/dev/null || true
done
'';
};
lightModeScripts = {
gtk-theme = ''
@@ -64,10 +53,6 @@
# Update Hyprland cursor theme
${pkgs.hyprland}/bin/hyprctl setcursor Nordzy-white 24
'';
kitty-theme = ''
# Reload kitty config to pick up noctalia theme changes
kill -SIGUSR1 $(pidof kitty) 2>/dev/null || true
'';
claude-theme = ''
# Switch Claude Code to light theme
CLAUDE_CONFIG=~/.claude.json
@@ -78,13 +63,6 @@
noctalia-theme = ''
noctalia-shell ipc call darkMode setLight
'';
neovim-theme = ''
for sock in /run/user/$(id -u)/nvim.*.0; do
[ -S "$sock" ] && ${pkgs.neovim}/bin/nvim --server "$sock" \
--remote-expr 'luaeval("require(\"theme-sync\").apply_theme(\"light\")")' \
2>/dev/null || true
done
'';
};
};
+1
View File
@@ -7,6 +7,7 @@
{
programs.yazi.enable = true;
programs.yazi.shellWrapperName = "y";
home.packages = with pkgs; [ yaziPlugins.git ];