-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·165 lines (148 loc) · 3.42 KB
/
setup.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#!/bin/sh
# UNDER CONSTRUCTION
cat <<EOF
------------------------------------------------
Shell script setup installer for Arch systems
------------------------------------------------
EOF
# Check if running as root
if [[ $EUID -eq 0 ]]; then
echo "Do not run as root."
exit
fi
overwrite_files()
{
# Copy files to corresponding directories
cp ./zsh/zshrc ~/.zshrc
mkdir -p ~/.config/nvim
cp ./neovim/init.vim ~/.config/nvim/init.vim
#TODO: overwrite i3 files
#TODO: overwrite urxvt files
#TODO: overwrite mpd /etc location
mkdir -p ~/.config/rofi
cp ./rofi/config ~/.config/rofi/config
mkdir -p ~/remote # For sshfs
# Create directory for wallpapers
mkdir -p ~/wallpapers/wallpaper-main
cp ./wallpaper/* ~/wallpapers/wallpaper-main
}
# Overwrite files
while true; do
read -p "Warning: Current system configuration files will be overwritten
Would you like to overwrite the files now? [y/n]: " yn
case $yn in
[Yy]* ) overwrite_files; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
# Comment out colorscheme in neovim init
sed -i "s/colorscheme/\"colorscheme/g" ~/.config/nvim/init.vim
# Update mirrorlist
while true; do
read -p "Do you wish to update mirrorlists? [y/n]: " yn
case $yn in
[Yy]* ) sudo pacman -S reflector --noconfirm
sudo reflector --latest 30 --sort rate --country "United States" --save /etc/pacman.d/mirrorlist
break
;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
# Update colors for pacman
sudo sed -i 's/#Color/Color/g' /etc/pacman.conf
# Update pacman and install packages
sudo pacman -Syu --noconfirm \
zsh \
neovim \
intel-ucode \
xorg \
intel-ucode \ # intel microcode
xorg \
xorg-xinit \
mesa \ # may be already installed
vulkan-intel \
i3 \
redshift \ # not working
ttf-dejavu \
zplug \
tmux \
firefox \
neofetch \
ranger \
rofi \
htop \
feh \
imagemagick \
mpv \
scrot \
pulseaudio \ # requires restart
pamixer \
pavucontrol \ # optional, nice to have
pcmanfm \ # optional, nice to have
pastebinit \
xdg-user-dirs \
arandr \
libreoffice \
network-manager-applet \ # optional, nice to have
gtop \
fuse \ # requires restart
noto-fonts-emoji \ # refresh i3
udisks2 \
udiskie \
dunst \
mpd \
mpc \
ncmpcpp \
libmpdclient \ # install before polybar
xclip \
transmission-cli \
inotify-tools \
sshfs \
pacman-contrib \
python-pip \
npm \
w3m \
diffuse \
rust \ # needed for markdown-composer
keepassxc \
unzip \
jdk-openjdk
# Install AUR package manager
git clone https://aur.archlinux.org/yay.git ~/yay
cd ~/yay
makepkg -sic --noconfirm
cd -
rm -rf ~/yay
# Update YAY and install packages
yay -Syu --noconfirm \
zplug \
nerd-fonts-dejavu-complete \
neovim-plug-git \
systemd-numlockontty \
polybar \
cryptomator \
megasync \
rxvt-unicode-truecolor \
light \
fontviewer \
spotify \
neovim-plug \
nodejs-base16-builder-git
# Install python modules for neovim
pip3 install neovim --user
# Install plugins
zsh -c "source ~/.zshrc; zplug install; nvim +PlugInstall +qa;"
# Uncomment colorscheme in neovim init
sed -i "s/\"colorscheme/colorscheme/g" ~/.config/nvim/init.vim
#TODO: reload i3
#TODO: pip3 install --user --upgrade pynvim
#TODO: sudo npm install --global base16-builder
# Default to zsh
chsh -s $(which zsh)
cat <<EOF
------------------------------------------------
Shell script setup installer completed
------------------------------------------------
EOF