diff --git a/.install/backup.sh b/.install/backup.sh index cf0d794..9fa2645 100755 --- a/.install/backup.sh +++ b/.install/backup.sh @@ -5,15 +5,7 @@ datets=$(date '+%Y%m%d%H%M%S') if [ -d ~/dotfiles ] || [ -f ~/.bashrc ]; then echo -e "${GREEN}" -cat <<"EOF" -____ _ -| __ ) __ _ ___| | ___ _ _ __ -| _ \ / _` |/ __| |/ / | | | '_ \ -| |_) | (_| | (__| <| |_| | |_) | -|____/ \__,_|\___|_|\_\\__,_| .__/ - |_| - -EOF +figlet "Backup" echo -e "${NONE}" if [ -d ~/dotfiles ]; then echo "The script has detected an existing dotfiles folder and will try to create a backup into the folder:" diff --git a/.install/bashrc.sh b/.install/bashrc.sh index 7831bc9..b60f6b2 100755 --- a/.install/bashrc.sh +++ b/.install/bashrc.sh @@ -2,13 +2,7 @@ # Install .bashrc # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" - _ _ - | |__ __ _ ___| |__ _ __ ___ - | '_ \ / _` / __| '_ \| '__/ __| - _| |_) | (_| \__ \ | | | | | (__ -(_)_.__/ \__,_|___/_| |_|_| \___| -EOF +figlet ".bashrc" echo -e "${NONE}" if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then echo "PLEASE NOTE AGAIN: The script has detected an existing .bashrc file." diff --git a/.install/confirm-start.sh b/.install/confirm-start.sh index 5a33bfb..34580ea 100644 --- a/.install/confirm-start.sh +++ b/.install/confirm-start.sh @@ -2,7 +2,7 @@ # Confirm Start # ------------------------------------------------------ -echo "IMPORTANT: Please make sure that your system and your packages are up to date." +echo "IMPORTANT: Please make sure that your system and your packages are up to date (sudo pacman -Syu or yay)." echo "You can cancel the installation at any time with CMD + C" echo "If you have already installed a window manager like sway, please backup your .config folder." SCRIPT=$(realpath "$0") @@ -15,13 +15,24 @@ if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then exit fi fi - -if gum confirm "DO YOU WANT TO START THE INSTALLATION NOW?" ;then - echo "Installation started." -elif [ $? -eq 130 ]; then - exit 130 +if [ ! -d ~/dotfiles ];then + if gum confirm "DO YOU WANT TO START THE INSTALLATION NOW?" ;then + echo "Installation started." + elif [ $? -eq 130 ]; then + exit 130 + else + echo "Installation canceled." + exit; + fi else - echo "Installation canceled." - exit; + echo "A ML4W dotfiles installation has been detected." + if gum confirm "DO YOU WANT TO START THE UPDATE NOW?" ;then + echo "Update started." + elif [ $? -eq 130 ]; then + exit 130 + else + echo "Update canceled." + exit; + fi fi echo "" diff --git a/.install/copy.sh b/.install/copy.sh index 36e2cae..f8f801e 100644 --- a/.install/copy.sh +++ b/.install/copy.sh @@ -3,26 +3,11 @@ # ------------------------------------------------------ if [ ! -d ~/dotfiles ]; then echo -e "${GREEN}" -cat <<"EOF" - ___ _ _ _ _ _ __ _ _ -|_ _|_ __ ___| |_ __ _| | | __| | ___ | |_ / _(_) | ___ ___ - | || '_ \/ __| __/ _` | | | / _` |/ _ \| __| |_| | |/ _ \/ __| - | || | | \__ \ || (_| | | | | (_| | (_) | |_| _| | | __/\__ \ -|___|_| |_|___/\__\__,_|_|_| \__,_|\___/ \__|_| |_|_|\___||___/ - -EOF +figlet "Installation" echo -e "${NONE}" else echo -e "${GREEN}" -cat <<"EOF" - _ _ _ _ _ _ __ _ _ -| | | |_ __ __| | __ _| |_ ___ __| | ___ | |_ / _(_) | ___ ___ -| | | | '_ \ / _` |/ _` | __/ _ \ / _` |/ _ \| __| |_| | |/ _ \/ __| -| |_| | |_) | (_| | (_| | || __/ | (_| | (_) | |_| _| | | __/\__ \ - \___/| .__/ \__,_|\__,_|\__\___| \__,_|\___/ \__|_| |_|_|\___||___/ - |_| - -EOF +figlet "Update" echo -e "${NONE}" fi if [ ! -d ~/dotfiles ]; then diff --git a/.install/displaymanager.sh b/.install/displaymanager.sh index 8d6825b..6d5bc0a 100755 --- a/.install/displaymanager.sh +++ b/.install/displaymanager.sh @@ -3,15 +3,7 @@ # ------------------------------------------------------ disman=0 echo -e "${GREEN}" -cat <<"EOF" - ____ _ _ __ __ -| _ \(_)___ _ __ | | __ _ _ _ | \/ | __ _ _ __ __ _ __ _ ___ _ __ -| | | | / __| '_ \| |/ _` | | | | | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__| -| |_| | \__ \ |_) | | (_| | |_| | | | | | (_| | | | | (_| | (_| | __/ | -|____/|_|___/ .__/|_|\__,_|\__, | |_| |_|\__,_|_| |_|\__,_|\__, |\___|_| - |_| |___/ |___/ - -EOF +figlet "Display Manager" echo -e "${NONE}" if [[ $profile == *"Hyprland"* ]]; then echo "IMPORTANT: Starting Hyprland works from tty (terminal) with command Hyprland (recommended)" diff --git a/.install/done.sh b/.install/done.sh index 53fa438..7df4884 100644 --- a/.install/done.sh +++ b/.install/done.sh @@ -3,14 +3,7 @@ # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" - ____ ___ _ _ _____ -| _ \ / _ \| \ | | ____| -| | | | | | | \| | _| -| |_| | |_| | |\ | |___ -|____/ \___/|_| \_|_____| - -EOF +figlet "Done" echo -e "${NONE}" echo "Please logout and reboot your system!" echo "" diff --git a/.install/hook.sh b/.install/hook.sh index e163ddc..51feb23 100755 --- a/.install/hook.sh +++ b/.install/hook.sh @@ -2,14 +2,7 @@ # Copy dotfiles # ------------------------------------------------------ if [ -f ~/dotfiles-versions/hook.sh ]; then -cat <<"EOF" - _ _ _ -| | | | ___ ___ | | __ -| |_| |/ _ \ / _ \| |/ / -| _ | (_) | (_) | < -|_| |_|\___/ \___/|_|\_\ - -EOF +figlet "Hook" echo "The script has detected a hook.sh script." if gum confirm "Do you want to run the script now?"; then source ~/dotfiles-versions/hook.sh diff --git a/.install/hyprland.sh b/.install/hyprland.sh index 93e56b1..95070e5 100644 --- a/.install/hyprland.sh +++ b/.install/hyprland.sh @@ -1,11 +1,3 @@ echo -e "${GREEN}" -cat <<"EOF" - _ _ _ _ -| | | |_ _ _ __ _ __| | __ _ _ __ __| | -| |_| | | | | '_ \| '__| |/ _` | '_ \ / _` | -| _ | |_| | |_) | | | | (_| | | | | (_| | -|_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_| - |___/|_| - -EOF +figlet "Hyprland" echo -e "${NONE}" \ No newline at end of file diff --git a/.install/issue.sh b/.install/issue.sh index a895e43..30c23e9 100644 --- a/.install/issue.sh +++ b/.install/issue.sh @@ -4,14 +4,7 @@ if [ $disman == 1 ]; then echo -e "${GREEN}" -cat <<"EOF" - _____ _______ __ _ _ -|_ _|_ _\ \ / / | | ___ __ _(_)_ __ - | | | | \ V / | |/ _ \ / _` | | '_ \ - | | | | | | | | (_) | (_| | | | | | - |_| |_| |_| |_|\___/ \__, |_|_| |_| - |___/ -EOF +figlet "TTY issue" echo -e "${NONE}" if gum confirm "Do you want to install the custom tty login issue?" ;then sudo cp login/issue /etc/issue diff --git a/.install/keyboard.sh b/.install/keyboard.sh index 2c13c15..1640b67 100755 --- a/.install/keyboard.sh +++ b/.install/keyboard.sh @@ -3,14 +3,7 @@ # Setup # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" - _ __ _ _ -| |/ /___ _ _| |__ ___ __ _ _ __ __| | -| ' // _ \ | | | '_ \ / _ \ / _` | '__/ _` | -| . \ __/ |_| | |_) | (_) | (_| | | | (_| | -|_|\_\___|\__, |_.__/ \___/ \__,_|_| \__,_| - |___/ -EOF +figlet "Keyboard" echo -e "${NONE}" # Default layout and variants diff --git a/.install/monitor.sh b/.install/monitor.sh index 4e7f630..28b3616 100644 --- a/.install/monitor.sh +++ b/.install/monitor.sh @@ -4,14 +4,7 @@ if [[ $profile == *"Hyprland"* ]]; then echo -e "${GREEN}" -cat <<"EOF" - __ __ _ _ -| \/ | ___ _ __ (_) |_ ___ _ __ ___ -| |\/| |/ _ \| '_ \| | __/ _ \| '__/ __| -| | | | (_) | | | | | || (_) | | \__ \ -|_| |_|\___/|_| |_|_|\__\___/|_| |___/ - -EOF +figlet "Monitor" echo -e "${NONE}" if [ "$monitorrestored" == "1" ]; then echo "Monitor settings could already be restored". diff --git a/.install/preparation.sh b/.install/preparation.sh index d20378a..95ab762 100644 --- a/.install/preparation.sh +++ b/.install/preparation.sh @@ -2,15 +2,7 @@ # Prepare dotfiles # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" - ____ _ _ -| _ \ _ __ ___ _ __ __ _ _ __ __ _| |_(_) ___ _ __ -| |_) | '__/ _ \ '_ \ / _` | '__/ _` | __| |/ _ \| '_ \ -| __/| | | __/ |_) | (_| | | | (_| | |_| | (_) | | | | -|_| |_| \___| .__/ \__,_|_| \__,_|\__|_|\___/|_| |_| - |_| - -EOF +figlet "Preparation" echo -e "${NONE}" echo "Preparing temporary folders for the installation." if [ ! -d ~/dotfiles-versions ]; then diff --git a/.install/profile.sh b/.install/profile.sh index 3ffe68c..91fcfb0 100755 --- a/.install/profile.sh +++ b/.install/profile.sh @@ -2,15 +2,7 @@ # Select installation profile # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" - ____ _ _ ____ __ _ _ -| _ \ ___ ___| | _| |_ ___ _ __ | _ \ _ __ ___ / _(_) | ___ -| | | |/ _ \/ __| |/ / __/ _ \| '_ \ | |_) | '__/ _ \| |_| | |/ _ \ -| |_| | __/\__ \ <| || (_) | |_) | | __/| | | (_) | _| | | __/ -|____/ \___||___/_|\_\\__\___/| .__/ |_| |_| \___/|_| |_|_|\___| - |_| - -EOF +figlet "Desktop Profile" echo -e "${NONE}" echo "SPACE = select/unselect a profile. RETURN = confirm. No selection = CANCEL" diff --git a/.install/pywal.sh b/.install/pywal.sh index 04e4b14..3f126ac 100644 --- a/.install/pywal.sh +++ b/.install/pywal.sh @@ -2,15 +2,7 @@ # Install pywal # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" - _ - _ __ _ ___ ____ _| | -| '_ \| | | \ \ /\ / / _` | | -| |_) | |_| |\ V V / (_| | | -| .__/ \__, | \_/\_/ \__,_|_| -|_| |___/ - -EOF +figlet "Pywal" echo -e "${NONE}" if [ -f /usr/bin/wal ]; then echo "pywal already installed. Trying to force the installation with python-pywal" diff --git a/.install/qtile.sh b/.install/qtile.sh index 8bb4328..1ceeb63 100644 --- a/.install/qtile.sh +++ b/.install/qtile.sh @@ -1,10 +1,3 @@ echo -e "${GREEN}" -cat <<"EOF" - ___ _ _ _ - / _ \| |_(_) | ___ -| | | | __| | |/ _ \ -| |_| | |_| | | __/ - \__\_\\__|_|_|\___| - -EOF +figlet "Qtile" echo -e "${NONE}" \ No newline at end of file diff --git a/.install/required.sh b/.install/required.sh index 5cfec0f..2bea5df 100644 --- a/.install/required.sh +++ b/.install/required.sh @@ -8,7 +8,7 @@ echo "" # Check for required packages echo ":: Checking that required packages for the installation are installed..." -_installPackagesPacman "rsync" "gum"; +_installPackagesPacman "rsync" "gum" "figlet"; echo "" # Double check rsync diff --git a/.install/vm.sh b/.install/vm.sh index 774a743..9d7ac20 100755 --- a/.install/vm.sh +++ b/.install/vm.sh @@ -1,14 +1,7 @@ # Set KVM environment variables if [ $(_isKVM) == "0" ] ;then echo -e "${GREEN}" -cat <<"EOF" - _ ____ ____ __ __ ____ __ -| |/ /\ \ / / \/ | \ \ / / \/ | -| ' / \ \ / /| |\/| | \ \ / /| |\/| | -| . \ \ V / | | | | \ V / | | | | -|_|\_\ \_/ |_| |_| \_/ |_| |_| - -EOF +figlet "KVM VM" echo -e "${NONE}" echo "The script has detected that you run the installation in a KVM virtual machine." if gum confirm "Do you want to install the KVM environment variables?" ;then diff --git a/.install/wallpaper.sh b/.install/wallpaper.sh index 96cdc3a..8fad4f7 100644 --- a/.install/wallpaper.sh +++ b/.install/wallpaper.sh @@ -2,15 +2,7 @@ # Install wallpapers # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" -__ __ _ _ -\ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___ - \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__/ __| - \ V V / (_| | | | |_) | (_| | |_) | __/ | \__ \ - \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| |___/ - |_| |_| - -EOF +figlet "Wallpapers" echo -e "${NONE}" if [ ! -d ~/wallpaper ]; then echo "Do you want to download the wallpapers from repository https://gitlab.com/stephan-raabe/wallpaper/ ?" diff --git a/.install/yay.sh b/.install/yay.sh index 36a8fc7..6b8083e 100644 --- a/.install/yay.sh +++ b/.install/yay.sh @@ -2,14 +2,7 @@ # Check if yay is installed # ------------------------------------------------------ echo -e "${GREEN}" -cat <<"EOF" - _ _ __ _ _ _ -| | | |/ _` | | | | -| |_| | (_| | |_| | - \__, |\__,_|\__, | - |___/ |___/ - -EOF +figlet "yay" echo -e "${NONE}" if sudo pacman -Qs yay > /dev/null ; then echo "yay is already installed!" diff --git a/install.sh b/install.sh index 292fad1..6c09782 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,7 @@ #!/bin/bash source .install/version.sh source .install/colors.sh +source .install/library.sh clear # Set installation mode @@ -13,12 +14,12 @@ if [ ! -z $1 ]; then fi echo -e "${GREEN}" cat <<"EOF" - _ _ __ _ _ - __| | ___ | |_ / _(_) | ___ ___ - / _` |/ _ \| __| |_| | |/ _ \/ __| -| (_| | (_) | |_| _| | | __/\__ \ - \__,_|\___/ \__|_| |_|_|\___||___/ - + __ __ _ _ ___ __ _ _ __ _ _ +| \/ | | | || \ \ / / __| | ___ | |_ / _(_) | ___ ___ +| |\/| | | | || |\ \ /\ / / / _` |/ _ \| __| |_| | |/ _ \/ __| +| | | | |__|__ _\ V V / | (_| | (_) | |_| _| | | __/\__ \ +|_| |_|_____| |_| \_/\_/ \__,_|\___/ \__|_| |_|_|\___||___/ + EOF echo -e "${NONE}" @@ -27,7 +28,6 @@ echo "by Stephan Raabe 2023" echo "" echo "This script will guide you through the installation process of my dotfiles." echo "" -source .install/library.sh source .install/required.sh source .install/confirm-start.sh source .install/backup.sh