feat(sh): add new install script

This commit is contained in:
doryan 2025-01-20 03:06:36 +04:00
parent d17a5d9421
commit d0a50f5b05

View File

@ -1,10 +1,64 @@
#!/bin/bash
configs=("betterlockscreen" "bspwm" "btop" "picom" "polybar" "zathura" "rofi" "yazi" "sxhkd" "dunst" "mimeapps.list" "starship.toml")rlockscreen -u ~/.bg/bg_5.jpg
function install_config() {
for config in $1; do
cp -vr "${config}" "$2"
done
}
for config in ${configs[@]}; do
cp -vr ./$config ~/.config/
done
green="\e[92m"
dgreen="\e[32m"
end="\e[0m"
cp ./.zshrc ~/
cp -r ./.zsh ~/
general_configs=("btop" "picom" "zathura" "rofi" "yazi" "dunst" "mimeapps.list" "starship.toml")
home_dir_configs=(".bg" ".zshrc" ".zsh")
echo -e "${green}
_ __ _ ____ _
| | / /___ (_)___/ / / (_)___ __ ___ __
| | / / __ \/ / __ / / / / __ \/ / / / |/_/
| |/ / /_/ / / /_/ / /___/ / / / / /_/ /> <
|___/\____/_/\__,_/_____/_/_/ /_/\__,_/_/|_|${end}${dgreen}
____ __ _____ __
/ __ \____ / /_/ __(_) /__ _____
/ / / / __ \/ __/ /_/ / / _ \/ ___/
/ /_/ / /_/ / /_/ __/ / / __(__ )
/_____/\____/\__/_/ /_/_/\___/____/${end}
"
echo "Select your device type (Laptop: L/l, PC: P/p)"
read type
case "${type}" in
"L" | "l")
install_config $(ls -d -1 "$PWD/"Laptop/*) ~/.config/
;;
"P" | "p")
install_config $(ls -d -1 "$PWD/"PC/*) ~/.config/
;;
*)
echo "Please, select your device type correctly"
kill "$PID"
;;
esac
install_config ${general_configs[@]} ~/.config/
install_config ${home_dir_configs[@]} ~/
betterlockscreen -u ~/.bg/bg_5.png --fx blur --blur 1
echo "Do you want install custom bspwm xsession to /usr/share/xsessions/? It's needs to become root (Y/N):"
read advanced_install
case "${advanced_install}" in
"Y" | "y")
su root -c "cp -vf ./bspwm_session/* /usr/share/xsessions/"
;;
"N" | "n")
echo "Skip"
;;
*)
echo "Please, select your device type correctly"
kill "$PID"
;;
esac