diff --git a/configure-system b/configure-system index bfefed5..af57275 100755 --- a/configure-system +++ b/configure-system @@ -1,8 +1,41 @@ #!/bin/sh +#----------------------------------- +# Name: install-yay +# Version: 1.0.0 +# Author: Solomon Laing +# Description: +# Installs the AUR helper yay on the +# system. +#----------------------------------- + # configure extra system things like lightdm, etc. -# also set shell to fish # set up correct xmonad.sh e.g. if on laptop, set a copy that only has one xmobar? -read -r -p "This process is not complete... [enter] " input \ No newline at end of file +read -r -p "This process is not complete... [enter] " input + +# set shell to fish +if command -v fish &> /dev/null; then + read -r -p "You have the fish shell installed, would you like to set this as your default shell? [y/N]" + case $input in + [yY][eE][sS] | [yY]) + echo "Okay, setting shell to fish." + chsh -s `which fish` + ;; + [nN][oO] | [nN]) + echo "Okay, not setting shell." + ;; + *) + echo "Invalid input... Not setting shell." + ;; + esac +fi + +# notify about steam issue (multilib) +echo "Unfortunately Steam cannot be installed as [multilib] must be enabled first. Instructions for how to do this can be found at: https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib" +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 configured many things. My dotfiles may cover some of these but things such as gnome-keyring (using the pam method), as well as setting up nvidia and xorg may need some extra attention. There are likely more that I have forgotton as well." +read -r -p "Press [ENTER] to complete.." diff --git a/default-programs b/default-programs index cc3543c..9897709 100644 --- a/default-programs +++ b/default-programs @@ -50,6 +50,7 @@ DEPENDENCIES_END DEPENDENCIES_LAPTOP_START backlight_control +powerkit DEPENDENCIES_LAPTOP_END DEFAULTS_START diff --git a/get-sudo-password b/get-sudo-password index eeaacd7..fc2ecb8 100755 --- a/get-sudo-password +++ b/get-sudo-password @@ -21,4 +21,4 @@ done rm $file --force # to ignore if it isn't there touch $file -echo "$password" > $file \ No newline at end of file +echo "$password" > $file diff --git a/install-config b/install-config index 3dc888b..7af6b9a 100755 --- a/install-config +++ b/install-config @@ -28,4 +28,4 @@ case $input in esac cd dmenu-inkletblot -sudo -S make clean install \ No newline at end of file +sudo -S make clean install diff --git a/install-defaults b/install-defaults index 23a77b9..89e0f7b 100755 --- a/install-defaults +++ b/install-defaults @@ -1,5 +1,14 @@ #!/bin/sh +#----------------------------------- +# Name: install-yay +# Version: 1.0.0 +# Author: Solomon Laing +# Description: +# Installs the AUR helper yay on the +# system. +#----------------------------------- + clear default_programs="./default-programs" @@ -55,4 +64,4 @@ else echo "Default programs sucessfully installed" fi -exit 0 \ No newline at end of file +exit 0 diff --git a/install-dependencies b/install-dependencies index 57547c9..662859d 100755 --- a/install-dependencies +++ b/install-dependencies @@ -1,5 +1,14 @@ #!/bin/sh +#----------------------------------- +# Name: install-yay +# Version: 1.0.0 +# Author: Solomon Laing +# Description: +# Installs the AUR helper yay on the +# system. +#----------------------------------- + clear default_programs="./default-programs" @@ -92,4 +101,4 @@ else echo "Dependencies sucessfully installed" fi -exit 0 \ No newline at end of file +exit 0 diff --git a/install-dmenu-inkletblot b/install-dmenu-inkletblot index 7661400..62dfa17 100755 --- a/install-dmenu-inkletblot +++ b/install-dmenu-inkletblot @@ -40,4 +40,4 @@ if ! command -v dmenu &> /dev/null; then exit 1 fi -exit 0 \ No newline at end of file +exit 0 diff --git a/install-misc b/install-misc index 3c71bcc..7c8136d 100755 --- a/install-misc +++ b/install-misc @@ -1,5 +1,14 @@ #!/bin/sh +#----------------------------------- +# Name: install-yay +# Version: 1.0.0 +# Author: Solomon Laing +# Description: +# Installs the AUR helper yay on the +# system. +#----------------------------------- + clear default_programs="./default-programs" @@ -55,4 +64,4 @@ else echo "Misc programs sucessfully installed" fi -exit 0 \ No newline at end of file +exit 0 diff --git a/install-scripts b/install-scripts index c5e64a5..3ec8617 100755 --- a/install-scripts +++ b/install-scripts @@ -1,9 +1,18 @@ #!/bin/sh +#----------------------------------- +# Name: install-scripts +# Version: 1.0.0 +# Author: Solomon Laing +# Description: +# Installs my scripts inks-scripts on +# the system by copying them to /usr/local/bin. +#----------------------------------- + clear # 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." +echo "This script is going to install inks-scripts to the system, which are required for much of the supporting functionality in my dotfiles and WM. 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]) @@ -18,72 +27,8 @@ case $input in ;; esac -# if yay is not installed the run the install script -if ! command -v yay &> /dev/null; then - ./install-yay -fi +cd ./inks-scripts -# 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 +sudo cp scripts/* /usr/local/bin -# 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 - echo "Installing $dependency and it's dependencies..." - yay -S --noconfirm $dependency - fi -done - -# 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 +exit 0 diff --git a/install-yay b/install-yay index 1e4648c..8309c07 100755 --- a/install-yay +++ b/install-yay @@ -41,4 +41,6 @@ cd /opt sudo -S git clone https://aur.archlinux.org/yay.git sudo -S chown -R $USER:users ./yay cd yay -makepkg -si \ No newline at end of file +makepkg -si + +exit 0 diff --git a/setup b/setup index 48492dc..c209753 100755 --- a/setup +++ b/setup @@ -109,6 +109,15 @@ function install_config { fi } +# attempt to configure system +function configure_system { + cd $working_dir + ./configure-system + if [ $? -eq 1 ]; then + exit 1 + fi +} + function help { echo "Usage is:" echo " setup