diff --git a/default-programs b/default-programs index 09db145..e57418b 100644 --- a/default-programs +++ b/default-programs @@ -1,10 +1,8 @@ git-flow-completion-git dunst-git -dmenu-inkletblot slock notify-send -visual-studio-code-bin bitwarden-cli jq xmonad @@ -17,18 +15,13 @@ nitrogen xclip numlockx zenity -pactl (pavucontrol) +pavucontrol nfs-utils newsboat -runelite blueman networkmanager network-manager-applet -nextcloud-client -barrier -todoist-elecrton guake -slack-desktop xorg xorg-xinit mpv @@ -38,46 +31,27 @@ rofi thunar alacritty wget -git volumeicon -vlc -virtualbox -virt-manager -virsh unzip ttf-fira-code trayer -telegram-desktop -teams -steam (requires multi-lib) -qbittorrent python nodejs npm nvm -yay (required for many of the other packages) openssh - -(for nvidia) -nvidia-settings -nvidia -nvidia-prime - numlockx nano mosh fakeroot -ly (from git) jre-openjdk jre-openjdk-headless -kdeconnect htop gnome-keyring git-flow evince dosfstools grub2 -discord curl colorpicker-ym1234-git cmus @@ -87,3 +61,18 @@ ansible android-sdk-platform-tools lxappearance qt5ct +visual-studio-code-bin +runelite +slack-desktop +nextcloud-client +barrier +todoist-elecrton +vlc +virtualbox +virt-manager +virsh +discord +kdeconnect +telegram-desktop +teams +qbittorrent \ No newline at end of file diff --git a/scripts/install-dependencies b/scripts/install-dependencies index 7543370..3f6f0da 100755 --- a/scripts/install-dependencies +++ b/scripts/install-dependencies @@ -1,19 +1,87 @@ #!/bin/sh +# check user is happy to run this script +echo "This script is going to install all of the programs listed in /home//default-programs and their dependencies. As such it will ask for root privilages." +read -r -p "Are you sure you want to continue? [y/N] " input +case $input in +[yY][eE][sS] | [yY]) + echo "The program will continue..." + ;; +[nN][oO] | [nN]) + exit 0 + ;; +*) + echo "Invalid input..." + exit 1 + ;; +esac + +# if yay is not installed the run the install script +if ! command -v yay &> /dev/null; then + install-yay +fi + +# check with the user they are happy to update, exit if not though. +echo "The system needs to be updated before this installation can happen. The upgrades will be applied without any user oversight which may be dangerous for out of date systems." +read -r -p "Are you sure you want to continue? [y/N] " input +case $input in +[yY][eE][sS] | [yY]) + # Make sure everything is up to date + echo "Making sure everything is up to date..." + yay -Syyu --noconfirm + ;; +[nN][oO] | [nN]) + exit 0 + ;; +*) + echo "Invalid input..." + exit 1 + ;; +esac + +# run though each default program and install it if it's not already installed +# note that yay, git, steam, dmenu-inkletblot, ly and nvidia related programs are not included default_programs="/default-programs" - dependencies=$(cat $HOME/$default_programs) - for dependency in $dependencies do - if ! command -v $dependency &> /dev/null; then - yay -Sy --noconfirm $dependency + echo "Installing $dependency and it's dependencies..." + yay -S --noconfirm $dependency fi - - break - done -# notify about steam issue -# echo "There are a few programs that can't be automatically installed. The main one of these is Steam which requires multilib to be enabled. Instructions for this can be found at: https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib Once this is done steam can be installed." +# ask the user if they want to install nvidia dependencies, do it or skip +if ! command -v yay &> /dev/null && ! command -v yay &> /dev/null && ! command -v yay &> /dev/null; then + echo "My computer requires nvidia, as such I install the required drivers and programs" + read -r -p "Are you sure you want to install? [y/N] " input + case $input in + [yY][eE][sS] | [yY]) + echo "Nvidia is being installed..." + yay -S nvidia nvidia-settings nvidia-prime --noconfirm + ;; + [nN][oO] | [nN]) + echo "Nvidia installation has been skipped. Programs: nvidia, nvidia-settings, nvidia-prime" + ;; + *) + echo "Nvidia installation has been skipped. Programs: nvidia, nvidia-settings, nvidia-prime" + ;; + esac +fi + +# notify about steam issue (multilib) +echo "There are a few programs that can't be automatically installed. The main one of these is Steam which requires multilib to be enabled. Instructions for this can be found at: https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib Once this is done steam can be installed." +read -r -p "Press [ENTER] to continue.." + +# notify about ly and dmenu-inkletblot scripts +echo "I use two programs that are installed from git directly: ly and dmenu-inkletblot." +echo "I do not have install scripts for both of these. They have dependencies I can't guarantee are installed." +read -r -p "Press [ENTER] to continue.." + +# notify user that there may be extra steps to finish install +echo "This script has installed all of my default programs however it may not have configure many things. My dotfiles may cover some of these but things such as gnome-keyring (using the pam method) will need to be implemented. As well as setting up nvidia and xorg. There are likely more that I have forgotton as well." +read -r -p "Press [ENTER] to complete.." + +# need scripts for these +# dmenu-inkletblot +# ly diff --git a/scripts/install-yay b/scripts/install-yay index 8329171..cc04dd6 100755 --- a/scripts/install-yay +++ b/scripts/install-yay @@ -31,4 +31,7 @@ if ! command -v fakeroot &> /dev/null; then fi cd /opt -sudo git clone https://aur.archlinux.org/yay.git \ No newline at end of file +sudo git clone https://aur.archlinux.org/yay.git +sudo chown -R $USER:users ./yay +cd yay +makepkg -si \ No newline at end of file