Krolyxon
Commit 80cda2b

Branches

Refs →

aurora80cda2b

install.sh: split packages into seperate files

Author
krolxon
Date
2025-12-10 13:42 +0530
Parent
371950d
Commit
80cda2bb654d0a3403437d9daeebd255764970df

+161 −138

8 files changed

  1. M .stow-local-ignore +1 −0
  2. M install.sh +32 −138
  3. A packages/pkg_aur.sh +14 −0
  4. A packages/pkg_desktop.sh +14 −0
  5. A packages/pkg_dev_tools.sh +10 −0
  6. A packages/pkg_nvidia.sh +6 −0
  7. A packages/pkg_optional.sh +10 −0
  8. A packages/pkg_utils.sh +74 −0
M .stow-local-ignore View
@@ -2,4 +2,5 @@
22 README.md
33 assets
44 system
5+packages
56 install.sh
M install.sh View
@@ -1,152 +1,39 @@
11 #!/bin/env bash
22
3−pkg_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−
75−pkg_dev_tools=(
76− "git"
77− "neovim"
78− "platformio-core"
79− "tmux"
80− "nodejs"
81− "lazygit"
82−)
83−
84−pkg_optional=(
85− "keepassxc"
86− "obsidian"
87− "syncthing"
88− "newsboat"
89− "obs-studio"
90− "telegram-desktop"
91−)
92−
93−pkg_nvidia=(
94− "nvidia"
95− "nvidia-utils"
96−)
97−
98−pkg_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−
111−pkg_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
3+currentDir="$(dirname "$(readlink -f "$0")")"
4+cd "$currentDir"
5+
6+## Install necessary desktop packages
7+source "$currentDir/packages/pkg_desktop.sh"
8+source "$currentDir/packages/pkg_utils.sh"
1259 sudo pacman -S --needed "${pkg_desktop[@]}" "${pkg_utils[@]}"
12610
127−# Install dev tools
128−read -rp "Do you wish to development tools? [y/n]" install_dev_tools
11+## Install dev tools
12+read -rp "Do you wish to install development tools? [y/N]" install_dev_tools
13+source "$currentDir/packages/pkg_dev_tools.sh"
12914 if [[ $install_dev_tools == y ]]; then
13015 sudo pacman -S --needed "${pkg_dev_tools[@]}"
13116 fi
13217
133−# Install optional packages
134−read -rp "Do you wish to install optional packages? [y/n]" install_optional_pkg
18+## Install optional packages
19+read -rp "Do you wish to install optional packages? [y/N]" install_optional_pkg
13520 if [[ $install_optional_pkg == y ]]; then
21+ source "$currentDir/packages/pkg_optional.sh"
13622 sudo pacman -S --needed "${pkg_optional[@]}"
13723 fi
13824
139−# Install nvidia drivers
140−read -rp "Do you wish to install Nvidia drivers? [y/n]" install_nvidia_drivers
25+## Install nvidia drivers
26+read -rp "Do you wish to install Nvidia drivers? [y/N]" install_nvidia_drivers
14127 if [[ $install_nvidia_drivers == y ]]; then
28+ source "$currentDir/packages/pkg_nvidia.sh"
14229 sudo pacman -S --needed "${pkg_nvidia[@]}"
14330 fi
14431
14532
146−# Install aur packages
147−read -rp "Do you wish to install aur packages? [y/n]" install_aur_pkg
148−# Install paru if it isn't already installed
33+## Install aur packages
34+read -rp "Do you wish to install aur packages? [y/N]" install_aur_pkg
14935 if [[ $install_aur_pkg == y ]]; then
36+ ## Install paru if it isn't already installed
15037 if ! command -v paru >/dev/null 2>&1; then
15138 echo "Installing paru..."
15239 git clone https://aur.archlinux.org/paru-bin.git
@@ -157,14 +44,15 @@ if [[ $install_aur_pkg == y ]]; then
15744 else
15845 echo "Skipping paru (already in PATH)"
15946 fi
160−# Install aur packages
161−paru -S --needed "${pkg_aur[@]}"
47+ ## Install aur packages
48+ source "$currentDir/packages/pkg_aur.sh"
49+ paru -S --needed "${pkg_aur[@]}"
16250 fi
16351
16452
165−# Setup dotfiles
53+## Setup dotfiles
16654 echo "⚠️ WARNING: This will DELETE any conflicting files and replace them with symlinks from this repo."
167−echo " Make sure your dotfiles repo is the source of truth / already backed up."
55+echo "Make sure you have already backed up all your existing config files (~/.config)"
16856 read -rp "Continue with stow (y/N): " confirm
16957 if [[ "$confirm" =~ ^[Yy]$ ]]; then
17058 echo "Detecting conflicts..."
@@ -194,10 +82,11 @@ if [[ "$confirm" =~ ^[Yy]$ ]]; then
19482 echo "✅ Dotfiles stowed with overwrite."
19583 fi
19684 else
197− echo "Aborted"
85+ echo "Aborted stow"
19886 fi
19987
200−# Setup neovim dotfiles
88+
89+## Setup neovim dotfiles
20190 read -rp "Clone neovim dotfiles as well? (y/N): " confirm
20291 if [[ "$confirm" =~ ^[Yy]$ ]]; then
20392 echo "Taking backup of neovim config (if already exists)"
@@ -208,7 +97,7 @@ if [[ "$confirm" =~ ^[Yy]$ ]]; then
20897 git clone --depth=1 git@github.com:krolyxon/nvim.git ~/.config/nvim
20998 fi
21099
211−# Change default shell to zsh
100+## Change default shell to zsh
212101 if [[ "$SHELL" != "$(which zsh)" ]]; then
213102 read -rp "Change default shell to ZSH? (y/N): " confirm
214103 if [[ "$confirm" =~ ^[Yy]$ ]]; then
@@ -218,3 +107,8 @@ if [[ "$SHELL" != "$(which zsh)" ]]; then
218107 else
219108 echo "Skipping: zsh is already the default shell"
220109 fi
110+
111+
112+printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
113+echo ""
114+echo "Done! 😊"
A packages/pkg_aur.sh View
@@ -0,0 +1,14 @@
1+#!/bin/env bash
2+
3+
4+export pkg_aur=(
5+ "envycontrol"
6+ "htop-vim"
7+ "jmtpfs"
8+ "keepmenu"
9+ "keyd-git"
10+ "librewolf-bin"
11+ "python-pywal16"
12+ "tokyonight-gtk-theme-git"
13+ "zsh-fast-syntax-highlighting-git"
14+)
A packages/pkg_desktop.sh View
@@ -0,0 +1,14 @@
1+#!/bin/env bash
2+
3+export pkg_desktop=(
4+ "hypridle"
5+ "hyprland"
6+ "hyprlock"
7+ "hyprpaper"
8+ "hyprpicker"
9+ "hyprpolkitagent"
10+ "hyprshot"
11+ "xdg-desktop-portal-hyprland"
12+ "swaync"
13+ "waybar"
14+)
A packages/pkg_dev_tools.sh View
@@ -0,0 +1,10 @@
1+#!/bin/env bash
2+
3+export pkg_dev_tools=(
4+ "git"
5+ "neovim"
6+ "platformio-core"
7+ "tmux"
8+ "nodejs"
9+ "lazygit"
10+)
A packages/pkg_nvidia.sh View
@@ -0,0 +1,6 @@
1+#!/bin/env bash
2+
3+export pkg_nvidia=(
4+ "nvidia"
5+ "nvidia-utils"
6+)
A packages/pkg_optional.sh View
@@ -0,0 +1,10 @@
1+#!/bin/env bash
2+
3+export pkg_optional=(
4+ "keepassxc"
5+ "obsidian"
6+ "syncthing"
7+ "newsboat"
8+ "obs-studio"
9+ "telegram-desktop"
10+)
A packages/pkg_utils.sh View
@@ -0,0 +1,74 @@
1+#!/bin/env bash
2+
3+export pkg_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+