diff --git a/scripts/Common/Config/Oh My Posh/install.sh b/scripts/Common/Config/Oh My Posh/install.sh index 9a1c5665..87814113 100755 --- a/scripts/Common/Config/Oh My Posh/install.sh +++ b/scripts/Common/Config/Oh My Posh/install.sh @@ -1,5 +1,20 @@ #!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; +. "../bash/profile.sh"; NEXTCLOUD_DIR="${NEXTCLOUD_DIR}"; themeDir="/usr/local/share/oh-my-posh/themes"; install -d644 "$themeDir"; cat ~/.mnt/$NEXTCLOUD_DIR/.omp/manuel.omp.json | sudo tee "$themeDir/manuel.omp.json" > /dev/null; + +{ + echo 'eval "$(oh-my-posh init bash)"'; + echo 'eval "$(oh-my-posh completion bash)"'; +} | addBashProfile "oh-my-posh" "Oh My Posh!"; + +{ + echo "# Oh My Posh!"; + echo "oh-my-posh init fish | source"; + echo "oh-my-posh completion fish | source"; +} | sudo tee /etc/fish/conf.d/oh-my-posh.fish; + +popd > /dev/null; diff --git a/scripts/Common/Config/UserProfile/install.sh b/scripts/Common/Config/UserProfile/install.sh index c5b30e4c..114afb77 100755 --- a/scripts/Common/Config/UserProfile/install.sh +++ b/scripts/Common/Config/UserProfile/install.sh @@ -47,8 +47,6 @@ else NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Fonts/NerdFont/install.sh"; fi; - source "../bash/oh-my-posh.sh"; - source "../fish/oh-my-posh.sh"; NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Oh My Posh/install.sh"; echo "You are done! Please log out!"; read; diff --git a/scripts/Common/Config/bash/oh-my-posh.sh b/scripts/Common/Config/bash/oh-my-posh.sh deleted file mode 100755 index 69cc03a7..00000000 --- a/scripts/Common/Config/bash/oh-my-posh.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -if ! grep "\boh-my-posh\b" ~/.bashrc > /dev/null -then - { - echo ""; - echo "# Oh My Posh!"; - echo 'eval "$(oh-my-posh init bash --config /usr/share/oh-my-posh/themes/manuel.omp.json)"' - echo 'eval "$(oh-my-posh completion bash)"'; - } | tee -a ~/.bashrc > /dev/null; -fi; diff --git a/scripts/Common/Config/fish/oh-my-posh.sh b/scripts/Common/Config/fish/oh-my-posh.sh deleted file mode 100755 index 73beef4d..00000000 --- a/scripts/Common/Config/fish/oh-my-posh.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -{ - echo "# Oh My Posh!"; - echo "oh-my-posh init fish --config /usr/share/oh-my-posh/themes/manuel.omp.json | source"; - echo "oh-my-posh completion fish | source"; -} | sudo tee /etc/fish/conf.d/oh-my-posh.fish;