Skip to content

Instantly share code, notes, and snippets.

@Juke34
Last active March 20, 2024 16:10
Show Gist options
  • Save Juke34/f23e6f13a608baa603e445964db0fdb0 to your computer and use it in GitHub Desktop.
Save Juke34/f23e6f13a608baa603e445964db0fdb0 to your computer and use it in GitHub Desktop.
Bash personalization

Two possibilities well known: https://github.com/ohmybash/oh-my-bash and https://github.com/nojhan/liquidprompt

Liquid prompt

  • clone the repo
cd ~
git clone https://github.com/nojhan/liquidprompt.git ~/liquidprompt
  • Udpate .bashrc (for Bash) to use liquidprompt
# Only load Liquidprompt in interactive shells, not from a script or from scp
[[ $- = *i* ]] && source ~/liquidprompt/liquidprompt
  • Udpate .bashrc (for Bash) to use a theme e.g. powerline theme

load liquidprompt theme

source ~/liquidprompt/themes/powerline/powerline.theme
lp_theme powerline_full
  • Add font if bad display of the powerline theme:
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts

To set the theme, open terminal preferences, choose the theme you installed, and check it as default.
To set the fonts, still, at terminal preferences, click on the Change… button in the Font section.
I suggest the Meslo LG M DZ for Powerline, Regular, 11px! It fits very well on the terminal.
Doing the steps above, you will be able to see the colors and icons when for example, inside a git folder.

  • Setting Visual Studio Code up as well:

Open the VS Code configs and drop the following lines:
"terminal.integrated.fontFamily": "Source Code Pro for Powerline",
"terminal.integrated.shell.osx": "/bin/bash".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment