feat: add catppuccin nim-style fallback prompt and overhaul right prompt #47

Merged
rootiest merged 9 commits from feat/catppuccin-fallback-prompt into main 2026-06-12 04:57:37 +00:00
Owner

Summary

  • New functions/fish_prompt.fish — Catppuccin Mocha nim-style two-line fallback prompt with zero external dependencies. Activates automatically when Starship is absent or C3 overrides (__fish_config_op_overrides) are disabled. Shows user@host:path, git branch in pink, vi-mode indicator, venv, and background jobs; connector lines switch green↔red on exit status.
  • New functions/fish_mode_prompt.fish — empty stub that suppresses fish's default vi-mode prefix (which would double-print the indicator alongside the one built into the fallback prompt).
  • Overhauled functions/fish_right_prompt.fish — fixed $status capture (was being clobbered before it was read), removed blanket C3 guard so the right prompt renders in all modes, removed Docker context and nerd-font dependency. Now always shows: ✘ N in Catppuccin red when the last command failed (hidden on success), followed by a dim timestamp.
  • Docs updated — new ### Catppuccin Fallback Prompt subsection in docs/fish-config.md, component reference and starship entry updated, docs/fish-config.index extended with prompt/theme keywords, README overview updated.

Manual Verification

  • Starship path (no regression): Open a new fish session with starship installed. Confirm the powerline prompt still renders. After running false, confirm the right prompt shows ✘ 1 HH:MM:SS; after true, confirm only the timestamp shows.
  • Fallback prompt — no starship: Run fish -c 'functions -e fish_prompt; source ~/.config/fish/functions/fish_prompt.fish; source ~/.config/fish/functions/fish_mode_prompt.fish; true; fish_prompt; echo ---; false; fish_prompt'. Confirm two-line output with green connectors on the first call and red connectors on the second, and (feat/catppuccin-fallback-prompt) in pink on the first line.
  • Fallback prompt — C3 disabled: set -U __fish_config_op_overrides 0, open a new shell, verify the Catppuccin fallback prompt appears. Reset with set -Ue __fish_config_op_overrides.
  • Right prompt always renders: With C3 disabled (set -U __fish_config_op_overrides 0), run false and confirm the right prompt still shows ✘ 1 HH:MM:SS. Reset afterward.
  • fish_mode_prompt is silent: Run fish -c 'source ~/.config/fish/functions/fish_mode_prompt.fish; fish_mode_prompt | wc -c' and confirm output is 0.
## Summary - **New `functions/fish_prompt.fish`** — Catppuccin Mocha nim-style two-line fallback prompt with zero external dependencies. Activates automatically when Starship is absent or C3 overrides (`__fish_config_op_overrides`) are disabled. Shows user@host:path, git branch in pink, vi-mode indicator, venv, and background jobs; connector lines switch green↔red on exit status. - **New `functions/fish_mode_prompt.fish`** — empty stub that suppresses fish's default vi-mode prefix (which would double-print the indicator alongside the one built into the fallback prompt). - **Overhauled `functions/fish_right_prompt.fish`** — fixed `$status` capture (was being clobbered before it was read), removed blanket C3 guard so the right prompt renders in all modes, removed Docker context and nerd-font dependency. Now always shows: `✘ N` in Catppuccin red when the last command failed (hidden on success), followed by a dim timestamp. - **Docs updated** — new `### Catppuccin Fallback Prompt` subsection in `docs/fish-config.md`, component reference and starship entry updated, `docs/fish-config.index` extended with prompt/theme keywords, README overview updated. ## Manual Verification - [x] **Starship path (no regression):** Open a new fish session with starship installed. Confirm the powerline prompt still renders. After running `false`, confirm the right prompt shows `✘ 1 HH:MM:SS`; after `true`, confirm only the timestamp shows. - [x] **Fallback prompt — no starship:** Run `fish -c 'functions -e fish_prompt; source ~/.config/fish/functions/fish_prompt.fish; source ~/.config/fish/functions/fish_mode_prompt.fish; true; fish_prompt; echo ---; false; fish_prompt'`. Confirm two-line output with green connectors on the first call and red connectors on the second, and `(feat/catppuccin-fallback-prompt)` in pink on the first line. - [x] **Fallback prompt — C3 disabled:** `set -U __fish_config_op_overrides 0`, open a new shell, verify the Catppuccin fallback prompt appears. Reset with `set -Ue __fish_config_op_overrides`. - [x] **Right prompt always renders:** With C3 disabled (`set -U __fish_config_op_overrides 0`), run `false` and confirm the right prompt still shows `✘ 1 HH:MM:SS`. Reset afterward. - [x] **`fish_mode_prompt` is silent:** Run `fish -c 'source ~/.config/fish/functions/fish_mode_prompt.fish; fish_mode_prompt | wc -c'` and confirm output is `0`.
rootiest added 8 commits 2026-06-12 04:50:24 +00:00
rootiest added 1 commit 2026-06-12 04:52:06 +00:00
rootiest merged commit b323fedf49 into main 2026-06-12 04:57:37 +00:00
rootiest deleted branch feat/catppuccin-fallback-prompt 2026-06-12 04:57:37 +00:00
Sign in to join this conversation.