Powerline Shell
About
Awesome prompt for exposing git branch/commit status and other details...
Powerline Fonts
This is the same for any installation. It installs a great set of fonts for powerline into ~/.local/share/fonts.
git clone https://github.com/powerline/fonts powerline-fonts cd powerline-fonts ./install.sh
Finally:
- Relogin to pick up the new powerline fonts
- Open up your terminal's settings and choose one of the powerline fonts (
konsole->settings->manage profiles->edit 'Shell' profile->appearance
).- Dejavu Sans Mono is a good choice for konsole.
The powerline-fonts deb package in ubuntu does not install all of the fonts in the git repo - just enough to support default usage of the powerline deb package.
MacOs 12
- Install powerline-fonts (see above)
- Install powerline-shell
- Setup a default command line prompt as instructed in the README (works for me)
Ubuntu Xenial
sudo apt-get install fonts-powerline powerline python-powerline-gitstatus
The latter is from my Append the following to your ~/.bashrc
:
You'll also need to get some tweaking happening to ensure vcs status' show up properly.
Edit config.json to point to your own theme, mine.json in this case.
And make sure you parameterise the vcs segment options to show status_colors (only works on linux, so the default is false).
The new powerline system has a generic 'vcs' segment and it is very slow if you use colours. Should try the gitstatus segment or fallback to milkibis' powerline-shell like I used on trusty.
Gitstatus is the bomb!
Ubuntu Trusty
git clone https://github.com/milkbikis/powerline-shell cd powerline-shell cp config.py.dist config.py ./install.py
Append the following to your ~/.bashrc
:
POWERSHELL_COMMAND=~/tmp/powerline-shell/powerline-shell.py POWERSHELL_OPTIONS="--cwd-mode=fancy --cwd-max-depth=4 --cwd-max-dir-size=40 --mode=patched --shell=bash" function _update_ps1() { PS1="$(${POWERSHELL_COMMAND} ${POWERSHELL_OPTIONS} $? 2> /dev/null)" } if [ "$TERM" != "linux" ]; then PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" fi
Troubleshooting
- Go over the Readme.md at https://github.com/milkbikis/powerline-shell.
- If you're seeing odd symbols, make sure you relogin to get the new fonts, change your font in the terminal, or as a fallback, set powerline-shell to use --mode=compatible from your .bashrc.