-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sh
More file actions
executable file
·299 lines (252 loc) · 11.1 KB
/
Copy pathscript.sh
File metadata and controls
executable file
·299 lines (252 loc) · 11.1 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
#!/bin/env bash
# ██████╗ ██╗ ██████╗███████╗ ██╗███╗ ██╗███████╗████████╗ █████╗ ██╗ ██╗ ███████╗██████╗
# ██╔══██╗██║██╔════╝██╔════╝ ██║████╗ ██║██╔════╝╚══██╔══╝██╔══██╗██║ ██║ ██╔════╝██╔══██╗
# ██████╔╝██║██║ █████╗ ██║██╔██╗ ██║███████╗ ██║ ███████║██║ ██║ █████╗ ██████╔╝
# ██╔══██╗██║██║ ██╔══╝ ██║██║╚██╗██║╚════██║ ██║ ██╔══██║██║ ██║ ██╔══╝ ██╔══██╗
# ██║ ██║██║╚██████╗███████╗ ██║██║ ╚████║███████║ ██║ ██║ ██║███████╗███████╗███████╗██║ ██║
# ╚═╝ ╚═╝╚═╝ ╚═════╝╚══════╝ ╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝
# Script to Install my Dotfiles
# Author: soelz4
# url: https://github.com/soelz4/dotfiles
# colors
black=$(tput setaf 0)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
purple=$(tput setaf 5)
cyan=$(tput setaf 6)
whilte=$(tput setaf 7)
default=$(tput setaf 9)
reset=$(tput sgr0)
# Welcome
echo "${green}Welcome to the Rice Installer${reset}" && sleep 2
# System Update and Install some Basic Package
echo "${green}Doing a System Update, Cause Stuff may Break if it's not the Latest Version...${reset}"
sudo pacman --noconfirm -Syyu artix-keyring archlinux-keyring
# AUR Helper - Default Value = yay
HELPER="yay"
echo "${red}______________________${reset}"
# Install Packages from Official Repository
echo "${green}Install Packages from Official Repository ...${reset}" && sleep 2
sudo pacman -S $(awk '{print $1}' pacman_pkglist.txt)
echo "${red}______________________${reset}"
# im Using Artix Runit Sysytem Init so i Need to RUN this Command
# if You Use Other System init you Must link it in Your Own Way
# and if you use Systemd Skip this Step and Comment it
echo "${green}Link the Service Directories into the Desired RUN Level Directory${reset}"
sudo ln -s /etc/runit/sv/git-daemon/ /run/runit/service/
sudo mkdir -p /srv/git
sudo ln -s /etc/runit/sv/alsa/ /run/runit/service/
sudo ln -s /etc/runit/sv/docker/ /run/runit/service/
sudo ln -s /etc/runit/sv/postgresql/ /run/runit/service/
sudo ln -s /etc/runit/sv/redis/ /run/runit/service/
echo "${red}______________________${reset}"
# Initialize AUR Helper
echo "${green}AUR HELPER${reset}"
echo "${green}We Need an AUR Helper. It is Essential. 1) yay 2) paru${reset}"
read -r -p "What is the AUR Helper of your Choice? (Default is yay): " num
if [ "$num" -eq 2 ]; then
HELPER="paru"
fi
# Install AUR Helper if You Don't have $HELPER Installed
if ! command -v $HELPER &>/dev/null; then
echo "${green}It seems that you don't have $HELPER Installed, I'll Install that for you Before Continuing.${reset}"
git clone https://aur.archlinux.org/$HELPER.git ~/Downloads/$HELPER
(cd ~/Downloads/$HELPER/ && makepkg -si)
fi
echo "${red}______________________${reset}"
# Install Packages from AUR Repository
echo "${green}Install Packages from AUR Repository ...${reset}" && sleep 2
"$HELPER" -S $(awk '{print $1}' aur_pkglist.txt)
echo "${red}______________________${reset}"
# Copy Wallpapers Directory to Home Directory
echo "${green}Copy Wallpapers into Your ~/wallpapers/ Directory${reset}"
mkdir ~/wallpapers/
cp -r ./wallpapers/* "$HOME"/wallpapers/
echo "${red}______________________${reset}"
# Copy Some Configs into Home Directory
echo "${green}Copy Some Configs into Home Directory${reset}"
cp .vimrc \
.tmux.conf \
.bashrc \
.xinitrc \
.Xresources \
"$HOME"
echo "${red}______________________${reset}"
# Make Directory .config
echo "${green}Create ~/.config/ Directory${reset}"
mkdir -p ~/.config/
echo "${red}______________________${reset}"
# Rofi
if [ -d ~/.config/rofi/ ]; then
echo "${green}Rofi Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir ~/.config/rofi.backup/ && mv ~/.config/rofi/* ~/.config/rofi.backup/
cp -r ./.config/rofi/* ~/.config/rofi/
else
echo "${green}Installing Rofi Configs...${reset}"
mkdir ~/.config/rofi/ && cp -r ./.config/rofi/* ~/.config/rofi
fi
sleep 2
# Picom
if [ -f ~/.config/picom/picom.conf ]; then
echo "${green}Picom Configs Detected, Backing Up and Then Installing ...${reset}"
cp ~/.config/picom/picom.conf ~/.config/picom/picom.conf.backup
cp ./.config/picom/picom.conf ~/.config/picom/picom.conf
else
echo "${green}Installing Picom Configs...${reset}"
mkdir ~/.config/picom/ && cp ./.config/picom/picom.conf ~/.config/picom/picom.conf
fi
sleep 2
# WezTerm
if [ -f ~/.config/wezterm/wezterm.lua ]; then
echo "${green}WezTerm Configs Detected, Backing Up and Then Installing ...${reset}"
cp ~/.config/wezterm/wezterm.lua ~/.config/wezterm/wezterm.lua.backup
cp ./.config/wezterm/wezterm.lua ~/.config/wezterm/wezterm.lua
else
echo "${green}Installing WezTerm Configs...${reset}"
mkdir ~/.config/wezterm/ && cp ./.config/wezterm/wezterm.lua ~/.config/wezterm/wezterm.lua
fi
sleep 2
# PolyBar
if [ -d ~/.config/polybar/ ]; then
echo "${green}PolyBar Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir ~/.config/polybar.backup/ && mv ~/.config/polybar/* ~/.config/polybar.backup/
cp -r ./.config/polybar/* ~/.config/polybar/
else
echo "${green}Installing PolyBar Configs...${reset}"
mkdir ~/.config/polybar/ && cp -r ./.config/polybar/* ~/.config/polybar/
fi
sleep 2
# TMUX
if [ -d ~/.config/tmux/ ]; then
echo "${green}TMUX Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir ~/.config/tmux.backup/ && mv ~/.config/tmux/* ~/.config/tmux.backup/
cp -r ./.config/tmux/* ~/.config/tmux/
else
echo "${green}Installing TMUX Configs...${reset}"
mkdir ~/.config/tmux/ && cp -r ./.config/tmux/* ~/.config/tmux/
fi
sleep 2
# BSPWM
if [ -d ~/.config/bspwm/ ]; then
echo "${green}BSPWM Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir ~/.config/bspwm.backup/ && mv ~/.config/bspwm/* ~/.config/bspwm.backup/
cp -r ./.config/bspwm/* ~/.config/bspwm/
else
echo "${green}Installing BSPWM Configs...${reset}"
mkdir ~/.config/bspwm/ && cp -r ./.config/bspwm/* ~/.config/bspwm/
fi
sleep 2
# Herbstluftwm
if [ -f ~/.config/herbstluftwm/autostart ]; then
echo "${green}Herbstluftwm Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir -p ~/.config/herbstluftwm/ && mv ~/.config/herbstluftwm/autostart ~/.config/herbstluftwm/autostart.backup
cp -r ./.config/herbstluftwm/autostart ~/.config/herbstluftwm/
else
echo "${green}Installing Herbstluftwm Configs...${reset}"
mkdir -p ~/.config/herbstluftwm/ && cp ./.config/herbstluftwm/autostart ~/.config/herbstluftwm/
fi
sleep 2
# Xmonad
if [ -f ~/.xmonad/xmonad.hs ]; then
echo "${green}Xmonad Configs Detected, Backing Up and Then Installing ...${reset}"
mv ~/.xmonad/xmonad.hs ~/.xmonad/xmonad.hs.backup
cp ./.config/xmonad/xmonad.hs ~/.xmonad/xmonad.hs
else
echo "${green}Installing Xmonad Configs...${reset}"
mkdir -p ~/.xmonad/ && cp ./.config/xmonad/xmonad.hs ~/.xmonad/xmonad.hs
fi
sleep 2
# Xmobar
if [ -d ~/.config/xmobar/ ]; then
echo "${green}Xmobar Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir ~/.config/xmobar.backup/ && mv ~/.config/xmobar/* ~/.config/xmobar.backup/
cp -r ./.config/xmobar/* ~/.config/xmobar/
else
echo "${green}Installing Xmobar Configs...${reset}"
mkdir ~/.config/xmobar/ && cp -r ./.config/xmobar/* ~/.config/xmobar/
fi
chmod +x ~/.config/xmobar/trayer-padding-icon.sh
chmod +x ~/.config/xmobar/script/kernel
chmod +x ~/.config/xmobar/script/eth
sleep 2
# SXHKD
if [ -f ~/.config/sxhkd/sxhkdrc ]; then
echo "${green}SXHKD Configs Detected, Backing Up and Then Installing ...${reset}"
mv ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.backup
cp -r ./.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc
else
echo "${green}Installing SXHKD Configs...${reset}"
mkdir ~/.config/sxhkd/ && cp -r ./.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc
fi
sleep 2
# Fish
if [ -f ~/.config/fish/config.fish ]; then
echo "${green}Fish Configs Detected, Backing Up and Then Installing ...${reset}"
mv ~/.config/fish/config.fish ~/.config/fish/config.fish.backup
cp ./.config/fish/config.fish ~/.config/fish/
else
echo "${green}Installing Fish Configs...${reset}"
if [ -d ~/.config/fish/ ]; then
cp ./.config/fish/config.fish ~/.config/fish/
else
mkdir ~/.config/fish && cp ./.config/fish/config.fish ~/.config/fish/
fi
fi
sleep 2
# NeoVim
if [ -d ~/.config/nvim/ ]; then
echo "${green}NeoVim Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir ~/.config/nvim.backup/ && mv ~/.config/nvim/* ~/.config/nvim.backup/
cp -r ./.config/nvim/* ~/.config/nvim/
else
echo "${green}Installing NeoVim Configs...${reset}"
mkdir ~/.config/nvim/ && cp -r ./.config/nvim/* ~/.config/nvim/
fi
sleep 2
# Dunst
if [ -d ~/.config/dunst/ ]; then
echo "${green}Dunst Configs Detected, Backing Up and Then Installing ...${reset}"
mkdir ~/.config/dunst.backup/ && mv ~/.config/dunst/* ~/.config/dunst.backup/
cp -r ./.config/dunst/* ~/.config/dunst/
else
echo "${green}Installing Dunst Configs...${reset}"
mkdir ~/.config/dunst/ && cp -r ./.config/dunst/* ~/.config/dunst/
fi
sleep 2
echo "${red}______________________${reset}"
# Install fzf
echo "${green}Installing FuzzyFinder${reset}"
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
echo "${red}______________________${reset}"
# Install tmuxifier
echo "${green}Installing Tmuxifier${reset}"
git clone https://github.com/jimeh/tmuxifier.git ~/.tmuxifier
echo "${red}______________________${reset}"
# install TMUX TPM
echo "${green}Installing TMUX TPM${reset}"
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "${red}______________________${reset}"
# Install Vim Plug
echo "${green}Installing Vim Plug${reset}"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo "${red}______________________${reset}"
# Install Pathogen
echo "${green}Installing Pathogen${reset}"
mkdir -p ~/.vim/autoload ~/.vim/bundle &&
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
echo "${red}______________________${reset}"
# Install Atuin
echo "${green}Installing Atuin${reset}"
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
echo "${red}______________________${reset}"
# Install Deno
echo "${green}Installing Deno${reset}"
curl -fsSL https://deno.land/install.sh | sh
echo "${red}______________________${reset}"
# Install Rust
echo "${green}Installing Rust${reset}"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh