install
This commit is contained in:
29
hooks/install/install-oh-my.sh
Normal file
29
hooks/install/install-oh-my.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
ZSH="${MUREX}/modules/oh-my-zsh"
|
||||
|
||||
install_oh_my_zsh() {
|
||||
git clone https://github.com/ohmyzsh/ohmyzsh.git "$ZSH"
|
||||
|
||||
themes="${ZSH}/custom/themes"
|
||||
ln -s "${MUREX}/conf/murex/oh-my.zsh-theme" "$themes"
|
||||
|
||||
plugins="${ZSH}/custom/plugins"
|
||||
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "${plugins}/zsh-syntax-highlighting"
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions "${plugins}/zsh-autosuggestions"
|
||||
git clone https://github.com/zsh-users/zsh-history-substring-search "${plugins}/zsh-history-substring-search"
|
||||
}
|
||||
|
||||
if [ ! -e "$ZSH" ]; then
|
||||
echo 'Would you like to download and install oh-my-zsh [ http://ohmyz.sh/ ]? (yes/no)'
|
||||
while true; do
|
||||
read answer
|
||||
case "$answer" in
|
||||
"no") break ;;
|
||||
"yes")
|
||||
install_oh_my_zsh
|
||||
break
|
||||
;;
|
||||
*) echo 'Please type only "yes" or "no"'
|
||||
esac
|
||||
done
|
||||
fi
|
||||
14
hooks/install/install.sh
Normal file
14
hooks/install/install.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
backup="$(mktemp -dp "${MUREX}/backup" "$(datestamp)-install-XXXXX")"
|
||||
|
||||
echo "Linking RC files..."
|
||||
for rc in bash_profile bashrc bash_logout zshenv zprofile zshrc zlogin zlogout; do
|
||||
mv ~/.${rc} "${backup}"
|
||||
ln -sf "${MUREX}/hook" ~/.${rc}
|
||||
done
|
||||
|
||||
ln -sf "${MUREX}/hook" ~/.config/autostart-scripts/de-startup
|
||||
ln -sf "${MUREX}/hook" ~/.config/plasma-workspace/shutdown/de-shutdown
|
||||
|
||||
|
||||
echo "Generating ZSH prompts..."
|
||||
zsh-prompt-generator -s
|
||||
Reference in New Issue
Block a user