This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Navin's custom Claude Code statusline. Inspired by claude-hud and many others. | |
| # | |
| # Put this script at `~/.claude/statusline.sh` and add the following to your | |
| # `~/.claude/settings.json`: | |
| # | |
| # ```json | |
| # "statusLine": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git_branch = | |
| case System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]) do | |
| {branch, 0} -> String.trim(branch) | |
| _ -> "" | |
| end | |
| db_suffix = | |
| if git_branch == "main" do | |
| "" | |
| else |