Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.
reujab edited this page Jul 9, 2018 · 28 revisions

Subcommands

init

This subcommand outputs shell script to be evaluated by your shell on startup. Bronze detects your shell with the BRONZE_SHELL environment variable.

print

This subcommand shouldn't be called by the user, but by the code init generates. It outputs the prompt.

Environment variables

BRONZE

This variable is an array of every module, in order, you want in your prompt. The elements in this array have three fields separated by colons. The first field is the module name, the second is the background color of the segment, and the third is the foreground color.

For example, if you wanted the dir module with black text on a blue background, the element would be dir:blue:black.

BRONZE_SHELL

This variable tells bronze what shell you are using. The supported shells are Bash, Zsh, and fish.

BRONZE_SEPARATOR

This variable is the separator between segments. The default value is \ue0b0.

Example with \ue0b4:

Example with \ue0bc:

BRONZE_THIN_SEPARATOR

This variable is the thin separator between segments of the same background color. The default value is \ue0b1.

BRONZE_ICONS

This variable is a preset of every icon. Valid values are nerd, unicode, or ascii. It defaults to nerd. For more information, see Icons.

Modules

Icons

Every icon is completely customizable through environment variables.

There are three presets for icons (which can be set through BRONZE_ICONS):

  • nerd uses icons from Nerd Fonts
  • unicode uses Unicode (mostly emojis)
  • ascii uses only ASCII

The default preset is nerd, but each individual icon can be set with environment variables. The environment variables to set is BRONZE_ICON_[icon name]. For example, if you wanted to set the failed icon to "✗", you would set the environment variable BRONZE_ICON_FAILED to \u2717.

Every icon name can be found on the appropriate module wiki page.

Example configurations

~/.bashrc/~/.zshrc:

export BRONZE_SHELL=$0
BRONZE=(status:black:white dir:blue:black git:green:black cmdtime:magenta:black)
eval "$(bronze init)"

~/.config/fish/config.fish:

set -x BRONZE_SHELL fish
set BRONZE status:black:white dir:blue:black git:green:black cmdtime:magenta:black
eval (bronze init)
Clone this wiki locally