-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·247 lines (226 loc) · 4.03 KB
/
bootstrap.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
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
hypr_packages=(
seatd
wev
nemo
adwaita-gtk
papirus-icon-theme
bibata-cursor-theme
qt5ct
qt6ct
cliphist
qt4ct
wl-clipboard
dunst
light
wireplumber
pipewire
pipewire-alsa
pipewire-jack
pipewire-pulse
pipewire-pulse
pipewire-audio
pamixer
qt5-wayland
qt6-wayland
waybar-mpris-git
mpv-mpris-git
wlogout
swaybg
swayimg
nwg-look-bin
vimiv
rofi-lbonn-wayland
rofi-emoji
rofi-calc
hyprpicker
gnome-themes-extra
adwaita-qt5
adwaita-qt6
wf-recorder
pavucontrol
nm-applet
grimblast
polkit-kde-agent
udisks2
udiskie
hyprland
xdg-desktop-portal-hyprland
waybar
swayidle
hyprlock
)
devel_packages=(
beautysh
qrencode
ranger
socat
inotify-tools
exa
bat
lf-sixel-git
chafa
rsync
zoxide
go
luals
lazygit
floorp-bin
ripgrep
fd
stylua
python-pip
unzip
zip
curl
wget
httpie
libreoffice-fresh
neovim
tmux
zathura
zathura-pdf-mupdf
zaread
system-config-printer
network-manager-applet
fzf
google-chrome
brave-bin
zsh
docker
docker-compose
man
man-pages
kitty
foot
jdk-openjdk
python-virtualenv
python-neovim
python-black
dnsutils
)
necessary_packages=(
qrc
acpi
bluez
bluez-utils
playerctl
ffmpeg
obs-studio
mtpfs
jmtpfs
gvfs-mtp
gvfs-gphoto2
downgrade
calcure
bat-asus-battery-bin
epson-inkjet-printer-escpr
epson-inkjet-printer-escpr2
htop
btop
telegram-desktop
webcord-bin
mpv
yt-dlp
timeshift
ventoy-bin
deluge
deluge-gtk
noto-fonts
noto-fonts-extra
noto-fonts-emoji
indic-otf
ttf-ms-fonts
)
other_packages=(
cava
neofetch
cowsay
)
update_mirrors (){
pacman -S --noconfirm reflector
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
sudo reflector -c India --verbose --sort rate -l 10 --save /etc/pacman.d/mirrorlist
}
install_paru (){
if ! command -v paru &> /dev/null
then
clear
sudo pacman -S --noconfirm --needed base-devel
git clone https://aur.archlinux.org/paru-bin.git $HOME/paru-bin
cd ~/paru-bin
makepkg -si --noconfirm
cd ..
rm -rf ~/paru-bin
fi
}
install_packages(){
clear
if ! command -v paru &> /dev/null
then
install_paru
fi
clear
for package in ${hypr_packages[@]}; do
paru -S --noconfirm $package
done
clear
for package in ${devel_packages[@]}; do
paru -S --noconfirm $package
done
clear
for package in ${necessary_packages[@]}; do
paru -S --noconfirm $package
done
clear
for package in ${other_packages[@]}; do
paru -S --noconfirm $package
done
}
# System level configs
config_system(){
# Setup groups
sudo usermod -aG cups,docker,seat,video,audio devadathan
# Backlight
if [[ ! -d "/etc/udev/rules.d/" ]]
then
sudo mkdir /etc/udev/rules.d
fi
sudo cp $HOME/dotfiles/backlight.rules /etc/udev/rules.d/backlight.rules
sudo cp $HOME/dotfiles/power.rules /etc/udev/rules.d/power.rules
}
# Setup fonts
install_fonts(){
mkdir -p ~/.local/share/fonts
cp ~/dotfiles/fonts/* ~/.local/share/fonts
fc-cache -fv
}
# Setup zap zsh
setup_zap(){
zsh <(curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh) --branch release-v1
}
# Tmux plugin manger
setup_tmux(){
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
}
# Setup scripts
setup_scripts(){
ln -s ~/dotfiles/scripts/general/* ~/.local/bin/
}
# Main
main(){
clear
update_mirrors
install_packages
install_fonts
setup_zap
setup_tmux
setup_scripts
config_system
clear
paru --noconfirm
paru --clean --noconfirm
paru -Sc --noconfirm
echo "Bootstrap complete. Please reboot the system."
neofetch
}
main