✨ scripts(install, utils): update scripts for colorshell + remove personal dots
This commit is contained in:
Executable
+72
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
source ./utils.sh
|
||||
|
||||
set -e
|
||||
trap "printf \"\nOk, quitting beacuse you entered an exit signal. (SIGINT).\n\"; exit 1" SIGINT
|
||||
trap "printf \"\nOh noo!! Some application just killed the script!\"; exit 2" SIGTERM
|
||||
|
||||
function Apply_wallpapers() {
|
||||
echo -n "Would you also like to apply the wallpapers folder? :3 [y/n] "
|
||||
read answer
|
||||
printf "\n"
|
||||
|
||||
if [[ $answer =~ "y" ]]; then
|
||||
echo "Thanks for choosing! Please remember that I am not the author of the wallpapers!"
|
||||
echo "You can see sources in the repo: https://github.com/retrozinndev/Hyprland-Dots/WALLPAPERS.md"
|
||||
|
||||
echo "-> Copying wallpapers to ~/wallpapers"
|
||||
mkdir -p $HOME/wallpapers
|
||||
cp -f ./wallpapers/* $HOME/wallpapers
|
||||
else
|
||||
echo "Ok! The wallpaper is yours to choose!"
|
||||
echo "Tip: create a directory named \"wallpapers/\" on your home dir, put your wallpapers there and press ´SUPER + W´ to select any of them :3"
|
||||
fi
|
||||
}
|
||||
|
||||
for dir in ${config_dirs[@]}; do
|
||||
if ! [[ -d ./$dir ]]; then
|
||||
Send_log error "$dir is in fault, or you didn't run this script in its directory!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#########
|
||||
# Start #
|
||||
#########
|
||||
|
||||
Print_header
|
||||
echo -e "colorshell is a project made by retrozinndev. source: https://github.com/retrozinndev/colorshell\n"
|
||||
sleep .5
|
||||
|
||||
echo "Welcome to the colorshell installation script!"
|
||||
|
||||
# Warn user of possible problems that can happen
|
||||
echo "!!!WARNING!!! By running this script, you assume total responsability for any issues that may occur"
|
||||
|
||||
echo -n "Do you want to start the shell installation? [y/n] "
|
||||
read input
|
||||
|
||||
if [[ $input =~ "y" ]]; then
|
||||
Send_log "Starting installation...\n"
|
||||
|
||||
for dir in ${config_dirs[@]}; do
|
||||
dest=$XDG_CONFIG_HOME/$dir
|
||||
|
||||
echo "-> Installing $dir in $dest"
|
||||
mkdir -p $dest
|
||||
cp -rf ./$dir/* $dest
|
||||
done
|
||||
|
||||
# Ask if user also wants to install default wallpapers
|
||||
Apply_wallpapers
|
||||
|
||||
echo "Ah yes! Looks like it's installed, yay :3"
|
||||
echo -e "If you find any issue, please report it in: https://github.com/retrozinndev/Hyprland-Dots/issues"
|
||||
echo "Thanks for using colorshell! I'm really appreciate that :D"
|
||||
|
||||
printf "\n"
|
||||
else
|
||||
printf "Ok, doing as you said! Bye bye!\n"
|
||||
exit 0
|
||||
fi
|
||||
Reference in New Issue
Block a user