diff --git a/tabs/applications-setup/alacritty-setup.sh b/tabs/applications-setup/alacritty-setup.sh index 83eeb986b..ed3d49c59 100755 --- a/tabs/applications-setup/alacritty-setup.sh +++ b/tabs/applications-setup/alacritty-setup.sh @@ -3,34 +3,46 @@ . ../common-script.sh installAlacritty() { - printf "%b\n" "${YELLOW}Installing Alacritty...${RC}" - if ! command_exists alacritty; then - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y alacritty - ;; - esac + printf "%b" "${YELLOW}Do you want to install Alacritty? (Y/n): ${RC}" + read -r install_choice + if [ "$install_choice" != "n" ] && [ "$install_choice" != "N" ]; then + printf "%b\n" "${YELLOW}Installing Alacritty...${RC}" + if ! command_exists alacritty; then + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y alacritty + ;; + esac + else + printf "%b\n" "${GREEN}Alacritty is already installed.${RC}" + fi else - printf "%b\n" "${GREEN}Alacritty is already installed.${RC}" + printf "%b\n" "${GREEN}Skipping Alacritty installation.${RC}" fi } setupAlacrittyConfig() { - printf "%b\n" "${YELLOW}Copy alacritty config files${RC}" - if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then - cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak" + printf "%b" "${YELLOW}Do you want to backup existing configuration files? (Y/n): ${RC}" + read -r backup_choice + if [ "$backup_choice" != "n" ] && [ "$backup_choice" != "N" ]; then + printf "%b\n" "${YELLOW}Backing up existing Alacritty config files...${RC}" + if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then + cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak" + fi + printf "%b\n" "${GREEN}Alacritty configuration files backed up.${RC}" + else + printf "%b\n" "${GREEN}Skipping backup of Alacritty configuration files.${RC}" fi mkdir -p "${HOME}/.config/alacritty/" curl -sSLo "${HOME}/.config/alacritty/alacritty.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/alacritty.toml" curl -sSLo "${HOME}/.config/alacritty/keybinds.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/keybinds.toml" curl -sSLo "${HOME}/.config/alacritty/nordic.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/nordic.toml" - printf "%b\n" "${GREEN}Alacritty configuration files copied.${RC}" } checkEnv checkEscalationTool installAlacritty -setupAlacrittyConfig +setupAlacrittyConfig \ No newline at end of file diff --git a/tabs/applications-setup/bottles-setup.sh b/tabs/applications-setup/bottles-setup.sh index e7e792efa..29574ff14 100644 --- a/tabs/applications-setup/bottles-setup.sh +++ b/tabs/applications-setup/bottles-setup.sh @@ -3,10 +3,16 @@ . ../common-script.sh install_bottles() { - printf "%b\n" "${YELLOW}Installing Bottles...${RC}" - . ./setup-flatpak.sh - flatpak install -y flathub com.usebottles.bottles - printf "%b\n" "${GREEN}Bottles installed successfully. Restart the system to apply changes...${RC}" + printf "%b" "${YELLOW}Do you want to install Bottles? (Y/n): ${RC}" + read -r install_choice + if [ "$install_choice" != "n" ] && [ "$install_choice" != "N" ]; then + printf "%b\n" "${YELLOW}Installing Bottles...${RC}" + . ./setup-flatpak.sh + flatpak install -y flathub com.usebottles.bottles + printf "%b\n" "${GREEN}Bottles installed successfully.${RC}" + else + printf "%b\n" "${GREEN}Skipping Bottles installation.${RC}" + fi } checkEnv diff --git a/tabs/applications-setup/fastfetch-setup.sh b/tabs/applications-setup/fastfetch-setup.sh old mode 100644 new mode 100755 index dd6ca483a..6fa26f7a3 --- a/tabs/applications-setup/fastfetch-setup.sh +++ b/tabs/applications-setup/fastfetch-setup.sh @@ -3,25 +3,38 @@ . ../common-script.sh installFastfetch() { - printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}" - if ! command_exists fastfetch; then - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch - ;; - esac + printf "%b" "${YELLOW}Do you want to install Fastfetch? (Y/n): ${RC}" + read -r install_choice + if [ "$install_choice" != "n" ] && [ "$install_choice" != "N" ]; then + printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}" + if ! command_exists fastfetch; then + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch + ;; + esac + else + printf "%b\n" "${GREEN}Fastfetch is already installed.${RC}" + fi else - printf "%b\n" "${GREEN}Fastfetch is already installed.${RC}" + printf "%b\n" "${GREEN}Skipping Fastfetch installation.${RC}" fi } setupFastfetchConfig() { - printf "%b\n" "${YELLOW}Copying Fastfetch config files...${RC}" - if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then - cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak" + printf "%b" "${YELLOW}Do you want to backup existing Fastfetch configuration files? (Y/n): ${RC}" + read -r backup_choice + if [ "$backup_choice" != "n" ] && [ "$backup_choice" != "N" ]; then + printf "%b\n" "${YELLOW}Backing up existing Fastfetch configuration files...${RC}" + if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then + cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak" + fi + printf "%b\n" "${GREEN}Fastfetch configuration files backed up.${RC}" + else + printf "%b\n" "${GREEN}Skipping backup of Fastfetch configuration files.${RC}" fi mkdir -p "${HOME}/.config/fastfetch/" curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc diff --git a/tabs/applications-setup/kitty-setup.sh b/tabs/applications-setup/kitty-setup.sh index 0131b4bb4..45af7bf97 100755 --- a/tabs/applications-setup/kitty-setup.sh +++ b/tabs/applications-setup/kitty-setup.sh @@ -3,25 +3,38 @@ . ../common-script.sh installKitty() { - printf "%b\n" "${YELLOW}Install Kitty if not already installed...${RC}" - if ! command_exists kitty; then - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm kitty - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y kitty - ;; - esac + printf "%b" "${YELLOW}Do you want to install Kitty? (Y/n): ${RC}" + read -r install_choice + if [ "$install_choice" != "n" ] && [ "$install_choice" != "N" ]; then + printf "%b\n" "${YELLOW}Installing Kitty...${RC}" + if ! command_exists kitty; then + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm kitty + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y kitty + ;; + esac + else + printf "%b\n" "${GREEN}Kitty is already installed.${RC}" + fi else - printf "%b\n" "${GREEN}Kitty is already installed.${RC}" + printf "%b\n" "${GREEN}Skipping Kitty installation.${RC}" fi } setupKittyConfig() { - printf "%b\n" "${YELLOW}Copying Kitty configuration files...${RC}" - if [ -d "${HOME}/.config/kitty" ] && [ ! -d "${HOME}/.config/kitty-bak" ]; then - cp -r "${HOME}/.config/kitty" "${HOME}/.config/kitty-bak" + printf "%b" "${YELLOW}Do you want to backup existing Kitty configuration files? (Y/n): ${RC}" + read -r backup_choice + if [ "$backup_choice" != "n" ] && [ "$backup_choice" != "N" ]; then + printf "%b\n" "${YELLOW}Backing up existing Kitty configuration files...${RC}" + if [ -d "${HOME}/.config/kitty" ] && [ ! -d "${HOME}/.config/kitty-bak" ]; then + cp -r "${HOME}/.config/kitty" "${HOME}/.config/kitty-bak" + fi + printf "%b\n" "${GREEN}Kitty configuration files backed up.${RC}" + else + printf "%b\n" "${GREEN}Skipping backup of Kitty configuration files.${RC}" fi mkdir -p "${HOME}/.config/kitty/" curl -sSLo "${HOME}/.config/kitty/kitty.conf" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/kitty/kitty.conf diff --git a/tabs/system-setup/auto-mount.sh b/tabs/system-setup/auto-mount.sh index 7293f26ae..34081968e 100644 --- a/tabs/system-setup/auto-mount.sh +++ b/tabs/system-setup/auto-mount.sh @@ -6,9 +6,9 @@ select_drive() { clear printf "%b\n" "Available drives and partitions:" - lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT,LABEL,UUID | grep -v 'loop' # list all non-loop devices + lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT,LABEL,UUID | grep -v 'loop' | more # list all non-loop devices printf "\n" - printf "%b\n" "Enter the drive/partition name (e.g., sda1, sdb1): " + printf "%b" "Enter the drive/partition name (e.g., sda1, sdb1): " read -r drive_name # Check if the input is valid if lsblk | grep -q "${drive_name}"; then