Krolyxon
Commit 50155cf

Branches

Refs →

aurorainstall.sh

198 lines · 4.0 KB · Bourne Again Shell (bash)

1#!/bin/env bash
2
3pkg_utils=(
4 "fd"
5 "ffmpegthumbnailer"
6 "foot"
7 "fuzzel"
8 "fzf"
9 "gammastep"
10 "ghostscript"
11 "gobject-introspection"
12 "gparted"
13 "grub"
14 "gvfs"
15 "gvfs-mtp"
16 "imagemagick"
17 "imlib2"
18 "jq"
19 "kanshi"
20 "lf"
21 "libnotify"
22 "libreoffice-fresh"
23 "lua"
24 "lvm2"
25 "man-db"
26 "meson"
27 "mpc"
28 "mpd"
29 "mpd-mpris"
30 "mpv"
31 "ncdu"
32 "ncmpcpp"
33 "ntfs-3g"
34 "nwg-look"
35 "pacman-contrib"
36 "pamixer"
37 "pavucontrol"
38 "pcmanfm"
39 "pipewire"
40 "pipewire-pulse"
41 "progress"
42 "python-gobject"
43 "python-pip"
44 "python-virtualenv"
45 "qpdf"
46 "reflector"
47 "ripgrep"
48 "rsync"
49 "sshfs"
50 "stow"
51 "tesseract"
52 "torbrowser-launcher"
53 "transmission-cli"
54 "noto-fonts"
55 "noto-fonts-cjk"
56 "noto-fonts-emoji"
57 "ttf-jetbrains-mono-nerd"
58 "tree"
59 "unzip"
60 "waybar"
61 "wget"
62 "woff2-font-awesome"
63 "wtype"
64 "xarchiver"
65 "xdg-user-dirs"
66 "yt-dlp"
67 "zathura"
68 "zathura-pdf-mupdf"
69 "zip"
70 "zola"
71 "zsh"
72 "zsh-autosuggestions"
73)
74
75pkg_dev_tools=(
76 "git"
77 "neovim"
78 "platformio-core"
79 "tmux"
80 "nodejs"
81 "lazygit"
82)
83
84pkg_optional=(
85 "keepassxc"
86 "obsidian"
87 "syncthing"
88 "newsboat"
89 "obs-studio"
90 "telegram-desktop"
91)
92
93pkg_nvidia=(
94 "nvidia"
95 "nvidia-utils"
96)
97
98pkg_desktop=(
99 "hypridle"
100 "hyprland"
101 "hyprlock"
102 "hyprpaper"
103 "hyprpicker"
104 "hyprpolkitagent"
105 "hyprshot"
106 "xdg-desktop-portal-hyprland"
107 "swaync"
108 "waybar"
109)
110
111pkg_aur=(
112 "envycontrol"
113 "htop-vim"
114 "jmtpfs"
115 "keepmenu"
116 "keyd-git"
117 "librewolf-bin"
118 "python-pywal16"
119 "tokyonight-gtk-theme-git"
120 "zsh-fast-syntax-highlighting-git"
121)
122
123
124# Install necessary desktop packages
125sudo pacman -S --needed "${pkg_desktop[@]}" "${pkg_utils[@]}"
126
127# Install dev tools
128read -rp "Do you wish to development tools? [y/n]" install_dev_tools
129if [[ $install_dev_tools == y ]]; then
130 sudo pacman -S --needed "${pkg_dev_tools[@]}"
131fi
132
133# Install optional packages
134read -rp "Do you wish to install optional packages? [y/n]" install_optional_pkg
135if [[ $install_optional_pkg == y ]]; then
136 sudo pacman -S --needed "${pkg_optional[@]}"
137fi
138
139# Install nvidia drivers
140read -rp "Do you wish to install Nvidia drivers? [y/n]" install_nvidia_drivers
141if [[ $install_nvidia_drivers == y ]]; then
142 sudo pacman -S --needed "${pkg_nvidia[@]}"
143fi
144
145
146# Install aur packages
147read -rp "Do you wish to aur packages? [y/n]" install_aur_pkg
148# Install paru if it isn't already installed
149if [[ $install_aur_pkg == y ]]; then
150 if ! command -v paru >/dev/null 2>&1; then
151 echo "Installing paru..."
152 git clone https://aur.archlinux.org/paru-bin.git
153 cd paru-bin
154 makepkg -sri
155 cd ..
156 rm -rf paru-bin
157 else
158 echo "Skipping paru (already in PATH)"
159 fi
160# Install aur packages
161paru -S --needed "${pkg_aur[@]}"
162fi
163
164
165# Setup dotfiles
166echo "⚠️ WARNING: This will DELETE any conflicting files and replace them with symlinks from this repo."
167echo " Make sure your dotfiles repo is the source of truth / already backed up."
168read -rp "Continue with stow (y/N): " confirm
169if [[ "$confirm" =~ ^[Yy]$ ]]; then
170 echo "Detecting conflicts..."
171 conflicts=$(stow . --no-folding -nv 2>&1 | \
172 sed -n 's/.*existing target \(.*\) since neither.*/\1/p')
173
174 if [[ -z "$conflicts" ]]; then
175 echo "No conflicts. Running stow normally..."
176 stow . --no-folding
177 echo "✅ Done."
178 else
179 echo "These paths conflict and will be removed:"
180 printf ' %s\n' $conflicts
181 read -rp "Proceed with deleting these files? (y/N): " ok
182 if [[ ! "$ok" =~ ^[Yy]$ ]]; then
183 echo "Aborted."
184 fi
185
186 # Remove conflicts relative to $HOME
187 for path in $conflicts; do
188 echo "Removing $HOME/$path"
189 rm -rf "$HOME/$path"
190 done
191
192 echo "Running stow..."
193 stow . --no-folding
194 echo "✅ Dotfiles stowed with overwrite."
195 fi
196else
197 echo "Aborted"
198fi