aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorJakob Stendahl <14180120+JakobST1n@users.noreply.github.com>2021-01-17 21:30:34 +0100
committerGitHub <noreply@github.com>2021-01-17 21:30:34 +0100
commitc4356b2864347e4aeba1c6d422e59ae5a2a72e3e (patch)
treeb3ffcea3a67a84b922d7212fbe2642372d27d4f3 /install
parentaf695d40cfc0f011d96071ffd0370535c2a4f588 (diff)
downloaddotfiles-c4356b2864347e4aeba1c6d422e59ae5a2a72e3e.tar.gz
dotfiles-c4356b2864347e4aeba1c6d422e59ae5a2a72e3e.zip
Update install_arch.sh
Diffstat (limited to 'install')
-rw-r--r--install/install_arch.sh73
1 files changed, 64 insertions, 9 deletions
diff --git a/install/install_arch.sh b/install/install_arch.sh
index 5306ba2..8c8a773 100644
--- a/install/install_arch.sh
+++ b/install/install_arch.sh
@@ -1,15 +1,70 @@
-echo "Install Oh-My-Zsh"
-sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
+#!/bin/bash
-echo "Install zsh-autosuggestions"
-git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
+function dlgYN() {
+ tput sc
+ tput setaf 4
+ printf "$1 (y/n)? "
+ while :
+ do
+ read -n 1 -p "" YNQuestionAnswer
+ if [[ $YNQuestionAnswer == "y" ]]; then
+ tput rc; tput el
+ printf "$1?: \e[0;32mYes\e[0m\n"
+ tput sc
+ eval $2=1 # Set parameter 2 of input to the return value
+ break
+ elif [[ $YNQuestionAnswer == "n" ]]; then
+ tput rc; tput el
+ printf "$1?: \e[0;31mNo\e[0m\n"
+ eval $2=0 # Set parameter 2 of input to the return value
+ break
+ fi
+ done
+}
-echo "Install powerlevel9k"
-sudo pacman -S zsh-theme-powerlevel9k
+dlgYN "> Install \"Highlight, atool, w3m, mediainfo, vim, git\"" res
+if [ $res -eq 1 ]; then
+ tput sc
+ pacman -S install highlight atool w3m mediainfo curl zsh vim git python3-pip tmux
+ tput rc; tput ed
+fi
-sudo pacman -S highlight atool w3m mediainfo
+dlgYN "> Install Oh-My-Zsh" res
+if [ $res -eq 1 ]; then
+ tput sc
+ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
-ln -i zshrc ~/.zshrc
+ # Zsh-autosuggestions
+ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
+ # Zsh-syntax-highlighting
+ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
+ tput rc; tput ed
+fi
-echo "Please install the font Roboto mono nerd, and enable it in your terminal."
+dlgYN "> Install Powerline and Powerlevel10k" res
+if [ $res -eq 1 ]; then
+ tput sc
+ pip3 install pygments
+ pip3 install powerline-status
+ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
+ tput rc; tput ed
+fi
+
+dlgYN "> Create symlinks" res
+if [ $res -eq 1 ]; then
+ CWD=$(pwd)
+ tput sc
+ ln -isf "$CWD/bin" ~/bin
+ ln -isf "$CWD/linux/tmux.conf" ~/.tmux.conf
+ ln -isf "$CWD/Common/zshrc" ~/.zshrc
+ ln -isf "$CWD/Common/vimrc" ~/.vimrc
+ ln -isf "$CWD/Common/vim" ~/.vim
+ ln -isf "$CWD/Common/p10k.zsh" ~/.p10k.zsh
+ tput rc; tput ed
+fi
+
+tput setaf 3
+echo "\nPlease install the font Roboto mono nerd, and enable it in your terminal."
+echo "\nPlease run ':PlugInstall' in vim"
+tput sgr0