From e047bc31098acf5915b7b7d99f9270d05ce9445d Mon Sep 17 00:00:00 2001 From: spekulaas Date: Thu, 29 Sep 2022 13:12:08 +0200 Subject: [PATCH] changed ohmyzsh to a manual install --- install.sh | 5 +++-- src/importantinstalls/node.sh | 6 +++--- src/services/zsh/Oh-My-ZSH.sh | 12 ++++++++++-- src/services/zsh/zsh.sh | 7 +------ 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index ef53e94..125a0cb 100755 --- a/install.sh +++ b/install.sh @@ -42,10 +42,11 @@ zsh_prompt() { # run option if [[ ${zshOption,,} = "y" ]]; then # Create temporary zsh file - touch $homedir/.tempzshrc + touch ~/.tempzshrc # set up the basics of zsh sh src/services/zsh/zsh.sh + sh src/services/zsh/Oh-My-ZSH.sh fi } @@ -332,7 +333,7 @@ main() { cd src rm temp/* - install_oh_my_zsh + # install_oh_my_zsh } # PROGRAM BODY diff --git a/src/importantinstalls/node.sh b/src/importantinstalls/node.sh index 52ef6f4..1398327 100644 --- a/src/importantinstalls/node.sh +++ b/src/importantinstalls/node.sh @@ -3,9 +3,9 @@ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash # export nvm to env table if [[ $(which zsh) == "/usr/bin/zsh" ]]; then - echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.tempzshrc - echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.tempzshrc - source ~/.tempzshrc + echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.zshrc + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.zshrc + source ~/.zshrc fi # always put in bashrc aswell, so that the user can always rely on the standard shell diff --git a/src/services/zsh/Oh-My-ZSH.sh b/src/services/zsh/Oh-My-ZSH.sh index 07e2f60..b1eb3a3 100644 --- a/src/services/zsh/Oh-My-ZSH.sh +++ b/src/services/zsh/Oh-My-ZSH.sh @@ -1,2 +1,10 @@ -# Get oh my zsh, after this command the install stios, since we switched shells -sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -y \ No newline at end of file +# Oh my zsh manual install +git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh + +# use the ohmyzsh template as zshrc +cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc + +set zsh as main terminal +chsh -s $(which zsh) + +source ~/.zshrc \ No newline at end of file diff --git a/src/services/zsh/zsh.sh b/src/services/zsh/zsh.sh index 757fb7c..2c6a39b 100644 --- a/src/services/zsh/zsh.sh +++ b/src/services/zsh/zsh.sh @@ -1,8 +1,3 @@ # install ZSH sudo apt-get update -sudo apt-get install zsh -y - -# Set ZSH as standard interface -chsh -s $(which zsh) - -source ~/.zshrc \ No newline at end of file +sudo apt-get install zsh -y \ No newline at end of file