Read dependencies from a file.

This commit is contained in:
clsty
2024-01-04 09:13:38 +08:00
parent 719c223821
commit e1fba5699c
2 changed files with 25 additions and 4 deletions
+14
View File
@@ -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
+11 -4
View File
@@ -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)"