No description
- Go 95.5%
- Makefile 3.7%
- Nix 0.8%
| presets | chore: full refactor & custom config parser | |
| .gitignore | chore: full refactor & custom config parser | |
| color.go | chore: full refactor & custom config parser | |
| devenv.lock | chore: full refactor & custom config parser | |
| devenv.nix | chore: full refactor & custom config parser | |
| devenv.yaml | chore: full refactor & custom config parser | |
| exec.go | chore: full refactor & custom config parser | |
| go.mod | chore: change project name | |
| main.go | chore: full refactor & custom config parser | |
| Makefile | chore: full refactor & custom config parser | |
| prompt.go | chore: full refactor & custom config parser | |
| README.md | chore: full refactor & custom config parser | |
grompt
makes your shell prompt not look like garbage. zero deps. one config file.
starship.rs is bloated garbage this is the antidote.
Install
curl -sSL https://codeberg.org/estebxn/grompt/raw/branch/master/install.sh | bash
or clone it and make build.
Config
first run generates ~/.config/grompt for you. override with $GROMPT_CONFIG or $CONFIG_PATH if you're fancy.
old grompt.json files still work.
Format
plain text, one segment per line. # for comments.
# env vars
$USER
# internal variables
{dir} # just the folder name
{pwd} # full path (~/foo/bar)
{spwd} # shortened path (~/f/bar)
{hostname}
{git_branch}
# colors and styles
fg:green # foreground (name or #hex)
bg:red # background
c:bold # style
c:reset # back to normal
# run stuff
exec:date +%H:%M
# git conditionals
?clean ✓
?dirty ✗
# multiline conditionals
?dirty {
fg:red
✗
}
# text
@ # anything else is literal
\s # space
\t # tab
colors: black, red, green, yellow, blue, magenta, cyan, white, bright_black, bright_red and so on. also fg:#RRGGBB and bg:#RRGGBB.
styles: bold, dim, italic, underline, blink, reverse, hidden, strike.
Shell Integration
bash - in .bashrc:
PROMPT_COMMAND='PS1="$(grompt | perl -pe '\''s/\x1b\[([0-9;]*m)/\\[\\e[1ドル\\]/g'\'')"'
zsh - in .zshrc:
PROMPT='$(grompt)'
fish - in ~/.config/fish/functions/fish_prompt.fish:
function fish_prompt
grompt
end
dash - in .profile:
PS1='$(grompt)'
Presets
see presets.