A colorful theme, where shows a lot information about your shell session.
IMPORTANT: This theme requires that a font with the Powerline symbols needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator.
NOTICE: The default behavior of this theme assumes that you have sudo privileges on your workstation. If that is not the case (e.g. if you are running on a corporate network where
sudo usage is tracked), you can set the flag 'export THEME_CHECK_SUDO=false' in your
~/.bash_profile to disable the Powerline theme's
sudo check. This will apply to all
- Current path
- Current username and hostname
- Current time
- An indicator when connected by SSH
- An indicator when
sudohas the credentials cached (see the
sudomanpage for more info about this)
- An indicator when the current shell is inside the Vim editor
- Battery charging status (depends on the [../../plugins/available/battery.plugin.bash](battery plugin))
- SCM Repository status (e.g. Git, SVN)
- The current Kubernetes environment
- The current Python environment (Virtualenv, venv, and Conda are supported) in use
- The current Ruby environment (rvm and rbenv are supported) in use
- Last command exit code (only shown when the exit code is greater than 0)
This theme is pretty configurable, all the configuration is done by setting environment variables.
By default, the username and hostname are shown, but you can change this behavior by setting the value of the following variable:
For now, the only supported value is
sudo, which hides the username and hostname, and shows an indicator when
sudo has the credentials cached. Other values have no effect at this time.
You can change the format using the following variable:
The time/date is printed by the
date command, so refer to its man page to change the format.
The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are:
aws_profile- Show the current value of the
battery- Battery information (you'll need to enable the
clock- Current time in
cwd- Current working directory including full folder hierarchy (c.f.
hostname- Host name of machine
in_vim- Show identifier if running in
k8s_context- Show current kubernetes context
last_status- Exit status of last run command
python_venv- Python virtual environment information (
ruby- Current ruby version if using
scm- Version control information,
user_info- Current user
wd- Working directory, like
cwdbut doesn't show the full folder hierarchy, only the directory you're currently in.
A variable can be defined to set the order of the prompt segments:
POWERLINE_PROMPT="user_info scm python_venv ruby cwd"
The example values above are the current default values, but if you want to remove anything from the prompt, simply remove the "string" that represents the segment from the variable.