diff --git a/website/docs/installation/linux.mdx b/website/docs/installation/linux.mdx index f8716229..f56b22a6 100644 --- a/website/docs/installation/linux.mdx +++ b/website/docs/installation/linux.mdx @@ -35,31 +35,17 @@ To display all icons, we recommend the use of a [Nerd Font][fonts]. -Oh My Posh can also be installed manually by downloading the release. -Depending on your distro, this may or may not work (please refer to the homebrew installation -in case it doesn't work). - -**Download Oh My Posh** - -:::caution -The below commands assume the processor architecture is `amd64` while we have support for `arm` and `arm64` as well. -Make sure you validate your architecture and adjust `posh-linux-` accordingly. If you don't know your -processor architecture, you can display it using `uname -m`. -::: +Install the latest version for your system by running the following command: ```bash -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 +curl -s https://ohmyposh.dev/install.sh | bash -s ``` -**Download the [themes][themes]** +By default the script will install to `/usr/local/bin` or the existing Oh My Posh executable's installation folder. +If you want to install to a different location you can specify it using the `-d` flag: ```bash -mkdir ~/.poshthemes -wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip -unzip ~/.poshthemes/themes.zip -d ~/.poshthemes -chmod u+rw ~/.poshthemes/*.omp.* -rm ~/.poshthemes/themes.zip +curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin ``` diff --git a/website/static/install.sh b/website/static/install.sh index 75f868e9..05071671 100755 --- a/website/static/install.sh +++ b/website/static/install.sh @@ -55,7 +55,7 @@ set_install_directory() { posh_dir=$(command -v oh-my-posh) real_dir=$(realpath $posh_dir) install_dir=$(dirname $real_dir) - printf "Oh My Posh is already installed, updating existing installation in:\n" + printf "ℹī¸ Oh My Posh is already installed, updating existing installation in:\n" printf " ${install_dir}\n" else install_dir="/usr/local/bin" @@ -121,7 +121,7 @@ install() { printf "🚀 Installation complete.\n\nYou can follow the instructions at https://ohmyposh.dev/docs/installation/prompt\n" printf "to setup your shell to use oh-my-posh.\n\n" printf "If you want to use a built-in theme, you can find them in the ${theme_dir} directory:\n" - printf " oh-my-posh init {shell} --config theme ${theme_dir}/{theme}.omp.json\n\n" + printf " oh-my-posh init {shell} --config ${theme_dir}/{theme}.omp.json\n\n" } detect_arch() {