From f2110afb48d942db50ae2360d389bf34aa585020 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Fri, 20 Sep 2024 00:03:49 +0200 Subject: [PATCH 1/6] Added `more` to partition listing in `9-auto-mount.sh` & removed unneccessary `\n` --- tabs/system-setup/auto-mount.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 418abf7cb2a8883a1ef48b47b3adbc92f646021b Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Thu, 19 Sep 2024 18:36:27 -0400 Subject: [PATCH 2/6] Phase 1: Alacritty --- tabs/applications-setup/alacritty-setup.sh | 42 +++++++++++++--------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/tabs/applications-setup/alacritty-setup.sh b/tabs/applications-setup/alacritty-setup.sh index 83eeb986b..ffd1ae838 100755 --- a/tabs/applications-setup/alacritty-setup.sh +++ b/tabs/applications-setup/alacritty-setup.sh @@ -3,34 +3,44 @@ . ../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" ]; 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" ]; 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 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}" + printf "%b\n" "${GREEN}Alacritty configuration files backed up.${RC}" } checkEnv checkEscalationTool installAlacritty -setupAlacrittyConfig +setupAlacrittyConfig \ No newline at end of file From 85513264e4cbc3619ebaf79bf96e65f2a8aa7818 Mon Sep 17 00:00:00 2001 From: Nyx <144965845+nnyyxxxx@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:42:27 -0400 Subject: [PATCH 3/6] add cap support Co-authored-by: Adam Perkowski --- tabs/applications-setup/alacritty-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabs/applications-setup/alacritty-setup.sh b/tabs/applications-setup/alacritty-setup.sh index ffd1ae838..9f974fd45 100755 --- a/tabs/applications-setup/alacritty-setup.sh +++ b/tabs/applications-setup/alacritty-setup.sh @@ -5,7 +5,7 @@ installAlacritty() { printf "%b" "${YELLOW}Do you want to install Alacritty? (Y/n): ${RC}" read -r install_choice - if [ "$install_choice" != "n" ]; then + if [ "$install_choice" != "n" ] && [ "$install_choice" != "N" ]; then printf "%b\n" "${YELLOW}Installing Alacritty...${RC}" if ! command_exists alacritty; then case "$PACKAGER" in @@ -27,7 +27,7 @@ installAlacritty() { setupAlacrittyConfig() { printf "%b" "${YELLOW}Do you want to backup existing configuration files? (Y/n): ${RC}" read -r backup_choice - if [ "$backup_choice" != "n" ]; then + 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" From 588123d4adf18bebdeb404ab66b19c23dcb6347d Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Thu, 19 Sep 2024 18:50:47 -0400 Subject: [PATCH 4/6] Phase 2: Bottles --- tabs/applications-setup/bottles-setup.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 From 41e373076d663974909f3fe7c46e541cc8db5a8e Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Thu, 19 Sep 2024 19:11:10 -0400 Subject: [PATCH 5/6] Phase 3: Add fastfetch & fix alacritty --- tabs/applications-setup/alacritty-setup.sh | 4 ++- tabs/applications-setup/fastfetch-setup.sh | 41 ++++++++++++++-------- 2 files changed, 30 insertions(+), 15 deletions(-) mode change 100644 => 100755 tabs/applications-setup/fastfetch-setup.sh diff --git a/tabs/applications-setup/alacritty-setup.sh b/tabs/applications-setup/alacritty-setup.sh index 9f974fd45..ed3d49c59 100755 --- a/tabs/applications-setup/alacritty-setup.sh +++ b/tabs/applications-setup/alacritty-setup.sh @@ -32,12 +32,14 @@ setupAlacrittyConfig() { 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 backed up.${RC}" } 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 From 65383762f61672c1e8286efa54938cbc8b7d9e03 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Thu, 19 Sep 2024 19:33:11 -0400 Subject: [PATCH 6/6] Phase 4: Kitty --- tabs/applications-setup/kitty-setup.sh | 41 +++++++++++++++++--------- 1 file changed, 27 insertions(+), 14 deletions(-) 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