-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathArchLinux.sh
More file actions
executable file
·116 lines (98 loc) · 3.22 KB
/
ArchLinux.sh
File metadata and controls
executable file
·116 lines (98 loc) · 3.22 KB
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
#!/usr/bin/env bash
set -e
set -o pipefail
# Ensure script is not run as root
if [[ $EUID -eq 0 ]]; then
echo "Please run this script as a regular user, not root."
exit 1
fi
# Allow wheel group passwordless sudo
echo "Configuring sudoers for wheel group..."
sudo sed -i 's/^%wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
# System update
echo "Updating system..."
sudo pacman -Syu --noconfirm
# Configure DNS
echo "Setting DNS servers..."
echo "nameserver 1.1.1.1" | sudo tee -a /etc/resolv.conf
echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
# Install required base packages for yay
echo "Installing base-devel, go, and git..."
sudo pacman -Sy --noconfirm go git base-devel
# Install packages
echo "Installing software packages..."
sudo pacman -Sy --noconfirm \
xorg xorg-xinit chromium vim ffmpeg ntfs-3g ugrep noto-fonts-{emoji,cjk} \
feh lsd webkit2gtk gcr gstreamer lxappearance clipmenu mpv mpd alsa-utils \
ncmpcpp cava newsboat zathura ranger ueberzug sakura nodejs npm bash-completion \
yt-dlp stow flameshot cmake ninja meson curl imagemagick bat breeze cmatrix \
lolcat figlet colordiff timeshift flac fzf harfbuzz fastfetch xwallpaper \
htop imlib2 jq libev libjpeg-turbo libmpc linux-headers man-db mpc cups \
papirus-icon-theme pcre pkgconf python-pip rsync terminus-font cups-pdf \
v4l2loopback-dkms v4l2loopback-utils xdg-desktop-portal-wlr xdotool zathura-pdf-mupdf \
tmux xcb-util-renderutil xcb-util-image uthash libconfig dunst pass readline \
file seatd img2pdf
echo "Installing AUR packages..."
if ! command -v yay &>/dev/null; then
echo "yay not found, installing..."
git clone https://aur.archlinux.org/yay.git /tmp/yay
cd /tmp/yay
makepkg -si --noconfirm
fi
yay -S --noconfirm \
simple-mtpfs libinput-gestures papirus-folders
# Compile and install picom
echo "Cloning and building picom..."
cd /tmp/
[ -d picom ] && rm -rf picom
git clone --depth=1 https://github.com/pijulius/picom.git
cd picom
git submodule update --init --recursive
meson --buildtype=release . build
sudo ninja -C build install
# Clone dotfiles
cd ~
[ -d dotfiles ] && rm -rf dotfiles
git clone --depth=1 https://github.com/elbachir-one/dotfiles
cd dotfiles
cp -rn .config .fonts .icons .local .themes .bashrc .xinitrc .tmux.conf .bash_profile ~/
# Build suckless programs
SUCKLESS_DIR="$HOME/dotfiles/suckless"
echo "Building suckless programs..."
for prog in dwm dmenu st slstatus slock farbfeld sent surf; do
PROG_PATH="$SUCKLESS_DIR/$prog"
if [ -d "$PROG_PATH" ]; then
echo "Building $prog..."
cd "$PROG_PATH"
make
sudo make clean install
else
echo "Warning: $PROG_PATH does not exist, skipping."
fi
done
# Clone wallpapers
echo "Cloning wallpapers..."
cd ~
[ -d wall ] && rm -rf wall
git clone --depth=1 https://github.com/elbachir-one/wall
# Install grc
echo "Installing grc..."
cd /tmp/
[ -d grc ] && rm -rf grc
git clone https://github.com/garabik/grc.git
cd grc
sudo ./install.sh
sudo cp /etc/profile.d/grc.sh /etc/
# Clean up orphan packages
echo "Cleaning up AUR cache..."
yay -Sc --noconfirm
# Update font cache
echo "Updating font cache..."
fc-cache -fv
# Rebuild the initramfs
echo "Re-building the Initramfs"
sudo mkinitcpio -P -v
# Final reboot
echo "Setup complete. Rebooting..."
sleep 2s
sudo reboot