claude/hooks
Bastien Chanot cb1e8cd814 feat(profile,statusline): show active profile in statusline via .active-profile cache
`bash lib/profile.sh current` is 12s+ — far too slow to call from the
statusline hook (runs on every keystroke). Add a one-line cache file at
`<repo>/.active-profile`, written by `cmd_apply` and `cmd_reset`. The
statusline reads the file directly with a single `head -n1`, no
sub-shell into `profile.sh`.

Behavior:
- `bash lib/profile.sh set <name>` (which ends in `cmd_apply`) and
  `bash lib/profile.sh apply <name>` both write `<name>` to
  `<repo>/.active-profile`.
- `bash lib/profile.sh reset` writes the literal `none`.
- Statusline inserts the cached profile name between the plan segment
  and the context-bar segment, e.g.
  `Opus 4.7 | claude (master) | Max | full | ████░░░░░░ 42% | 3m`.
- Missing or empty cache → statusline shows `?`.

Cache file is gitignored — it tracks runtime state, not source.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-21 05:14:12 +02:00
..
.rtk-hook.sha256 audit fixes: RTK hook, settings unification, graphifyy, statusline 2026-04-12 13:28:30 +02:00
rtk-rewrite.sh audit fixes: RTK hook, settings unification, graphifyy, statusline 2026-04-12 13:28:30 +02:00
session-start.sh fix(install,session-start): enable always-on plugins + truthful banner 2026-05-03 23:03:21 +02:00
statusline.sh feat(profile,statusline): show active profile in statusline via .active-profile cache 2026-05-21 05:14:12 +02:00