aboutsummaryrefslogtreecommitdiff
path: root/install/install_debian.sh
blob: 462beaf7087adf92beb7a41ebb31cf336dc63872 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash

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
}

dlgYN "> Install \"Highlight, atool, w3m, mediainfo\"" res
if [ $res -eq 1 ]; then
    tput sc
    sudo apt -y install highlight atool w3m mediainfo curl zsh
    tput rc; tput ed
fi

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)"
    tput rc; tput ed
fi

dlgYN "> Install zsh-autosuggestions" res
if [ $res -eq 1 ]; then
    tput sc
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    tput rc; tput ed
fi

dlgYN "> Install Powerline" res
if [ $res -eq 1 ]; then
    tput sc
	  pip3 install pygments
    pip3 install powerline-status
    tput rc; tput ed
fi

dlgYN "> Install powerlevel9k" res
if [ $res -eq 1 ]; then
    tput sc
	  git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
    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/zshrc" ~/.zshrc
    ln -isf "$CWD/linux/tmux.conf" ~/.tmux.conf
  	ln -isf "$CWD/Common/vimrc" ~/.vimrc
	  ln -isf "$CWD/Common/vim" ~/.vim
    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