This repository was archived by the owner on Feb 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHelper v.1.0.0.sh
133 lines (117 loc) · 4.22 KB
/
Helper v.1.0.0.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
#!/bin/bash
green="\e[32m"
red="\e[31m"
blue="\e[34m"
reset="\e[0m"
trap "exit" SIGINT
clear
echo -e "${blue}Welcome to my Arch Linux post installation helper script${reset}"
confirm_continue() {
echo -e "${blue}Press Y to continue:${reset}"
read -r -n 1 response
echo ""
if [[ ! $response =~ ^[Yy]$ ]]; then
echo -e "${red}Aborted.${reset}"
exit 1
fi
}
install_packages() {
local packages=()
for package in "$@"; do
echo -e "${blue}Do you want to install $package? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
packages+=("$package")
fi
done
if [ ${#packages[@]} -eq 0 ]; then
echo -e "${red}No packages selected.${reset}"
else
echo -e "${green}The following packages will be installed: ${packages[*]}${reset}"
sudo pacman -S --needed --noconfirm "${packages[@]}"
fi
}
install_cachyos_repo() {
echo -e "${blue}Install CachyOS-AUR repos? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
wget https://mirror.cachyos.org/cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz && cd cachyos-repo
sudo ./cachyos-repo.sh
cd ..
sudo rm -r cachyos-repo.tar.xz cachyos-repo
sudo pacman -S --noconfirm cachyos-settings
fi
}
install_chaotic_repo() {
echo -e "${blue}Install Chaotic-AUR repos? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
sudo pacman-key --lsign-key 3056513887B78AEB
sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst'
sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
sudo sed -i '$d' /etc/pacman.conf
sudo sed -i '$d' /etc/pacman.conf
sudo sed -i '$d' /etc/pacman.conf
sudo sed -i '$d' /etc/pacman.conf
sudo sed -i '$d' /etc/pacman.conf
echo -e "\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist" | sudo tee -a /etc/pacman.conf
sudo pacman -Sy
fi
}
install_specific_software() {
echo -e "${blue}Install CachyOS Kernel Manager? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
sudo pacman -S --noconfirm cachyos-kernel-manager
fi
echo -e "${blue}Install CachyOS Gaming Meta (Proton, Steam, Lutris, Heroic Game Launcher, Wine)? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
sudo pacman -S --noconfirm proton steam lutris heroic-games-launcher wine
fi
echo -e "${blue}Install CachyOS Open NVIDIA drivers? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
sudo pacman -S --noconfirm linux-cachyos-nvidia-open libglvnd nvidia-utils opencl-nvidia lib32-libglvnd lib32-nvidia-utils lib32-opencl-nvidia nvidia-settings
fi
echo -e "${blue}Install recommended software (yay, ufw, fzf, python, python-pip, bluez, blueman, bluez-utils, zram-generator, fastfetch, preload, flatpak, git, wget, gedit, thermald)? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
sudo pacman -S --noconfirm yay ufw fzf python python-pip bluez blueman bluez-utils zram-generator fastfetch preload flatpak git wget gedit thermald
sudo systemctl enable bluetooth ufw preload
fi
echo -e "${blue}Do you use KDE or GNOME? [k/g]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Kk]$ ]]; then
echo -e "${blue}Install Dolphin? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
sudo pacman -S --noconfirm dolphin
fi
elif [[ $response =~ ^[Gg]$ ]]; then
echo -e "${blue}Install GNOME Tweaks? [y/n]:${reset}"
read -r -n 1 response
echo ""
if [[ $response =~ ^[Yy]$ ]]; then
sudo pacman -S --noconfirm gnome-tweaks
fi
fi
}
confirm_continue
install_cachyos_repo
install_chaotic_repo
install_specific_software
sleep 2
echo -e "${blue}Install the linux-cachyos or linux-cachyos-rc (better performance but more unstable). Recommended for emulation is the stable one and for regular gaming, the rc one can work great. Manually change your bootloader config to boot the right installed kernel.${reset}"
exit 0