Fun Pet Zsh theme
I complain a lot. Mostly at my terminal.
Why doesn't it tell me I need to rebase? Why can't it just show me what changed? Why do I have to type out a command every single time I want to see the state of my own repo?
Every time I run git status, I question myself. Every time I rebase, I wonder why I had to check first. The information is right there; git knows it. My prompt just doesn't say anything.
On top of that, my terminal was bland. So I decided to try building my own zsh theme.
I have very limited design experience, and building zsh theme.
The goal was simple: keep the moving parts separate (the core code, the ranks, the configuration), and treat everything else as UI. Most of the real work turned out to be picking colors and finding Unicode symbols that display correctly in every terminal. Emoji were out; they rendered inconsistently and looked like too much.
What it does
The prompt is two lines. The top line shows a pet, and the bottom line shows where I am:
◆ Chaos Pirate Bear of a Thousand Commits ▌ ▰▰▰▰ 40 commits | <file changes> | <commits ahead>
~/projects/partner-api ▌ ⎇ main ▌ ❯Every branch hatches its own pet. A new branch starts as an egg. As I commit, it evolves (I watched too much Digimon as a kid):
- Egg at 0 commits
- Fox at 1+
- Bard Fox at 5+, when it picks up a class
- Cursed Bard Fox at 15+, when it earns a rank
- Cursed Bard Fox the Bug Slayer at 30+, when it becomes a legend
The pet is picked from the repo and branch name, so it's the same every time I come back. It only counts my commits since I branched off, so merging main in doesn't inflate it, and a teammate's commits don't count. Ranks mix classic fantasy (Grand, Elder), old gods (Void, Eldritch, Forgotten).
On a productive day, it catches fire. After more than 5 commits in a day, the badge turns to dark-red embers.
The git basics are always visible. The branch block turns amber when I have uncommitted changes, with + for staged, * for modified and ? for untracked files. A failed command shows its exit code in red without hiding the pet.
