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