-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·455 lines (392 loc) · 12.6 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
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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
#!/usr/bin/env bash
# _____ _ _____ _____
#| __|___ ___ ___| |_ ___ _ _ _____| | __|
#|__ | . | -_| _| _| _| | | | | |__ |
#|_____| _|___|___|_| |_| |___|_|_|_|_____|_____|
# |_|
# SpectrumOS - Embrace the Chromatic Symphony!
# By: gibranlp <[email protected]>
# MIT licence
#
#
function base() {
packets=(
'xorg-server'
'xorg-xinit'
'xorg-xrandr'
'feh'
'unclutter'
'fuse-exfat'
'base-devel'
'alsa-utils'
'pulseaudio-alsa'
'pavucontrol'
'openssh'
'alacritty'
'xcolor'
'playerctl'
'scrot'
'flameshot'
'rofi'
'surfraw'
'python-pip'
'ranger'
'lxappearance'
'bmon'
'acpilight'
'lm_sensors'
'nm-connection-editor'
'arandr'
'python-psutil'
'python-xdg'
'python-iwlib'
'python-dateutil'
'ueberzug'
'xsettingsd'
'zsh'
'dunst'
'tk'
'transmission-cli'
'vlc'
'kdeconnect'
'reflector'
'rsync'
'curl'
'cmus'
'bc'
'neofetch'
'firefox'
'cmus'
'xorg-xkill'
'xdg-user-dirs'
'bluez'
'bluez-tools'
'bluez-utils'
'ripgrep'
'blueman'
'htop'
'jp2a'
'locate'
'os-prober'
'gnome-disk-utility'
'networkmanager'
'unzip'
'xarchiver'
'tlp'
'gvfs'
'barrier'
'noto-fonts'
'noto-fonts-cjk'
'noto-fonts-emoji'
'ttf-dejavu'
'ttf-liberation'
'ttf-opensans'
'libayatana-appindicator'
'tlp'
'tumbler'
'redshift'
'libmicrodns' # Libraries for vlc and Chromecast
'protobuf' # Libraries for vlc and Chromecast
#'linux'
#'linux-headers'
'neovim'
'xorg-xdpyinfo'
'fd'
'fzf'
'cups'
'thefuck'
'pamixer'
'gvfs-mtp'
'gvfs-nfs'
'gvfs-smb'
'exa'
'xclip'
'xdotool'
#'nvidia-dkms'
'cups'
'cups-pdf'
'man'
'avahi'
'xorg-server-xephyr'
#'zxel' # Needed for Calculator
)
for packet in "${packets[@]}"; do
echo "Instalando --> ${packet}"
sudo pacman -S "${packet}" --noconfirm --needed
done
}
function paru_install(){
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si --noconfirm
cd ..
rm -rf paru
}
function aur_packages() {
packets=(
'qtile-git'
'farge'
#'python-pywalfox' # If you install firefox you will need this
'qtile-extras-git'
'caffeine-ng-git'
'visual-studio-code-bin'
'pulseaudio-bluethooth'
#'telegram-desktop'
#'google-chrome'
'wpgtk-git'
'insect'
'cava-git'
'thunar-extended'
'thunar-volman'
'hugo'
'gromit-mpx-git'
'nbfc'
'ntfs-3g'
'i3lock-color'
'i3lock-fancy-git'
'picom-tyrone-git'
'lazy-docker'
'rofi-emoji'
'zathura-pdf-mupdf'
'zathura-pywal-git'
'zathura-ps'
'python-rofi-git'
'lyrics-in-terminal'#
'picom-ftlabs-git'#
#'ncspot'
'rofi-file-browser-extended-git'
'walogram'
'ttf-courier-prime'
)
for packet in "${packets[@]}"; do
echo "Instalando --> ${packet}"
paru -S "${packet}" --noconfirm
done
}
## Install Qtile
function install_qtile() {
sudo tee /usr/share/xsessions/qtile.desktop <<EOF
[Desktop Entry]
Name=Qtile
Comment=Qtile Session
Exec=qtile start
Type=Application
EOF
}
function qtilebonsai(){
git clone https://github.com/aravinda0/qtile-bonsai.git
cd qtile-bonsai
pip3 install . --break-system-packages
cd ..
sudo rm -rf qtile-bonsai
}
function zsh(){
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
sudo chsh -s $(which zsh) gibranlp
}
## Install Lightdm
function lightdm_install(){
sudo pacman -S lightdm lightdm-webkit2-greeter --no-confirm
sudo cp ~/dotfiles/lightdm/lightdm.conf /etc/lightdm/
sudo cp ~/dotfiles/lightdm/lightdm-webkit2-greeter.conf /etc/lightdm/
sudo cp -r ~/dotfiles/lightdm/theme/SpectrumOS /usr/share/lightdm-webkit/themes/
sudo cp ~/dotfiles/.cache/wal/colors.css /usr/share/lightdm-webkit/themes/SpectrumOS/css/
sudo systemctl enable lightdm.service
}
function plymouth_install(){
paru -S plymouth-git --no-confirm
sudo cp -r ~/dotfiles/plymouth/themes/spectrumos /usr/share/plymouth/themes/
sudo plymouth-set-default-theme -R spectrumos
sudo mkinitcpio -P
}
## Actualizar Grub
function grubup(){
# Archivo de configuración de GRUB
GRUB_CONFIG="/etc/default/grub"
# Imagen de fondo para GRUB
BACKGROUND_IMAGE="/usr/local/backgrounds/background.png"
# Verificar si el archivo de configuración de GRUB existe
if [ -f "$GRUB_CONFIG" ]; then
# Asegurarse de que la imagen de fondo tenga permisos correctos
sudo chmod +r $BACKGROUND_IMAGE
# Agregar o modificar las líneas necesarias en el archivo de configuración de GRUB
# Agregar o modificar la línea GRUB_CMDLINE_LINUX_DEFAULT
if grep -q "^GRUB_CMDLINE_LINUX_DEFAULT" "$GRUB_CONFIG"; then
sudo sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 quiet splash"/' "$GRUB_CONFIG"
else
echo 'GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"' | sudo tee -a "$GRUB_CONFIG"
fi
# Agregar o modificar la línea GRUB_GFXMODE
if grep -q "^GRUB_GFXMODE" "$GRUB_CONFIG"; then
sudo sed -i 's/^GRUB_GFXMODE=.*/GRUB_GFXMODE=auto/' "$GRUB_CONFIG"
else
echo 'GRUB_GFXMODE=auto' | sudo tee -a "$GRUB_CONFIG"
fi
# Agregar o modificar la línea GRUB_BACKGROUND
if grep -q "^GRUB_BACKGROUND" "$GRUB_CONFIG"; then
sudo sed -i "s|^GRUB_BACKGROUND=.*|GRUB_BACKGROUND=\"$BACKGROUND_IMAGE\"|" "$GRUB_CONFIG"
else
echo "GRUB_BACKGROUND=\"$BACKGROUND_IMAGE\"" | sudo tee -a "$GRUB_CONFIG"
fi
# Agregar o modificar la línea GRUB_TERMINAL_OUTPUT
if grep -q "^GRUB_TERMINAL_OUTPUT" "$GRUB_CONFIG"; then
sudo sed -i 's/^GRUB_TERMINAL_OUTPUT=.*/GRUB_TERMINAL_OUTPUT=gfxterm/' "$GRUB_CONFIG"
else
echo 'GRUB_TERMINAL_OUTPUT=gfxterm' | sudo tee -a "$GRUB_CONFIG"
fi
# Agregar o modificar la línea GRUB_DISABLE_OS_PROBER
if grep -q "^GRUB_DISABLE_OS_PROBER" "$GRUB_CONFIG"; then
sudo sed -i 's/^GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=false/' "$GRUB_CONFIG"
else
echo 'GRUB_DISABLE_OS_PROBER=false' | sudo tee -a "$GRUB_CONFIG"
fi
# Actualizar la configuración de GRUB
sudo grub-mkconfig -o /boot/grub/grub.cfg
echo "Configuración de GRUB actualizada correctamente."
else
echo "El archivo de configuración de GRUB no existe: $GRUB_CONFIG"
exit 1
fi
}
function copy_dots(){
cp -r ~/dotfiles/.cache/* ~/.cache/
mkdir -p ~/.config/alacritty
cp ~/dotfiles/.config/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml
cp ~/dotfiles/.shortcuts ~/
mkdir -p ~/.config/wal/templates
cp ~/dotfiles/.config/flameshot/flameshot.ini ~/.config/wal/templates
mkdir -p ~/.config/dunst
cp ~/dotfiles/.config/dunst/dunstrc ~/.config/wal/templates
cp ~/dotfiles/.config/rofi/SpectrumOS.rasi ~/.config/wal/templates
mkdir -p ~/.config/cava
cp ~/dotfiles/.config/cava/config ~/.config/wal/templates
mkdir -p ~/.config/caffeine
cp ~/dotfiles/.config/caffeine/* ~/.config/caffeine/
mkdir -p ~/.config/ncspot
cp ~/dotfiles/.config/ncspot/config.toml ~/.config/ncspot/config.toml
mkdir -p ~/.fonts
cp ~/dotfiles/.fonts/* ~/.fonts
cp ~/dotfiles/.config/gromit-mpx.cfg ~/.config/
mkdir -p ~/.config/picom
cp ~/dotfiles/.config/picom/picom.conf ~/.config/picom/picom.conf
mkdir -p ~/.config/qtile
cp -r ~/dotfiles/.config/qtile/* ~/.config/qtile/
mkdir -p ~/.config/nvim
cp -r ~/dotfiles/.config/nvim/init.vim ~/.config/nvim/
mkdir -p ~/.config/ranger
cp ~/dotfiles/.config/ranger/rc.conf ~/.config/ranger/rc.conf
mkdir -p ~/.config/flameshot
mkdir -p ~/.config/xsettingsd
cp ~/dotfiles/.config/xsettingsd/xsettingsd.conf ~/.config/xsettingsd/xsettingsd.conf
mkdir -p ~/.config/rofi
cp -r ~/dotfiles/.config/rofi/* ~/.config/rofi/
sudo mkdir -p /root/.config/rofi
sudo cp -r ~/dotfiles/.config/rofi/* /root/.config/rofi/
sudo mkdir -p /root/.cache/wal
sudo mkdir -p /root/.fonts
sudo cp -r ~/.cache/wal/colors-rofi-dark.rasi /root/.cache/wal/
mkdir -p ~/.local/bin
cp -r ~/dotfiles/.local/bin/* ~/.local/bin
chmod +x ~/.local/bin/*
mkdir -p ~/.config/neofetch
cp ~/dotfiles/.config/neofetch/config.conf ~/.config/neofetch/config.conf
cp ~/dotfiles/.zshrc ~/
cp ~/dotfiles/.oh-my-zsh/themes/* ~/.oh-my-zsh/themes/
sudo mkdir -p /usr/local/backgrounds
sudo chown -R $USER:$USER /usr/local/backgrounds
sudo cp ~/dotfiles/Wallpapers/wall1.png /usr/local/backgrounds/background.png
mkdir -p ~/Pictures/Wallpapers
cp -r ~/dotfiles/Wallpapers/* ~/Pictures/Wallpapers
sudo mkdir -p /usr/local/themes
sudo cp -r ~/.local/share/themes/FlatColor /usr/local/themes
sudo chown -R $USER:$USER /usr/local/themes/FlatColor
sudo ln -s /usr/local/themes/FlatColor /usr/share/themes/FlatColor
sudo cp ~/dotfiles/pulse/system.pa /etc/pulse/system.pa
sudo cp ~/dotfiles/touchpad/30-touchpad.conf /etc/X11/xorg.conf.d/
mkdir -p ~/Documents
mkdir -p ~/Public
mkdir -p ~/Downloads
mkdir -p ~/notable
mkdir -p ~/book
mkdir -p ~/Articles
mkdir -p ~/notable
mkdir -p ~/book
mkdir -p ~/Articles
}
function web_apps(){
mkdir -p ~/Apps
cd ~/Apps
nativefier https://github.com/ --name github --single-instance
nativefier https://www.primevideo.com/ --name prime --single-instance --windevine
nativefier https://drive.google.com/drive/shared-drives --name drive --single-instance
nativefier https://www.figma.com/files/recent?fuid=1177005402390460721 --name figma --single-instance
nativefier https://admin.google.com/?rapt=AEjHL4N0yGwzCoucouWtW0MKQj6kYhIIfkadjCaxgZTjhnUCSuKHDVoVPYARCWt1YOfZ542j11diwR4Td8HEVfzHv_vT509KMg --name admin --single-instance
nativefier https://calendar.google.com/calendar/u/0/r?pli=1 --name calendar --single-instance
nativefier https://www.notion.so/helgen/00-Helgen-Ltd-42570ee0ace34d19b7d0a91955b7d976--name notion --single-instance
nativefier https://www.overleaf.com/project --name overleaf --single-instance
nativefier https://meet.google.com/ --name meet --single-instance
nativefier https://app.clockify.me/tracker# --name clockify --single-instance
nativefier https://admin.microsoft.com/Adminportal/Home#/homepage --name madmin --single-instance
nativefier https://helgentrial.atlassian.net/jira/software/projects/IR/boards/1 --name jira --single-instance
nativefier https://search.brave.com/ --name search --single-instance --clear-cache --user-agent 'firefox' --show-menu-bar --bookmarks-menu
sudo ln -s ~/Apps/PrimeVideo/WelcometoPrimeVideo /usr/bin/prime
sudo ln -s ~/Apps/drive/drive /usr/bin/drive
sudo ln -s ~/Apps/admin/admin /usr/bin/admin
sudo ln -s ~/Apps/calendar/calendar /usr/bin/calendar
sudo ln -s ~/Apps/notion/notion /usr/bin/notion
sudo ln -s ~/Apps/overleaf/overleaf /usr/bin/overleaf
sudo ln -s ~/Apps/figma/figma /usr/bin/figma
sudo ln -s ~/Apps/meet/meet /usr/bin/meet
sudo ln -s ~/Apps/github/github /usr/bin/github
sudo ln -s ~/Apps/clockify/clockify /usr/bin/clockify
sudo ln -s ~/Apps/jira/jira /usr/bin/jira
}
function post(){
wpg-install.sh -gio
sudo usermod -aG network $USER
sudo timedatectl set-ntp true
xdg-settings set default-web-browser brave.desktop
fc-cache -f -v
#timedatectl set-timezone America/Mexico_City
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
sudo systemctl enable sshd.service
sudo systemctl start sshd.service
sudo systemctl enable tlp.service
journalctl --vacuum-size=100M
journalctl --vacuum-time=2weeks
timedatectl set-local-rtc 1
}
function install_docker(){
sudo pacman -S docker docker-buildx docker-compose --noconfirm --needed
sudo systemctl enable docker.service
sudo systemctl start docker.service
sudo usermod -aG docker $USER
}
function neovim(){
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
}
## Install Optimus
function install_optimus(){
sudo pacman -S nvidia nvidia-utils xf86-video-intel bumblebee mesa --noconfirm
sudo systemctl enable bumblebeed
sudo systemctl start bumblebeed
sudo gpasswd -a $USER bumblebee
sudo pacman -S primus --noconfirm
}
#base
#paru_install
#aur_packages
#pip install -r pip.txt --break-system-packages
#install_qtile
#qtilebonsai
#copy_dots
#zsh
#lightdm_install
#plymouth_install
#grubup
#post
#install_optimus
install_docker