feat(installer): complete advanced installation

This commit is contained in:
doryan 2025-02-16 18:43:56 +04:00
parent 7e4714d382
commit 093289ba9c

View File

@ -1,7 +1,7 @@
#!/bin/bash
function install_config() {
for config in ${@:2}; do
for config in "${@:2}"; do
cp -vr "./${config}" "$1"
done
}
@ -27,7 +27,7 @@ echo -e "${green}
"
echo "Select your device type (Laptop: L/l, PC: P/p)"
read type
read -r type
case "${type}" in
"L" | "l")
@ -42,24 +42,30 @@ case "${type}" in
;;
esac
install_config ~/.config/ ${general_configs[@]}
install_config ~/ ${home_dir_configs[@]}
install_config ~/.config/ "${general_configs[@]}"
install_config ~/ "${home_dir_configs[@]}"
betterlockscreen -u ~/.bg/bg_5.png --fx blur --blur 1
echo "Do you want install bspwm_session, X11, fonts and acpid (for laptop) configs? (y/N):"
read advanced_install
read -r advanced_install
case "${advanced_install}" in
"Y" | "y")
sudo cp -vfr ./bspwm_session/* /usr/share/xsessions
sudo cp -vrf ./root_configs/fonts /etc
if [[ $type == "L" | $type == "l" ]] -; then
sudo cp -vfr ./root_configs/acpi /etc
else
fi
su --shell /bin/bash -c "
cp -vrf ./bspwm_session/* /usr/share/xsessions
cp -vrf ./root_configs/fonts /etc
mkdir -p /etc/X11/xorg.conf.d
cp -vf ./root_configs/xorg.conf.d/00-keyboard.conf /etc/X11/xorg.conf.d/
if [[ \"$type\" = \"L\" || \"$type\" = \"l\" ]] ; then
cp -vfr ./root_configs/acpi /etc
cp -vf ./root_configs/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d/
fi
"
;;
"N" | "n" | "*")
echo "Skip"
;;
esac
echo "Installation is complete, have a fun!"