A cross-shell customizable powerline-like prompt with icons
A cross-shell customizable powerline-like prompt heavily inspired by Agnoster.
There is a new, compatible, 50% faster port of this called silver written in Rust. Silver is compatible with the same configuration as bronze once you rename variables from BRONZE to SILVER ($BRONZE
-> $SILVER
, $BRONZE_SHELL
-> $SILVER_SHELL
, ...). The only main difference is that silver does not support the packages or plugin modules.
Unlike pretty much every other shell prompt, bronze is not written in shell script, but entirely in Go, so all prompt segments are loaded asynchronously for a speed boost.
When bronze init
is run, it outputs shell code that sets your prompt to run bronze prompt
, which outputs the actual prompt. The bronze prompt
command relies on environment variables for configuration.
Since bronze is not written in shell script, it should theoretically be compatible with any shell, but the three supported shells are Bash, Zsh, and fish.
To be able to use the custom icons (which are enabled by default), you must patch your font or install a pre-patched font from Nerd Fonts.
PATH
environment variableOn macOS, you will have to do a bit more:
brew install coreutils
alias date="gdate"
to your shell rcNow that you have bronze installed, you need to configure it. To have your prompt look like the one in the screenshot above, add this to your ~/.bashrc
/~/.zshrc
:
BRONZE=(status:black:white dir:blue:black git:green:black cmdtime:magenta:black)
export BRONZE_SHELL=$SHELL # bash, zsh, or fish
Or add the following to your ~/.config/fish/config.fish
:
set BRONZE status:black:white dir:blue:black git:green:black cmdtime:magenta:black
set -x BRONZE_SHELL fish
Now that bronze is configured, you need to evaluate its bootstrap code.
~/.bashrc
/~/.zshrc
:
eval "$(bronze init)"
~/.config/fish/config.fish
:
eval (bronze init)
Documentation is available on the wiki.
packagesd/
main.go
packages
module daemonpackagesd.service
/usr/lib/systemd/system/
systemctl enable packagesd
systemctl start packagesd
static/
ab0x.go
go generate
bronze init
types/
main.go
cmdtime.go
cmdtime
moduledir.go
dir
moduleenv.go
env
modulegit.go
git
moduleicons.go
BRONZE_ICONS
and other environment variablesinit.bash
init.fish
init.go
init
subcommandinit.zsh
main.go
modules.go
os.go
os
modulepackages.go
packages
moduleplugin.go
plugin
module.so
files)print.go
print
subcommandsh.go
status.go
status
moduletime.go
time
moduleuser.go
user
module