diff --git a/.editorconfig b/.editorconfig index c1e6aaf..ee39986 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,8 +7,9 @@ root = true [*] end_of_line = lf insert_final_newline = true +indent_size = 2 # Matches multiple files with brace expansion notation [*.{sh,py,yml}] indent_style = space -indent_size = 2 \ No newline at end of file +indent_size = 2 diff --git a/dependencies/pacman.txt b/dependencies/pacman.txt index 489dc5e..48a971d 100644 --- a/dependencies/pacman.txt +++ b/dependencies/pacman.txt @@ -24,7 +24,6 @@ networkmanager eog python python-pip -gdm neofetch git scrot @@ -87,3 +86,4 @@ blueman pulseaudio-bluetooth bluez bluez-libs +sddm diff --git a/install.sh b/install.sh index 6025680..1417817 100644 --- a/install.sh +++ b/install.sh @@ -6,52 +6,52 @@ # Ask a question and return true or false based on the users input ask() { - # from https://djm.me/ask - local prompt default reply + # from https://djm.me/ask + local prompt default reply - while true; do + while true; do - if [ "${2:-}" = "Y" ]; then - prompt="Y/n" - default=Y - elif [ "${2:-}" = "N" ]; then - prompt="y/N" - default=N - else - prompt="y/n" - default= - fi - echo -n "$1 [$prompt] " - read -r reply ~/.custom - echo "" > ~/.variables + # create empty .custom alias file + echo "" >~/.custom + echo "" >~/.variables - # system fixes - echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system - mkdir -p ~/Pictures/Screenshots + # system fixes + echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system + mkdir -p ~/Pictures/Screenshots } # Installs the dependencies on Arch Linux function install_dependencies { - fileToList dependencies/pacman.txt | xargs sudo pacman --noconfirm -S + fileToList dependencies/pacman.txt | xargs sudo pacman --noconfirm -S - install_trizen - fileToList dependencies/aur.txt | xargs trizen --force -S --noconfirm + install_trizen + fileToList dependencies/aur.txt | xargs trizen --force -S --noconfirm - fileToList dependencies/pip.txt | xargs sudo pip install + fileToList dependencies/pip.txt | xargs sudo pip install - fileToList dependencies/npm.txt | xargs sudo npm install -g + fileToList dependencies/npm.txt | xargs sudo npm install -g } - # ======================================= # User output functions # ======================================= # Run the intro bit function intro { - echo "___ ___ _ _ _ _ _ " - echo "| \/ | | | (_) | | | | ( )" - echo "| . . | __ _ ___| |_ ___ _ __ _ __ ___ _ _ __ __| |___| |__ |/ " - echo "| |\/| |/ _\` / __| __/ _ \ '__| '_ \` _ \| | '_ \ / _' |_ / '_ \ " - echo "| | | | (_| \__ \ || __/ | | | | | | | | | | | (_| |/ /| | | | " - echo "\_| |_/\__,_|___/\__\___|_| |_| |_| |_|_|_| |_|\__,_/___|_| |_| " - echo " " - echo " " - echo " __ _ _ " - echo " / _(_) ___ (_) " - echo " ___ ___ _ __ | |_ _ __ _ ( _ ) _ __ _ ___ ___ " - echo " / __/ _ \| '_ \| _| |/ _\` | / _ \/\ | '__| |/ __/ _ \ " - echo "| (_| (_) | | | | | | | (_| | | (_> < | | | | (_| __/ " - echo " \___\___/|_| |_|_| |_|\__, | \___/\/ |_| |_|\___\___| " - echo " __/ | " - echo " |___/ " - echo "" + echo "___ ___ _ _ _ _ _ " + echo "| \/ | | | (_) | | | | ( )" + echo "| . . | __ _ ___| |_ ___ _ __ _ __ ___ _ _ __ __| |___| |__ |/ " + echo "| |\/| |/ _\` / __| __/ _ \ '__| '_ \` _ \| | '_ \ / _' |_ / '_ \ " + echo "| | | | (_| \__ \ || __/ | | | | | | | | | | | (_| |/ /| | | | " + echo "\_| |_/\__,_|___/\__\___|_| |_| |_| |_|_|_| |_|\__,_/___|_| |_| " + echo " " + echo " " + echo " __ _ _ " + echo " / _(_) ___ (_) " + echo " ___ ___ _ __ | |_ _ __ _ ( _ ) _ __ _ ___ ___ " + echo " / __/ _ \| '_ \| _| |/ _\` | / _ \/\ | '__| |/ __/ _ \ " + echo "| (_| (_) | | | | | | | (_| | | (_> < | | | | (_| __/ " + echo " \___\___/|_| |_|_| |_|\__, | \___/\/ |_| |_|\___\___| " + echo " __/ | " + echo " |___/ " + echo "" } function computer { - echo " /\ " - echo " / \ " - echo " /_ %%==O=% _____________ " - echo " % - -% | '\\\\\\\\\\" - echo " _____c% > __ | ' ____|_ " - echo " (_|. . % \` % .' | + '||:::::: " - echo " ||. ___)%%%%_.' | '||_____| " - echo " ||.( \ ~ / ,)' \'_______|_____| " - echo " || /| \'/ |\ ___/____|___\___ " - echo " _,,,;!___*_____\_| _ ' <<<:| " - echo " / /| |_________'___o_o| " - echo " /_____/ / " - echo " |:____|/ \"Boy, I LOVE this stuff\". " - echo "" - echo "" + echo " /\ " + echo " / \ " + echo " /_ %%==O=% _____________ " + echo " % - -% | '\\\\\\\\\\" + echo " _____c% > __ | ' ____|_ " + echo " (_|. . % \` % .' | + '||:::::: " + echo " ||. ___)%%%%_.' | '||_____| " + echo " ||.( \ ~ / ,)' \'_______|_____| " + echo " || /| \'/ |\ ___/____|___\___ " + echo " _,,,;!___*_____\_| _ ' <<<:| " + echo " / /| |_________'___o_o| " + echo " /_____/ / " + echo " |:____|/ \"Boy, I LOVE this stuff\". " + echo "" + echo "" } - # ======================================= # Main loop # ======================================= @@ -188,24 +186,25 @@ intro ask "Do you want to continue installing my config and rice?" Y && -# Ask for dependency installation -if ask "Do you want to install the applications listen in ./dependencies? (might prompt for password)" Y; then + # Ask for dependency installation + if ask "Do you want to install the applications listen in ./dependencies? (might prompt for password)" Y; then install_dependencies -fi + fi # Ask for config installation if ask "Do you want to install the config files?" Y; then - install_config + install_config fi # Ask for font installation if ask "Do you want to install the fonts?" Y; then - install_fonts + install_fonts fi -# ask to enable gdm -if ask "Do you want to enable GDM?" Y; then - sudo systemctl enable gdm.service +# ask to enable the display manager +if ask "Do you want to enable sddm?" Y; then + sudo systemctl set-default graphical.target + sudo systemctl enable sddm.service fi clear @@ -214,17 +213,17 @@ computer prompt=$(echo $'\n> ' "Please select a specific computer to install or q to finish the install") PS3="$prompt: " -select opt in "$PWD/computers"/*; do - if (( REPLY == "q" )) ; then - break - - elif (( REPLY > 0 )) ; then - bash "$opt/install.sh" - break - else - echo "Invalid option. Try another one." - fi -done -clear +select opt in "$PWD/computers"/*; do + if ((REPLY == "q")); then + break -echo "Enjoy using my rice! Do not forget to select i3 in GDM :)" + elif ((REPLY > 0)); then + bash "$opt/install.sh" + break + else + echo "Invalid option. Try another one." + fi +done +clear + +echo "Enjoy using my rice! Do not forget to select i3 in sddm :)"