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') datets=$(date '+%Y%m%d%H%M%S')
if [ -d ~/dotfiles ] || [ -f ~/.bashrc ]; then if [ -d ~/dotfiles ] || [ -f ~/.bashrc ]; then
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Backup"
____ _
| __ ) __ _ ___| | ___ _ _ __
| _ \ / _` |/ __| |/ / | | | '_ \
| |_) | (_| | (__| <| |_| | |_) |
|____/ \__,_|\___|_|\_\\__,_| .__/
|_|
EOF
echo -e "${NONE}" echo -e "${NONE}"
if [ -d ~/dotfiles ]; then if [ -d ~/dotfiles ]; then
echo "The script has detected an existing dotfiles folder and will try to create a backup into the folder:" 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 # Install .bashrc
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet ".bashrc"
_ _
| |__ __ _ ___| |__ _ __ ___
| '_ \ / _` / __| '_ \| '__/ __|
_| |_) | (_| \__ \ | | | | | (__
(_)_.__/ \__,_|___/_| |_|_| \___|
EOF
echo -e "${NONE}" echo -e "${NONE}"
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
echo "PLEASE NOTE AGAIN: The script has detected an existing .bashrc file." echo "PLEASE NOTE AGAIN: The script has detected an existing .bashrc file."

View File

@ -2,7 +2,7 @@
# Confirm Start # 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 "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." echo "If you have already installed a window manager like sway, please backup your .config folder."
SCRIPT=$(realpath "$0") SCRIPT=$(realpath "$0")
@ -15,7 +15,7 @@ if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then
exit exit
fi fi
fi fi
if [ ! -d ~/dotfiles ];then
if gum confirm "DO YOU WANT TO START THE INSTALLATION NOW?" ;then if gum confirm "DO YOU WANT TO START THE INSTALLATION NOW?" ;then
echo "Installation started." echo "Installation started."
elif [ $? -eq 130 ]; then elif [ $? -eq 130 ]; then
@ -24,4 +24,15 @@ else
echo "Installation canceled." echo "Installation canceled."
exit; exit;
fi fi
else
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 "" echo ""

View File

@ -3,26 +3,11 @@
# ------------------------------------------------------ # ------------------------------------------------------
if [ ! -d ~/dotfiles ]; then if [ ! -d ~/dotfiles ]; then
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Installation"
___ _ _ _ _ _ __ _ _
|_ _|_ __ ___| |_ __ _| | | __| | ___ | |_ / _(_) | ___ ___
| || '_ \/ __| __/ _` | | | / _` |/ _ \| __| |_| | |/ _ \/ __|
| || | | \__ \ || (_| | | | | (_| | (_) | |_| _| | | __/\__ \
|___|_| |_|___/\__\__,_|_|_| \__,_|\___/ \__|_| |_|_|\___||___/
EOF
echo -e "${NONE}" echo -e "${NONE}"
else else
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Update"
_ _ _ _ _ _ __ _ _
| | | |_ __ __| | __ _| |_ ___ __| | ___ | |_ / _(_) | ___ ___
| | | | '_ \ / _` |/ _` | __/ _ \ / _` |/ _ \| __| |_| | |/ _ \/ __|
| |_| | |_) | (_| | (_| | || __/ | (_| | (_) | |_| _| | | __/\__ \
\___/| .__/ \__,_|\__,_|\__\___| \__,_|\___/ \__|_| |_|_|\___||___/
|_|
EOF
echo -e "${NONE}" echo -e "${NONE}"
fi fi
if [ ! -d ~/dotfiles ]; then if [ ! -d ~/dotfiles ]; then

View File

@ -3,15 +3,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
disman=0 disman=0
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Display Manager"
____ _ _ __ __
| _ \(_)___ _ __ | | __ _ _ _ | \/ | __ _ _ __ __ _ __ _ ___ _ __
| | | | / __| '_ \| |/ _` | | | | | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
| |_| | \__ \ |_) | | (_| | |_| | | | | | (_| | | | | (_| | (_| | __/ |
|____/|_|___/ .__/|_|\__,_|\__, | |_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
|_| |___/ |___/
EOF
echo -e "${NONE}" echo -e "${NONE}"
if [[ $profile == *"Hyprland"* ]]; then if [[ $profile == *"Hyprland"* ]]; then
echo "IMPORTANT: Starting Hyprland works from tty (terminal) with command Hyprland (recommended)" echo "IMPORTANT: Starting Hyprland works from tty (terminal) with command Hyprland (recommended)"

View File

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

View File

@ -2,14 +2,7 @@
# Copy dotfiles # Copy dotfiles
# ------------------------------------------------------ # ------------------------------------------------------
if [ -f ~/dotfiles-versions/hook.sh ]; then if [ -f ~/dotfiles-versions/hook.sh ]; then
cat <<"EOF" figlet "Hook"
_ _ _
| | | | ___ ___ | | __
| |_| |/ _ \ / _ \| |/ /
| _ | (_) | (_) | <
|_| |_|\___/ \___/|_|\_\
EOF
echo "The script has detected a hook.sh script." echo "The script has detected a hook.sh script."
if gum confirm "Do you want to run the script now?"; then if gum confirm "Do you want to run the script now?"; then
source ~/dotfiles-versions/hook.sh source ~/dotfiles-versions/hook.sh

View File

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

View File

@ -4,14 +4,7 @@
if [ $disman == 1 ]; then if [ $disman == 1 ]; then
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "TTY issue"
_____ _______ __ _ _
|_ _|_ _\ \ / / | | ___ __ _(_)_ __
| | | | \ V / | |/ _ \ / _` | | '_ \
| | | | | | | | (_) | (_| | | | | |
|_| |_| |_| |_|\___/ \__, |_|_| |_|
|___/
EOF
echo -e "${NONE}" echo -e "${NONE}"
if gum confirm "Do you want to install the custom tty login issue?" ;then if gum confirm "Do you want to install the custom tty login issue?" ;then
sudo cp login/issue /etc/issue sudo cp login/issue /etc/issue

View File

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

View File

@ -4,14 +4,7 @@
if [[ $profile == *"Hyprland"* ]]; then if [[ $profile == *"Hyprland"* ]]; then
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Monitor"
__ __ _ _
| \/ | ___ _ __ (_) |_ ___ _ __ ___
| |\/| |/ _ \| '_ \| | __/ _ \| '__/ __|
| | | | (_) | | | | | || (_) | | \__ \
|_| |_|\___/|_| |_|_|\__\___/|_| |___/
EOF
echo -e "${NONE}" echo -e "${NONE}"
if [ "$monitorrestored" == "1" ]; then if [ "$monitorrestored" == "1" ]; then
echo "Monitor settings could already be restored". echo "Monitor settings could already be restored".

View File

@ -2,15 +2,7 @@
# Prepare dotfiles # Prepare dotfiles
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Preparation"
____ _ _
| _ \ _ __ ___ _ __ __ _ _ __ __ _| |_(_) ___ _ __
| |_) | '__/ _ \ '_ \ / _` | '__/ _` | __| |/ _ \| '_ \
| __/| | | __/ |_) | (_| | | | (_| | |_| | (_) | | | |
|_| |_| \___| .__/ \__,_|_| \__,_|\__|_|\___/|_| |_|
|_|
EOF
echo -e "${NONE}" echo -e "${NONE}"
echo "Preparing temporary folders for the installation." echo "Preparing temporary folders for the installation."
if [ ! -d ~/dotfiles-versions ]; then if [ ! -d ~/dotfiles-versions ]; then

View File

@ -2,15 +2,7 @@
# Select installation profile # Select installation profile
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Desktop Profile"
____ _ _ ____ __ _ _
| _ \ ___ ___| | _| |_ ___ _ __ | _ \ _ __ ___ / _(_) | ___
| | | |/ _ \/ __| |/ / __/ _ \| '_ \ | |_) | '__/ _ \| |_| | |/ _ \
| |_| | __/\__ \ <| || (_) | |_) | | __/| | | (_) | _| | | __/
|____/ \___||___/_|\_\\__\___/| .__/ |_| |_| \___/|_| |_|_|\___|
|_|
EOF
echo -e "${NONE}" echo -e "${NONE}"
echo "SPACE = select/unselect a profile. RETURN = confirm. No selection = CANCEL" echo "SPACE = select/unselect a profile. RETURN = confirm. No selection = CANCEL"

View File

@ -2,15 +2,7 @@
# Install pywal # Install pywal
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Pywal"
_
_ __ _ ___ ____ _| |
| '_ \| | | \ \ /\ / / _` | |
| |_) | |_| |\ V V / (_| | |
| .__/ \__, | \_/\_/ \__,_|_|
|_| |___/
EOF
echo -e "${NONE}" echo -e "${NONE}"
if [ -f /usr/bin/wal ]; then if [ -f /usr/bin/wal ]; then
echo "pywal already installed. Trying to force the installation with python-pywal" echo "pywal already installed. Trying to force the installation with python-pywal"

View File

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

View File

@ -8,7 +8,7 @@ echo ""
# Check for required packages # Check for required packages
echo ":: Checking that required packages for the installation are installed..." echo ":: Checking that required packages for the installation are installed..."
_installPackagesPacman "rsync" "gum"; _installPackagesPacman "rsync" "gum" "figlet";
echo "" echo ""
# Double check rsync # Double check rsync

View File

@ -1,14 +1,7 @@
# Set KVM environment variables # Set KVM environment variables
if [ $(_isKVM) == "0" ] ;then if [ $(_isKVM) == "0" ] ;then
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "KVM VM"
_ ____ ____ __ __ ____ __
| |/ /\ \ / / \/ | \ \ / / \/ |
| ' / \ \ / /| |\/| | \ \ / /| |\/| |
| . \ \ V / | | | | \ V / | | | |
|_|\_\ \_/ |_| |_| \_/ |_| |_|
EOF
echo -e "${NONE}" echo -e "${NONE}"
echo "The script has detected that you run the installation in a KVM virtual machine." 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 if gum confirm "Do you want to install the KVM environment variables?" ;then

View File

@ -2,15 +2,7 @@
# Install wallpapers # Install wallpapers
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "Wallpapers"
__ __ _ _
\ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___
\ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__/ __|
\ V V / (_| | | | |_) | (_| | |_) | __/ | \__ \
\_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| |___/
|_| |_|
EOF
echo -e "${NONE}" echo -e "${NONE}"
if [ ! -d ~/wallpaper ]; then if [ ! -d ~/wallpaper ]; then
echo "Do you want to download the wallpapers from repository https://gitlab.com/stephan-raabe/wallpaper/ ?" 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 # Check if yay is installed
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" figlet "yay"
_ _ __ _ _ _
| | | |/ _` | | | |
| |_| | (_| | |_| |
\__, |\__,_|\__, |
|___/ |___/
EOF
echo -e "${NONE}" echo -e "${NONE}"
if sudo pacman -Qs yay > /dev/null ; then if sudo pacman -Qs yay > /dev/null ; then
echo "yay is already installed!" echo "yay is already installed!"

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
source .install/version.sh source .install/version.sh
source .install/colors.sh source .install/colors.sh
source .install/library.sh
clear clear
# Set installation mode # Set installation mode
@ -13,11 +14,11 @@ if [ ! -z $1 ]; then
fi fi
echo -e "${GREEN}" echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
_ _ __ _ _ __ __ _ _ ___ __ _ _ __ _ _
__| | ___ | |_ / _(_) | ___ ___ | \/ | | | || \ \ / / __| | ___ | |_ / _(_) | ___ ___
/ _` |/ _ \| __| |_| | |/ _ \/ __| | |\/| | | | || |\ \ /\ / / / _` |/ _ \| __| |_| | |/ _ \/ __|
| (_| | (_) | |_| _| | | __/\__ \ | | | | |__|__ _\ V V / | (_| | (_) | |_| _| | | __/\__ \
\__,_|\___/ \__|_| |_|_|\___||___/ |_| |_|_____| |_| \_/\_/ \__,_|\___/ \__|_| |_|_|\___||___/
EOF EOF
echo -e "${NONE}" echo -e "${NONE}"
@ -27,7 +28,6 @@ echo "by Stephan Raabe 2023"
echo "" echo ""
echo "This script will guide you through the installation process of my dotfiles." echo "This script will guide you through the installation process of my dotfiles."
echo "" echo ""
source .install/library.sh
source .install/required.sh source .install/required.sh
source .install/confirm-start.sh source .install/confirm-start.sh
source .install/backup.sh source .install/backup.sh