Skip to content

Instantly share code, notes, and snippets.

@GiampaoloGabba
Last active September 17, 2021 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GiampaoloGabba/d4315d3395c560ba496a1a15409a1e7e to your computer and use it in GitHub Desktop.
Save GiampaoloGabba/d4315d3395c560ba496a1a15409a1e7e to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Inserisci il nome host che comparirà nella barra degli indirizzi:"
read -p "Host: " HOST
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
sudo chmod +x /usr/local/bin/oh-my-posh
mkdir ~/.poshthemes
cd ~/.poshthemes
wget https://gist.githubusercontent.com/GiampaoloGabba/b3a0acbda32e8acd7cb5488ef21c1de7/raw/9c469d6ca912f75ea61fc90888ec5e1f897313fc/oh-my-posh.omp.json
sed -i "s/{{if .Root}}/$HOST | {{if .Root}}/g" ~/.poshthemes/oh-my-posh.omp.json
eval "$(oh-my-posh --init --shell bash --config ~/.poshthemes/oh-my-posh.omp.json)"
echo 'eval "$(oh-my-posh --init --shell bash --config ~/.poshthemes/oh-my-posh.omp.json)"' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment