-
Notifications
You must be signed in to change notification settings - Fork 39
/
install.sh
executable file
·80 lines (70 loc) · 2.17 KB
/
install.sh
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
77
78
79
80
#!/usr/bin/env bash
install_oh_my_zsh() {
echo "Setting up zsh..." \
&& rm -rf ~/.zshrc \
&& ln -s $(pwd)/zsh/zshrc ~/.zshrc \
&& git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions \
&& git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting \
&& git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k \
&& ln -s $(pwd)/zsh/themes/* ~/.oh-my-zsh/custom/themes \
&& rm -rf ~/z.sh \
&& curl -fLo ~/z.sh https://raw.githubusercontent.com/rupa/z/master/z.sh
}
install_neovim() {
echo "Setting up neovim..." \
&& rm -rf ~/.config/nvim ~/.fzf \
&& ln -s $(pwd)/nvim ~/.config/nvim \
&& yay -S ripgrep
}
install_emacs() {
echo "Setting up emacs..." \
&& mkdir -p ~/.config/emacs \
&& rm -rf ~/.config/emacs/init.el \
&& ln -s $(pwd)/emacs/init.el ~/.config/emacs
}
install_packages() {
ehco"Installing packages..." \
&& yay -S pyenv keychain go
}
install_diff_so_fancy() {
echo "Installing diff-so-fancy..." \
&& npm install -g diff-so-fancy \
&& git config --global core.pager "diff-so-fancy | less --tabs=4 -R"
}
install_kitty() {
echo "Installing kitty..." \
&& rm -rf ~/.local/kitty.app ~/.config/kitty \
&& yay -S kitty \
&& ln -s $(pwd)/kitty ~/.config/kitty
}
install_i3() {
rm -rf ~/.config/i3 \
&& yay -S rofi polybar ttf-twemoji ttf-nerd-fonts-symbols-mono ttf-jetbrains-mono \
&& ln -s $(pwd)/i3 ~/.config/i3
}
install_rofi() {
yay -S rofi \
&& rm -rf ~/.config/rofi \
&& ln -s $(pwd)/rofi ~/.config/rofi
}
install_mutt() {
yay -S neomutt mutt-wizard cyrus-sasl-xoauth2-git abook lynx
}
if [[ -z $1 ]]; then
echo -n "This will delete all your previous nvim, zsh settings. Proceed? (y/n)? "
read answer
if echo "$answer" | grep -iq "^y" ;then
echo "Installing dependencies..." \
&& install_oh_my_zsh \
&& install_neovim \
&& install_emacs \
&& install_packages \
&& install_diff_so_fancy \
&& install_kitty \
&& install_i3 \
&& install_rofi \
&& echo "Finished installation."
fi
else
"install_$1" $1
fi