6 Style Options

In this category you’ll find various options regarding the prompt style and colors.

BashStyle-NG Style Settings part 1

Figure 6.1: Style Settings

BashStyle-NG Style Settings part 2

Figure 6.2: Style Settings (continuation)

Basic

Setting: use_bashstyle Use BashStyle-NG

This is the master switch that will let BashStyle-NG modify your prompts according to your choices in the Style and Advanced Options. Other categories have their own master switches and work independently.

Setting: enable_colors Colored Prompts

If active the user will be presented with fancy colorful prompts, else the they will be monochrome. For terminals that can handle 256 (or more) colors a variety of different shades of blue, green, red and more are pre-defined and used. If on a terminal that can’t handle those (eg. the Linux console) those shades are set to their base color (so all shades of blue become the default blue and so on), thus ensuring full compatibility with all terminals.

Setting: Colors

BashStyle-NG provides the following color definitons

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

for all terminals. The following color definitions are only available on terminals that support 256 (or more) colors, else they are definied to the closest match from the above list.

  • coldblue
  • smoothblue
  • iceblue
  • turqoise
  • smoothgreen
  • winered
  • brown
  • silver
  • ocher
  • orange
  • purple
  • pink
  • cream

For prompt parts the following variables are declared that contain one of the color definitions for easier re-coloring of the prompts

  • color_user
  • color_host
  • color_date
  • color_time
  • color_wdir
  • color_font
  • color_separator
  • color_uptime
  • color_ps
  • color_ps2
  • color_ps3
  • color_ps4

All of the above definitions are available in echo -e friendly varaints with a prepended e, for example ewhite or eiceblue. For LS_COLORS compatibility they are prepended with a l, for example lred or lorange.

Setting: dark_terminal Dark Terminal Background

If this is enabled black/eblack will turn white, so the text stays visible, if this is disabled then white/ewhite will black instead.

Colors

Setting: colorshell Randomly colored text

The user input at the prompt will be colored with a random color after every prompt reload.

Setting: colorshell_reset Normal text color for output

The Randomly colored text option will not reset the color before any command’s output is display. This can be achieved by activating this option.

Setting: color_style Choose Color Style

Bash is capable of drawing the colors in different ways

  • Normal
  • Bright (equals to bold)
  • Dimmed
  • Inverted
  • Underlined

Your choice here effects a all prompt styles and most scripts provided by BashStyle-NG.

Setting: color_font Color for Text

This sets the color for the for text (ignored if random colored text is enabled)

Setting: color_date Color for Date

This sets the color for the date in prompts.

Setting: color_time Color for Time

This sets the color for the time in prompts.

Setting: color_user Color for Username

This sets the color for the username in prompts.

Setting: color_host Color for Hostname

This sets the color for the hostname in prompts.

Setting: color_wdir Color for Workdir

This sets the color for the current directory in prompts.

Setting: color_uptime Color for Uptime

This sets the color for the machine’s uptime in prompts.

Setting: color_separator Color for Separators

This sets the color for prompt parts that separate the other prompt parts from each other.

Setting: color_ps Color for Misc. Elements

This sets the color for misc. prompt parts, like external command output.

Setting: color_ps0 Color for PS0

This sets the color for the PS0 sub prompt.

Setting: color_ps2 Color for PS2

This sets the color for the PS2 sub prompt.

Setting: color_ps3 Color for PS3

This sets the color for the PS3 sub prompt.

Setting: color_ps4 Color for PS4

This sets the color for the PS4 sub prompt.

Style

Setting: prompt_style Choose Promptstyle

This sets the prompt style for PS1, one of

  • Separator
  • Vector
  • Floating Clock
  • Equinox
  • Elite
  • Poweruser
  • Dirks
  • Dot.Prompt
  • Sepa-NG
  • Quirk
  • Sputnik
  • Ayoli
  • None

Use None if you want to leave PROMPT_COMMAND and PS1 unset, eg.: when using something else, like Liquid Prompt to create the prompt.

Setting: random_style Use random style

This sets a random prompt style for PS1 from the list of available styles on each new Bash session.

Setting: colored_ls Colored ls output

The ls command allows for colored output according to the LS_COLORS environment variable. Activating this will colorify ls output, respectively enforcing it to be monochrome. Overrides operating system default.

Setting: ps0 PS0

The character(s) to use to indicate PS0 (displayed by interactive shells after reading a command and before the command is executed).

Setting: ps2 PS2

The character(s) to use to indicate PS2 (continuation prompt).

Setting: ps3 PS3

The character(s) to use to indicate PS3 (prompt for select command).

Setting: ps4 PS4

The character(s) to use to indicate PS4 (execution trace prompt).

Setting: separator Separator

The character(s) used in several prompt styles to separate different prompt parts.

Setting: pwdcut PWD cut char

The character(s) used to indicate that the current working directory has been truncated due it’s length in the PS1 prompt.

Setting: pwd_len Maximum PWD length

The maximum length of the current working directory before it gets truncated to it’s length in the PS1 prompt. Applies to both prompt styles and the truncpwd Bash script.

Separator

The following settings only apply to the Separator prompt style.

Setting: files_amount Display number of files

Display number of visible files in the current working directory in the prompt.

Setting: uptime Display uptime

Display the machine’s uptime in the prompt.

Setting: files_size Display size of files

Display the size of visible files in the current working directory in the prompt.

Setting: tty Display number of the tty

Display the terminal device in the prompt (prettified).

Setting: processes Display number of running jobs

Display the number of running jobs in the prompt.

Setting: load Display system load

Display load average for the last five minutes in the prompt.

Setting: battery_load Display battery load

Display the battery load status using ACPI in the prompt.

Setting: mem Display Memory

Display the RAM status, either

  • Free Memory
  • Used Memory
  • Both

in the prompt.

Equinox

The following settings only apply to the Equinox prompt style.

Setting: equinox_systemload Display system load

Display load average for the last five minutes in the prompt.

Setting: equinox_cpuload Display CPU load

Display current CPU load in the prompt.

Setting: equinox_proc Display number of running jobs

Display the number of running jobs in the prompt.

Setting: equinox_ram Display Memory

Display the RAM status (free and used) in the prompt.

Setting: equinox_lastcmd Display last command

Display last run command and whether it was executed succesful or not in the prompt.

Setting: equinox_uptime Display uptime

Display the machine’s uptime i

Setting: equinox_git Display git repo information uptime

Displays the branch, revision and action of a git repository, if the current directory is the root directory of a git repositor.