-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
202 lines (179 loc) · 4.69 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
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
#!/bin/bash
#
# == install dot script by fnix
readonly PKGS_PACMAN=(
i3 i3lock i3-gaps
netctl dialog dhcpcd wireless_tools
rofi
picom
kitty
zsh
curl
unzip
feh
thunar
xdg-user-dirs xdg-user-dirs-gtk xdg-utils
notepadqq
lxappearance
scrot
git
polybar
lm_sensors
alsa-utils alsa-lib
xorg-server xorg-xprop xorg-xinit xorg-xrandr arandr xorg-xfd
ttf-inconsolata ttf-fantasque-sans-mono
bluez bluez-utils
python-pip
)
readonly PKGS_AUR=(
visual-studio-code-bin
google-chrome
siji-git
)
function install_pkgs_pacman(){
for i in "${PKGS_PACMAN[@]}"; do
sudo pacman -S ${i} --needed --noconfirm
done
}
function install_pkgs_aur(){
for i in "${PKGS_AUR[@]}"; do
yay -S ${i} --needed --noconfirm
done
}
function install_yay(){
if ! type -p yay > /dev/null
then
clear
echo -e "[-] - Instalando yay\n"
sleep 3
cd $HOME
sudo rm -rf $HOME/yay
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
cd ..
sudo rm -rf $HOME/yay
fi
}
function install_fonts(){
clear
echo -e "[-] - Instalando fontes do sistema...\n"
sleep 3
cd $HOME
sudo rm -rf fonts
git clone https://github.com/powerline/fonts.git
sh fonts/install.sh
sudo rm -rf fonts
sudo rm -rf .fonts/firacode/firacodeUnzip
cd .fonts/firacode
mkdir firacodeUnzip
cp Fira_Code_v5.2.zip firacodeUnzip
cd firacodeUnzip
unzip Fira_Code_v5.2.zip
sudo mv ttf/* /usr/share/fonts/TTF
fc-cache -fv
}
function install_dotfiles(){
clear
echo -e "[-] - Preparando Dotfiles...\n"
sleep 3
cd $HOME
git clone https://github.com/fnixdev/Dotfiles
xdg-user-dirs-update
xdg-user-dirs-gtk-update
cd $HOME/Dotfiles/
echo -e "\n[-] - Instalando i3gaps config\n"
sleep 3
sudo rm -rf $HOME/.config/i3
mkdir -p $HOME/.config/i3
cp -r assets/.config/i3 $HOME/.config
echo -e "\n[-] - Instalando Polybar config\n"
sleep 3
sudo rm -rf $HOME/.config/polybar
mkdir -p $HOME/.config/polybar
cp -r assets/.config/polybar $HOME/.config
echo -e "\n[-] - Instalando Picom config\n"
sleep 3
sudo rm -rf $HOME/.config/picom
mkdir -p $HOME/.config/picom
cp -r assets/.config/picom $HOME/.config
echo -e "\n[-] - Instalando Rofi config\n"
sleep 3
sudo rm -rf $HOME/.config/rofi
mkdir -p $HOME/.config/rofi
cp -r assets/.config/rofi $HOME/.config
echo -e "\n[-] - Instalando Kitty config\n"
sleep 3
sudo rm -rf $HOME/.config/kitty
mkdir -p $HOME/.config/kitty
cp -r assets/.config/kitty $HOME/.config
echo -e "\n[-] - Instalando .xinitrc config\n"
sleep 3
sudo rm -rf $HOME/.xinitrc
cp assets/.xinitrc $HOME/.xinitrc
echo -e "\n[-] - Movendo scripts\n"
sleep 3
sudo rm -rf $HOME/scripts
cp -r scripts $HOME
echo -e "\n[-] - Configurando Teclado ABNT2\n"
sleep 3
sudo rm -rf /etc/X11/xorg.conf.d
sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp etc/X11/xorg.conf.d/00-keyboard.conf /etc/X11/xorg.conf.d
}
function config_setup(){
clear
sleep 3
amixer set 'Master' 100% unmute
sudo alsactl store
echo -e "\n[-] - Configurando Pacman\n"
sleep 3
sudo sed -i '37iILoveCandy' /etc/pacman.conf
sudo sed -i '/Color/,+1 s/^#//' /etc/pacman.conf
echo -e "\n[-] - Configurando Wallpapers\n"
sleep 3
rm -rf $HOME/Wallpapers
cp -r $HOME/Dotfiles/assets/Wallpapers $HOME
cp -r $HOME/Dotfiles/assets/.fehbg $HOME
feh --bg-max --bg-fill --no-fehbg --randomize $HOME/Wallpapers/*
}
function oh_my_zsh(){
clear
echo -e "[-] - Instalando Oh-My-Zsh\n"
sleep 3
cd $HOME
sudo rm -rf $HOME/.oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
echo -e "[-] - Copiando zsh config\n"
cp $HOME/Dotfiles/assets/.zshrc $HOME/.zshrc
}
function config_system(){
clear
echo -e "[-] - Configurando o Sistema\n"
sleep 3
cd $HOME
read -p "Git email: " gitEmail
git config --global user.email ${gitEmail}
read -p "Git name: " gitName
git config --global user.name ${gitName}
echo -e "[-] - Configurando o LastFM Now Playing\n"
sleep 3
read -p "Digite seu username LastFM: " userLast
sed -i "s/lastuser/$userLast/g" $HOME/.config/polybar/scripts/lastfm.py
read -p "Digite sua LastFM ApiKey: " keyLast
sed -i "s/lastkey/$keyLast/g" $HOME/.config/polybar/scripts/lastfm.py
echo -e "[-] - Configurando o Modulos Python\n"
sleep 3
pip install -U autopep8
pip install apscheduler
}
install_pkgs_pacman
install_yay
install_pkgs_aur
install_fonts
install_dotfiles
config_setup
config_system
oh_my_zsh