scripts/install_ohmyposh.sh

25 lines
981 B
Bash
Executable file

#!/bin/sh
# Notify of application launch
echo -e "Oh My Posh bash installer by Schotty.\n"
read -p "Press enter to continue"
# Warn about powerline if need be
if [ command -v powerline ] ; then
echo -e "Oh My Posh has been detected as being installed.\n"
echo -e "Oh My Posh is not compatible with powerline.\n"
echo -e "You need to remove it, if not already removed, from your :\n"
echo -e "~/.bashrc or ~/.bash_profile\n"
read -p "Press enter to continue"
fi
# Install OMP
echo -e "Installing Oh My Posh into your user account (~/.local/bin).\n"
mkdir -p ~/.local/bin/
cp ~/.bashrc ~/.bashrc.ompbackup
echo "PATH=\$PATH:~/.local/bin" >> .bashrc
curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/.local/bin
read -p "Installing meslo font. Please configure your terminal to use 'Meslo LGM NF'. Press enter to continue."
oh-my-posh font install meslo
# Insert OMP command with stock theme into ~/.bashrc
echo "eval \"\$(oh-my-posh init bash)\"" >> ~/.bashrc