From 42cc8dc3a5512d1883761257f138db7272b9ba90 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 23 May 2022 20:46:25 -0500 Subject: [PATCH] changes --- .config/gammastep/config.ini | 2 +- .../installers/{ => artix}/artix-install.sh | 85 ++++------------- .local/installers/{ => artix}/pkgs/aur.list | 3 + .local/installers/{ => artix}/pkgs/base.list | 5 +- .local/installers/{ => artix}/pkgs/repos.list | 0 .local/installers/artix/programs.sh | 93 +++++++++++++++++++ 6 files changed, 117 insertions(+), 71 deletions(-) rename .local/installers/{ => artix}/artix-install.sh (75%) rename .local/installers/{ => artix}/pkgs/aur.list (68%) rename .local/installers/{ => artix}/pkgs/base.list (97%) rename .local/installers/{ => artix}/pkgs/repos.list (100%) create mode 100644 .local/installers/artix/programs.sh diff --git a/.config/gammastep/config.ini b/.config/gammastep/config.ini index cdae925..e5a9bce 100644 --- a/.config/gammastep/config.ini +++ b/.config/gammastep/config.ini @@ -1,7 +1,7 @@ ; Global settings [general] ; Set the day and night screen temperatures -temp-day=3600 +temp-day=6000 temp-night=3500 ; Disable the smooth fade between temperatures when Redshift starts and stops. diff --git a/.local/installers/artix-install.sh b/.local/installers/artix/artix-install.sh similarity index 75% rename from .local/installers/artix-install.sh rename to .local/installers/artix/artix-install.sh index d862faf..dc7a627 100755 --- a/.local/installers/artix-install.sh +++ b/.local/installers/artix/artix-install.sh @@ -2,6 +2,7 @@ GIT_REPOS_DIR="$HOME/.local/src/" +. ./programs.sh #$1 -> repo name to enable #$2 -> mirror list file name in /etc/pacman.d/ (default: mirrorlist) @@ -44,6 +45,15 @@ enable_repos() { sudo sh -c 'echo "" >> /etc/pacman.conf' fi + + #ENABLE ARCH REPOSITORIES HERE + #enable arch community repo + enable_repo extra mirrorlist-arch + enable_repo community mirrorlist-arch + + + + sudo pacman -Sy #install yay for aur support @@ -83,70 +93,6 @@ runit_setup() { fi } -gaming() { - if [ "$1" = "--nvidia" ]; then - NVIDIA_GPU="TRUE" - elif [ "$1" = "--amd" ]; then - AMD_GPU="TRUE" - elif [ "$1" = "--intel" ]; then - INTEL_GPU="TRUE" - else - echo "Enter GPU type (amd nvidia intel):" - read input - - [ "$input" = "amd" ] && AMD_GPU="TRUE" - [ "$input" = "nvidia" ] && NVIDIA_GPU="TRUE" - [ "$input" = "intel" ] && INTEL_GPU="TRUE" - fi - - CMD=" -S --noconfirm " - - - [ "$2" = "-R" ] && CMD=" -Rs " - - - [ -z "$(grep "^\[lib32" /etc/pacman.conf)" ] && [ -z "$NVIDIA_GPU" ] && [ -z "$AMD_GPU" ] && [ -z "$INTEL_GPU" ] && help && exit - - [ "$NVIDIA_GPU" = "TRUE" ] && sudo pacman $CMD nvidia-utils lib32-nvidia-utils - [ "$AMD_GPU" = "TRUE" ] && sudo pacman $CMD vulkan-radeon lib32-vulkan-radeon - [ "$INTEL_GPU" = "TRUE" ] && sudo pacman $CMD vulkan-intel lib32-vulkan-intel - - sudo pacman $CMD vulkan-mesa-layers lib32-vulkan-mesa-layers - - sudo pacman $CMD wine-staging winetricks - sudo pacman $CMD giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo libxcomposite lib32-libxcomposite libxinerama lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader cups samba dosbox - - sudo pacman $CMD gamemode lib32-gamemode - sudo pacman $CMD lutris steam -} - -virt_manager() { - echo "install virt-manager?(y/N)" - read -r input - if [ "$input" = "y" ] || [ "$input" = "Y" ]; then - sudo pacman -S --noconfirm sudo pacman -S libvirt qemu virt-manager lxsession - sudo pacman -S --noconfirm gst-plugins-good libvirt-runit - - #TODO move this to runit_setup - sudo usermod -G libvirt -a "$USER" - fi - - runit_setup --virt-manager -} - -ungoogled_chromium() { - CMD=" --noconfirm -S " - - [ "$1" = "-R" ] && CMD=" -Rs " - - sudo pacman "$CMD" ffmpeg4.4 - sudo pacman "$CMD" ungoogled-chromium - sudo pacman "$CMD" ublock-origin - - yay "$CMD" aur/chromium-extension-web-store - yay "$CMD" aur/chromium-widevine -} - wireless() { sudo pacman -S --noconfirm wpa_supplicant bluez bluez-utils tlp sudo pacman -S --noconfirm wpa_supplicant-runit tlp-runit @@ -155,7 +101,6 @@ wireless() { } - configure() { #setup home directories mkdir ~/docs/ @@ -254,10 +199,10 @@ base() { enable_repos #install all packages in $PKGS - sudo pacman --noconfirm -S - < ./pkgs/base.list + sudo pacman --noconfirm --needed -S - < ./pkgs/base.list #installl all packages in $AUR_PKGS - yay --noconfirm -S - < ./pkgs/aur.list + yay --noconfirm --needed -S - < ./pkgs/aur.list #setup local git repos defined in $GIT_REPOS to $GIT_REPOS_DIR sh ~/.local/scripts/install.sh add-repos ./pkgs/repos.list @@ -290,7 +235,8 @@ base() { help() { echo " artix-install.sh" echo " --base perform basic install. Enable repos, install programs" - echo " --gaming install steam and lutris" + echo " --gaming install steam and lutris. Use flags --amd, --nvidia, --intel to install" + echo " with corresponding graphics drivers. Otherwise you will be prompted" echo " --virt-manager install virt-manager" echo " --wireless install/setup programs for wifi/bluetooth" echo " --ungoogled-chromium install ungoogled-chromium. also installs chrome-web-store and ublock origin" @@ -313,9 +259,10 @@ do done +[ "$#" = "0" ] && help && exit [ "$BASE" ] && base -[ "$GAMING" ] && gaming +[ "$GAMING" ] && gaming "$@" [ "$WIRELESS" ] && wireless [ "$UNGOOGLED_CHROMIUM" ] && ungoogled_chromium "$@" [ "$VIRT_MANAGER" ] && virt_manager diff --git a/.local/installers/pkgs/aur.list b/.local/installers/artix/pkgs/aur.list similarity index 68% rename from .local/installers/pkgs/aur.list rename to .local/installers/artix/pkgs/aur.list index 633fe99..d4fe81d 100644 --- a/.local/installers/pkgs/aur.list +++ b/.local/installers/artix/pkgs/aur.list @@ -8,3 +8,6 @@ pfetch sysrq-enabler wlr-randr sfeed +kjv-apocrypha +yt-watch +yt-dlp-drop-in diff --git a/.local/installers/pkgs/base.list b/.local/installers/artix/pkgs/base.list similarity index 97% rename from .local/installers/pkgs/base.list rename to .local/installers/artix/pkgs/base.list index a98b7b3..f872bcf 100644 --- a/.local/installers/pkgs/base.list +++ b/.local/installers/artix/pkgs/base.list @@ -34,7 +34,7 @@ python-pip udevil pavucontrol connman-gtk -youtube-dl +yt-dlp transmission-cli neovim mpd @@ -42,6 +42,7 @@ mpv opendoas zsh clang +lynx librewolf shellcheck noto-fonts @@ -58,6 +59,8 @@ papirus-icon-theme python-pdftotext viu bat +imv +ncmpcpp zathura zathura-cb zathura-djvu diff --git a/.local/installers/pkgs/repos.list b/.local/installers/artix/pkgs/repos.list similarity index 100% rename from .local/installers/pkgs/repos.list rename to .local/installers/artix/pkgs/repos.list diff --git a/.local/installers/artix/programs.sh b/.local/installers/artix/programs.sh new file mode 100644 index 0000000..e4795e0 --- /dev/null +++ b/.local/installers/artix/programs.sh @@ -0,0 +1,93 @@ +#!/bin/sh +############################################################################## +# This script provides functions to install/configure certain programs +# that are more complicated ( more than just pacman -S program ) to install/setup. +# +# These programs assume that yay, lib32, and arch's community repo has been enabled. +# If you get an error during installation try running ./artix-install.sh --base +############################################################################## + +repo_check() { + if [ -z "$(grep "^\[lib32" /etc/pacman.conf)" ] || + [ -z "$(grep "^\[community" /etc/pacman.conf)" ] || + [ ! -f "/usr/bin/yay" ]; then + echo "either yay, or the lib32 or community repos have not been setup correctly. Exiting" + exit + + fi +} + +ungoogled_chromium() { + repo_check + + CMD=" --noconfirm -S " + + [ "$1" = "-R" ] && CMD=" -Rs " + + sudo pacman "$CMD" ffmpeg4.4 + sudo pacman "$CMD" ungoogled-chromium + sudo pacman "$CMD" ublock-origin + + yay "$CMD" aur/chromium-extension-web-store + yay "$CMD" aur/chromium-widevine +} + +virt_manager() { + repo_check + + echo "install virt-manager?(y/N)" + read -r input + if [ "$input" = "y" ] || [ "$input" = "Y" ]; then + sudo pacman -S --noconfirm sudo pacman -S libvirt qemu virt-manager lxsession + sudo pacman -S --noconfirm gst-plugins-good libvirt-runit + + #TODO move this to runit_setup + sudo usermod -G libvirt -a "$USER" + fi + + runit_setup --virt-manager +} + +gaming() { + repo_check + + CMD=" -S --noconfirm " + + for arg in "$@" + do + if [ "$arg" = "--nvidia" ]; then + NVIDIA_GPU="TRUE" + elif [ "$arg" = "--amd" ]; then + AMD_GPU="TRUE" + elif [ "$arg" = "--intel" ]; then + INTEL_GPU="TRUE" + elif [ "$arg" = "-R" ]; then + CMD=" -Rs " + fi + done + + if [ -z "$NVIDIA_GPU" ] && [ -z "$AMD_GPU" ] && [ -z "$INTEL_GPU" ]; then + echo "Enter GPU type (amd nvidia intel):" + read input + + [ "$input" = "amd" ] && AMD_GPU="TRUE" + [ "$input" = "nvidia" ] && NVIDIA_GPU="TRUE" + [ "$input" = "intel" ] && INTEL_GPU="TRUE" + fi + + + [ -z "$(grep "^\[lib32" /etc/pacman.conf)" ] && [ -z "$NVIDIA_GPU" ] && [ -z "$AMD_GPU" ] && [ -z "$INTEL_GPU" ] && help && exit + + [ "$NVIDIA_GPU" = "TRUE" ] && sudo pacman $CMD nvidia-utils lib32-nvidia-utils + [ "$AMD_GPU" = "TRUE" ] && sudo pacman $CMD vulkan-radeon lib32-vulkan-radeon + [ "$INTEL_GPU" = "TRUE" ] && sudo pacman $CMD vulkan-intel lib32-vulkan-intel + + sudo pacman $CMD vulkan-mesa-layers lib32-vulkan-mesa-layers + + sudo pacman $CMD wine winetricks #wine-staging + sudo pacman $CMD giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo libxcomposite lib32-libxcomposite libxinerama lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader cups samba dosbox + + sudo pacman $CMD gamemode lib32-gamemode + sudo pacman $CMD lutris steam +} +