-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_packages.sh
executable file
·96 lines (87 loc) · 2.19 KB
/
install_packages.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
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Function to install packages using pacman
install_pacman_packages() {
echo "Installing Pacman packages..."
sudo pacman -Syu --needed \
neovim \
qtile \
picom \
alacritty \
kid3 \
mpd \
mpv \
ncmpcpp \
obsidian \
unclutter \
yt-dlp \
zathura-pdf-mupdf \
zsh \
zsh-autosuggestions \
zsh-doc \
zsh-history-substring-search \
timidity \
zsh-syntax-highlighting
nmap \
gnu-netcat \
masscan \
openvas \
pass \
thunderbird \
flameshot \
brightnessctl \
pulseaudio \
pulseaudio-alsa \
}
# Function to install packages using yay
install_yay_packages() {
echo "Installing Yay packages..."
yay -S --needed \
qtile-extras-git \
python-pywal \
disneyplus \
python-mpd2 \
oh-my-zsh-git \
python-dbus-next \
python-iwlib \
eza \
terminess-powerline-font-git \
lua-jsregexp \
vimv \
xclip
}
setup_tldr() {
mkdir -p ~/bin
curl -o ~/bin/tldr https://raw.githubusercontent.com/raylee/tldr/master/tldr
chmod +x ~/bin/tldr
}
setup_oh_my_zsh() {
echo "Setting up Oh My Zsh..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
}
setup_mpd() {
echo "Setting up MPD service..."
sudo systemctl enable mpd
sudo systemctl start mpd
}
# Function to check the status of previous commands
check_status() {
if [ $? -eq 0 ]; then
echo "All packages have been installed successfully and MPD service is set up."
else
echo "An error occurred during the installation or setting up of the MPD service."
exit 1
fi
}
# Main script execution
install_pacman_packages
install_yay_packages
setup_tldr
setup_oh_my_zsh
setup_mpd
check_status