From 093289ba9c4f1a8b58fd7ed93ed44f3c71c78ca9 Mon Sep 17 00:00:00 2001 From: doryan Date: Sun, 16 Feb 2025 18:43:56 +0400 Subject: [PATCH] feat(installer): complete advanced installation --- install.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 1178ccd..262d28d 100755 --- a/install.sh +++ b/install.sh @@ -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!"