Add figlet

This commit is contained in:
Stephan Raabe 2023-12-21 21:57:44 +01:00
parent f30628c5e7
commit 442f8bed08
20 changed files with 45 additions and 167 deletions

View File

@ -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:"

View File

@ -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."

View File

@ -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 ""

View File

@ -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

View File

@ -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)"

View File

@ -3,14 +3,7 @@
# ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF"
____ ___ _ _ _____
| _ \ / _ \| \ | | ____|
| | | | | | | \| | _|
| |_| | |_| | |\ | |___
|____/ \___/|_| \_|_____|
EOF
figlet "Done"
echo -e "${NONE}"
echo "Please logout and reboot your system!"
echo ""

View File

@ -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

View File

@ -1,11 +1,3 @@
echo -e "${GREEN}"
cat <<"EOF"
_ _ _ _
| | | |_ _ _ __ _ __| | __ _ _ __ __| |
| |_| | | | | '_ \| '__| |/ _` | '_ \ / _` |
| _ | |_| | |_) | | | | (_| | | | | (_| |
|_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
|___/|_|
EOF
figlet "Hyprland"
echo -e "${NONE}"

View File

@ -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

View File

@ -3,14 +3,7 @@
# Setup
# ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF"
_ __ _ _
| |/ /___ _ _| |__ ___ __ _ _ __ __| |
| ' // _ \ | | | '_ \ / _ \ / _` | '__/ _` |
| . \ __/ |_| | |_) | (_) | (_| | | | (_| |
|_|\_\___|\__, |_.__/ \___/ \__,_|_| \__,_|
|___/
EOF
figlet "Keyboard"
echo -e "${NONE}"
# Default layout and variants

View File

@ -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".

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -1,10 +1,3 @@
echo -e "${GREEN}"
cat <<"EOF"
___ _ _ _
/ _ \| |_(_) | ___
| | | | __| | |/ _ \
| |_| | |_| | | __/
\__\_\\__|_|_|\___|
EOF
figlet "Qtile"
echo -e "${NONE}"

View File

@ -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

View File

@ -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

View File

@ -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/ ?"

View File

@ -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!"

View File

@ -1,6 +1,7 @@
#!/bin/bash
source .install/version.sh
source .install/colors.sh
source .install/library.sh
clear
# Set installation mode
@ -13,11 +14,11 @@ 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