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.
- install and setup Go
- install libgit2 development packages
- run
go get github.com/reujab/bronze
- download a binary on the releases page
- add binary to
PATH
environment variable
On macOS, you will have to do a bit more:
- install Homebrew
- run
brew install coreutils
- add
alias date="gdate"
to your shell rc
Now 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
- source code for the
packages
module daemon
- source code for the
packagesd.service
- a systemd service file
- can be placed in
/usr/lib/systemd/system/
- can be enabled with
systemctl enable packagesd
- can be started with
systemctl start packagesd
static/
ab0x.go
- a file automatically generated with
go generate
- contains the shell script files that are printed when running
bronze init
- a file automatically generated with
types/
main.go
- exports types that are useful when create a custom segment
cmdtime.go
- source code for the
cmdtime
module
- source code for the
dir.go
- source code for the
dir
module
- source code for the
env.go
- source code for the
env
module
- source code for the
git.go
- source code for the
git
module
- source code for the
icons.go
- initializes every icon based on
BRONZE_ICONS
and other environment variables
- initializes every icon based on
init.bash
- bootstraps prompt for Bash
init.fish
- bootstraps prompt for fish
init.go
- source code for the
init
subcommand
- source code for the
init.zsh
- bootstraps prompt for Zsh
main.go
- parses command line arguments
modules.go
- contains logic that determines which module function to call
os.go
- source code for the
os
module
- source code for the
packages.go
- source code for the
packages
module
- source code for the
plugin.go
- source code for the
plugin
module - invokes code from dynamic libraries (
.so
files)
- source code for the
print.go
- source code for the
print
subcommand
- source code for the
sh.go
- contains shell-specific code
status.go
- source code for the
status
module
- source code for the
time.go
- source code for the
time
module
- source code for the
user.go
- source code for the
user
module
- source code for the