diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-10 15:01:03 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-10 15:01:03 +0900 |
| commit | 4150ce25e87d8cbf3f067e6aabd8b1e836dbc683 (patch) | |
| tree | 1abf63413ad205728c29272f0f7d772c2476d8c7 /bin | |
| parent | 16cb785971dda429fae4028c3b63de81e3c8f246 (diff) | |
| download | dotfiles-4150ce25e87d8cbf3f067e6aabd8b1e836dbc683.tar.gz dotfiles-4150ce25e87d8cbf3f067e6aabd8b1e836dbc683.tar.zst dotfiles-4150ce25e87d8cbf3f067e6aabd8b1e836dbc683.zip | |
claude: set up statusline
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/__claude-code-notify | 2 | ||||
| -rwxr-xr-x | bin/__claude-code-statusline | 9 | ||||
| -rwxr-xr-x | bin/tmux-pane-idx | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/bin/__claude-code-notify b/bin/__claude-code-notify index 2d76b99..60d3454 100755 --- a/bin/__claude-code-notify +++ b/bin/__claude-code-notify @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash message="$(jq -r '.message // "Task completed"')" if [ "$(uname)" = "Darwin" ]; then diff --git a/bin/__claude-code-statusline b/bin/__claude-code-statusline new file mode 100755 index 0000000..2004db6 --- /dev/null +++ b/bin/__claude-code-statusline @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# https://docs.anthropic.com/en/docs/claude-code/statusline + +input="$(cat)" +cwd="$(echo "$input" | jq -r '.cwd')" +model="$(echo "$input" | jq -r '.model.display_name')" + +echo "[$model] ${cwd/#$HOME/\~}" diff --git a/bin/tmux-pane-idx b/bin/tmux-pane-idx index 7da534f..40a6184 100755 --- a/bin/tmux-pane-idx +++ b/bin/tmux-pane-idx @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Prints the tmux pane index. tmux display -pt "${TMUX_PANE:?}" '#{pane_index}' |
