From e1fba5699c3fdf89dd1d07b870b4faca2029a3f4 Mon Sep 17 00:00:00 2001 From: clsty Date: Thu, 4 Jan 2024 09:13:38 +0800 Subject: [PATCH] Read dependencies from a file. --- dependencies.txt | 14 ++++++++++++++ install.sh | 15 +++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 dependencies.txt diff --git a/dependencies.txt b/dependencies.txt new file mode 100644 index 000000000..fc1cf0216 --- /dev/null +++ b/dependencies.txt @@ -0,0 +1,14 @@ +coreutils curl rsync wget ripgrep gojq npm meson typescript gjs sassc +python-build python-material-color-utilities python-pillow python-poetry python-pywal +hyprland-git xorg-xrandr +cava pavucontrol wireplumber libdbusmenu-gtk3 plasma-browser-integration playerctl +webp-pixbuf-loader gtk-layer-shell gtk3 gobject-introspection upower +fuzzel yad ydotool +gtklock gtklock-playerctl-module gtklock-powerbar-module gtklock-userinfo-module +polkit-gnome gnome-keyring gnome-control-center +blueberry networkmanager brightnessctl wlsunset-git gnome-bluetooth-3.0 +wayland-idle-inhibitor-git swayidle swaylock-effects-git wlogout +wl-clipboard hyprpicker-git grim tesseract slurp +adw-gtk3-git gradience-git swww +lexend-fonts-git ttf-jetbrains-mono-nerd ttf-material-symbols-variable-git ttf-space-mono-nerd +fish foot starship diff --git a/install.sh b/install.sh index 40291770b..d783f59ea 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ function v() { echo -e "\e[34mDo you want to execute the command shown above? \e[0m" echo " y = Yes" echo " e = Exit now" - echo " s = Skip this command; NOT recommended unless you really sure" + echo " s = Skip this command; NOT recommended (may break functions needed by the dot files!)" echo " yesforall = yes and don't ask again; NOT recommended unless you really sure" read -p "Enter here [y/e/s/yesforall]:" p case $p in @@ -56,23 +56,30 @@ printf ' a = Abort. (DEFAULT)\n' read -p "Enter [y/n/A]: " p case $p in y)export ask=true;; - n)export ask=false; export noconfirm=" --noconfirm" ;; + n)export ask=false;; *)exit;; esac } case $1 in - "-f")export ask=false; export noconfirm=" --noconfirm" ;; + "-f")export ask=false;; *)startask ;; esac set -e +IFS_old=$IFS ##################################################################################### printf '\e[36m1. Get packages and add user to video/input groups\n\e[97m' -v yay -S --needed$noconfirm blueberry brightnessctl coreutils curl fish foot fuzzel gjs gnome-bluetooth-3.0 gnome-control-center gnome-keyring gobject-introspection grim gtk3 gtk-layer-shell libdbusmenu-gtk3 meson networkmanager npm plasma-browser-integration playerctl polkit-gnome python-pywal ripgrep sassc slurp starship swayidle typescript upower xorg-xrandr webp-pixbuf-loader wget wireplumber wl-clipboard tesseract yad ydotool adw-gtk3-git cava gojq gradience-git gtklock gtklock-playerctl-module gtklock-powerbar-module gtklock-userinfo-module hyprland-git lexend-fonts-git python-material-color-utilities python-pywal python-poetry python-build python-pillow swaylock-effects-git swww ttf-material-symbols-variable-git ttf-space-mono-nerd ttf-jetbrains-mono-nerd wayland-idle-inhibitor-git wlogout wlsunset-git hyprpicker-git rsync +readarray -t pkglist < dependencies.txt # NOTE: wayland-idle-inhibitor-git is for providing `wayland-idle-inhibitor.py' used by the `Keep system awake' button in `.config/ags/widgets/sideright/quicktoggles.js'. +if $ask;then + for i in "${pkglist[@]}";do v yay -S --needed $i;done +else + v yay -S --needed --noconfirm "${pkglist[*]}" +fi + v sudo usermod -aG video "$(whoami)" v sudo usermod -aG input "$(whoami)"