Compare commits
9 Commits
6a4f00a9df
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
39beb2cec4
|
|||
|
36e0309bc9
|
|||
|
09609d6473
|
|||
|
4410db7880
|
|||
|
cd5d707bda
|
|||
|
d5a9500be1
|
|||
|
1efb93fc60
|
|||
|
1275a1ef4a
|
|||
|
1cfc8f1d37
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -122,3 +122,4 @@ mako/*
|
||||
claude/*
|
||||
!claude/CLAUDE.md
|
||||
!claude/settings.json
|
||||
!claude/statusline-command.sh
|
||||
|
||||
@@ -16,7 +16,7 @@ Rules:
|
||||
- keyword comments must include attribution `(@janezicmatej)`
|
||||
|
||||
## Git
|
||||
- all git work MUST happen in sub-agents with `isolation: "worktree"`
|
||||
- commit only when asked or when delegating to agents
|
||||
- agents MUST commit with `--no-gpg-sign`
|
||||
|
||||
## Workflow
|
||||
|
||||
@@ -7,8 +7,12 @@
|
||||
]
|
||||
},
|
||||
"hooks": {},
|
||||
"voiceEnabled": true,
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "sh \"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/statusline-command.sh\""
|
||||
},
|
||||
"effortLevel": "xhigh",
|
||||
"skipDangerousModePermissionPrompt": true,
|
||||
"effortLevel": "high",
|
||||
"voiceEnabled": true,
|
||||
"mcpServers": {}
|
||||
}
|
||||
|
||||
52
claude/statusline-command.sh
Normal file
52
claude/statusline-command.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
input=$(cat)
|
||||
|
||||
model=$(echo "$input" | jq -r '.model.display_name // empty')
|
||||
total_in=$(echo "$input" | jq -r '.context_window.total_input_tokens // 0')
|
||||
total_out=$(echo "$input" | jq -r '.context_window.total_output_tokens // 0')
|
||||
ctx=$(echo "$input" | jq -r '.context_window.used_percentage // empty')
|
||||
five_hr=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')
|
||||
five_hr_reset=$(echo "$input" | jq -r '.rate_limits.five_hour.resets_at // empty')
|
||||
seven_day=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty')
|
||||
seven_day_reset=$(echo "$input" | jq -r '.rate_limits.seven_day.resets_at // empty')
|
||||
|
||||
# format seconds until reset as human-readable
|
||||
fmt_remaining() {
|
||||
now=$(date +%s)
|
||||
diff=$(( $1 - now ))
|
||||
[ "$diff" -le 0 ] && return
|
||||
h=$(( diff / 3600 ))
|
||||
m=$(( (diff % 3600) / 60 ))
|
||||
if [ "$h" -gt 0 ]; then
|
||||
printf '%dh%dm' "$h" "$m"
|
||||
else
|
||||
printf '%dm' "$m"
|
||||
fi
|
||||
}
|
||||
|
||||
parts=""
|
||||
|
||||
[ -n "$model" ] && parts="$model"
|
||||
|
||||
if [ -n "$total_in" ] && [ "$total_in" != "0" ]; then
|
||||
total=$((total_in + total_out))
|
||||
parts="${parts:+$parts | }tokens:${total}"
|
||||
fi
|
||||
|
||||
if [ -n "$ctx" ]; then
|
||||
parts="${parts:+$parts | }ctx:$(printf '%.0f' "$ctx")%"
|
||||
fi
|
||||
|
||||
if [ -n "$five_hr" ]; then
|
||||
five_hr_ttl=""
|
||||
[ -n "$five_hr_reset" ] && five_hr_ttl=$(fmt_remaining "$five_hr_reset")
|
||||
parts="${parts:+$parts | }5h:$(printf '%.0f' "$five_hr")%${five_hr_ttl:+($five_hr_ttl)}"
|
||||
fi
|
||||
|
||||
if [ -n "$seven_day" ]; then
|
||||
seven_day_ttl=""
|
||||
[ -n "$seven_day_reset" ] && seven_day_ttl=$(fmt_remaining "$seven_day_reset")
|
||||
parts="${parts:+$parts | }7d:$(printf '%.0f' "$seven_day")%${seven_day_ttl:+($seven_day_ttl)}"
|
||||
fi
|
||||
|
||||
[ -n "$parts" ] && printf '%s' "$parts"
|
||||
@@ -2,16 +2,18 @@
|
||||
for_window [floating] border pixel $border
|
||||
for_window [tiling] border normal $border
|
||||
|
||||
for_window [app_id="com.mitchellh.ghostty" title="fastfetch"] floating enable, focus, move position 50 50
|
||||
|
||||
# workspace assignment
|
||||
assign [app_id="google-chrome"] workspace 2
|
||||
assign [app_id="thunderbird"] workspace 3
|
||||
assign [app_id="Cider"] workspace 4
|
||||
assign [app_id=".*BoltLauncher.*"] workspace 5
|
||||
assign [class="net-runelite.*"] workspace 5
|
||||
assign [app_id="vesktop"] workspace 8
|
||||
assign [app_id="discord"] workspace 8
|
||||
assign [app_id="Slack"] workspace 8
|
||||
assign [app_id="org.telegram.desktop"] workspace 8
|
||||
assign [class="Rocket.Chat"] workspace 8
|
||||
assign [app_id="Rocket.Chat"] workspace 8
|
||||
|
||||
# rules
|
||||
for_window [app_id="com.gabm.satty"] fullscreen enable
|
||||
|
||||
@@ -8,12 +8,12 @@ exec ~/.config/sway/scripts/power-aware-effects.sh
|
||||
exec protonmail-bridge -n
|
||||
|
||||
# traditional "start when os starts" programs
|
||||
exec $term
|
||||
exec ghostty --title=fastfetch --window-width=105 --window-height=27 -e bash -c 'nix run nixpkgs#fastfetch; read -rsn1' && ghostty
|
||||
exec $browser
|
||||
exec thunderbird
|
||||
exec cider-2
|
||||
exec bolt-launcher
|
||||
exec vesktop
|
||||
exec discord
|
||||
exec slack
|
||||
exec Telegram
|
||||
exec rocketchat-desktop
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
output DP-7 resolution 2560x1440 position 0,0
|
||||
output eDP-1 resolution 2560x1600@165Hz position 2560,0 adaptive_sync on
|
||||
output DP-7 resolution 2560x1440 position 2560,-1200
|
||||
output eDP-1 resolution 2560x1600@165Hz position 0,0 adaptive_sync on
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
|
||||
# screenshot focused monitor with satty
|
||||
output=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')
|
||||
grim -o "$output" - | satty -f - --fullscreen
|
||||
grim -o "$output" - | satty -f - --fullscreen --early-exit
|
||||
|
||||
|
||||
@@ -31,3 +31,6 @@ export CLIPHIST_DB_PATH="/tmp/cliphist-db"
|
||||
|
||||
# fzf
|
||||
export FZF_DEFAULT_OPTS="--cycle --bind 'tab:toggle-up,btab:toggle-down' --pointer '>' --color '16' --border 'double' --ansi --highlight-line --header 'Navigate with ARROW KEYS or TAB/S-TAB. Select with ENTER.'"
|
||||
|
||||
# ephvm
|
||||
export EPHVM_FLAKE="/home/matej/git/git.janezic.dev/janezicmatej/matej.nix"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
alias z="exec zsh"
|
||||
alias t=tmux_attach
|
||||
alias e="bash /home/matej/git/git.janezic.dev/janezicmatej/matej.nix/scripts/ephvm-run.sh"
|
||||
|
||||
alias n=nvim
|
||||
|
||||
@@ -36,7 +37,7 @@ alias gcm='git checkout $(git_main_branch)'
|
||||
alias gsw="git switch"
|
||||
|
||||
# git fetch/pull/push
|
||||
alias gfa="git fetch --all --prune"
|
||||
alias gfa="git fetch --all --prune --tags"
|
||||
alias gl="git pull"
|
||||
alias gp="git push"
|
||||
alias gpf="git push --force-with-lease"
|
||||
|
||||
Reference in New Issue
Block a user