From 7a840ff2fc186bee675628afc38334264fc12e98 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Fri, 20 Sep 2024 18:00:00 -0400 Subject: [PATCH 1/7] Refactor existing shell scripts & moving scripts around --- core/tabs/applications-setup/browser-setup.sh | 16 +++++------ .../docker-setup.sh | 2 +- .../grub-theme.sh | 0 .../applications-setup/linutil-installer.sh | 2 +- .../applications-setup/office-suite-setup.sh | 27 ++++++++++--------- core/tabs/applications-setup/setup-flatpak.sh | 26 ++++-------------- core/tabs/applications-setup/tab_data.toml | 8 ++++++ core/tabs/system-setup/system-cleanup.sh | 2 +- core/tabs/system-setup/tab_data.toml | 16 ----------- .../{system-setup => utils}/auto-mount.sh | 0 .../samba-ssh-setup.sh | 24 ++++++++--------- core/tabs/utils/tab_data.toml | 8 ++++++ 12 files changed, 59 insertions(+), 72 deletions(-) mode change 100644 => 100755 core/tabs/applications-setup/browser-setup.sh rename core/tabs/{system-setup => applications-setup}/docker-setup.sh (98%) rename core/tabs/{system-setup => applications-setup}/grub-theme.sh (100%) mode change 100644 => 100755 core/tabs/applications-setup/setup-flatpak.sh rename core/tabs/{system-setup => utils}/auto-mount.sh (100%) rename core/tabs/{system-setup => utils}/samba-ssh-setup.sh (91%) diff --git a/core/tabs/applications-setup/browser-setup.sh b/core/tabs/applications-setup/browser-setup.sh old mode 100644 new mode 100755 index 62b8cbffd..15270ec37 --- a/core/tabs/applications-setup/browser-setup.sh +++ b/core/tabs/applications-setup/browser-setup.sh @@ -3,8 +3,8 @@ . ../common-script.sh install_chrome() { - printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}." if ! command_exists google-chrome; then + printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}." case "$PACKAGER" in apt-get|nala) curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb @@ -33,8 +33,8 @@ install_chrome() { } install_thorium() { - printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}" if ! command_exists thorium-browser; then + printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}" case "$PACKAGER" in apt-get|nala) "$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list @@ -61,8 +61,8 @@ install_thorium() { } install_firefox() { - printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}" if ! command_exists firefox; then + printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}" case "$PACKAGER" in apt-get|nala) "$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr @@ -86,8 +86,8 @@ install_firefox() { } install_librewolf() { - printf "%b\n" "${YELLOW}Installing Librewolf...${RC}" if ! command_exists librewolf; then + printf "%b\n" "${YELLOW}Installing Librewolf...${RC}" case "$PACKAGER" in apt-get|nala) "$ESCALATION_TOOL" "$PACKAGER" install -y gnupg lsb-release apt-transport-https ca-certificates @@ -128,8 +128,8 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/ } install_brave() { - printf "%b\n" "${YELLOW}Installing Brave...${RC}" if ! command_exists brave; then + printf "%b\n" "${YELLOW}Installing Brave...${RC}" case "$PACKAGER" in apt-get|nala) "$ESCALATION_TOOL" "$PACKAGER" install -y curl @@ -177,8 +177,8 @@ install_vivaldi() { } install_chromium() { - printf "%b\n" "${YELLOW}Installing Chromium...${RC}" if ! command_exists chromium; then + printf "%b\n" "${YELLOW}Installing Chromium...${RC}" case "$PACKAGER" in apt-get|nala|zypper) "$ESCALATION_TOOL" "$PACKAGER" install -y chromium @@ -200,8 +200,8 @@ install_chromium() { } install_lynx() { - printf "%b\n" "${YELLOW}Installing Lynx...${RC}" if ! command_exists lynx; then + printf "%b\n" "${YELLOW}Installing Lynx...${RC}" case "$PACKAGER" in pacman) "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm lynx @@ -229,7 +229,7 @@ browserSetup() { printf "%b\n" "7. Thorium" printf "%b\n" "8. Lynx" printf "%b\n" "----------------------------" - printf "%b\n" "Enter your choices (e.g., 1 3 5): " + printf "%b" "Enter your choices (e.g., 1 3 5): " read -r choice for ch in $choice; do case $ch in diff --git a/core/tabs/system-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh similarity index 98% rename from core/tabs/system-setup/docker-setup.sh rename to core/tabs/applications-setup/docker-setup.sh index b082788b1..77f3da98c 100755 --- a/core/tabs/system-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -9,7 +9,7 @@ choose_installation() { printf "%b\n" "1. ${YELLOW}Docker${RC}" printf "%b\n" "2. ${YELLOW}Docker Compose${RC}" printf "%b\n" "3. ${YELLOW}Both${RC}" - printf "Enter your choice [1-3]: " + printf "%b" "Enter your choice [1-3]: " read -r CHOICE case "$CHOICE" in diff --git a/core/tabs/system-setup/grub-theme.sh b/core/tabs/applications-setup/grub-theme.sh similarity index 100% rename from core/tabs/system-setup/grub-theme.sh rename to core/tabs/applications-setup/grub-theme.sh diff --git a/core/tabs/applications-setup/linutil-installer.sh b/core/tabs/applications-setup/linutil-installer.sh index 7fbb09a65..37461bb9c 100755 --- a/core/tabs/applications-setup/linutil-installer.sh +++ b/core/tabs/applications-setup/linutil-installer.sh @@ -59,4 +59,4 @@ installLinutil() { checkEnv checkEscalationTool checkAURHelper -installLinutil +installLinutil \ No newline at end of file diff --git a/core/tabs/applications-setup/office-suite-setup.sh b/core/tabs/applications-setup/office-suite-setup.sh index bbf546020..3d05d8d5c 100644 --- a/core/tabs/applications-setup/office-suite-setup.sh +++ b/core/tabs/applications-setup/office-suite-setup.sh @@ -3,8 +3,8 @@ . ../common-script.sh install_onlyoffice() { - printf "%b\n" "${YELLOW}Installing Only Office..${RC}." if ! command_exists onlyoffice-desktopeditors; then + printf "%b\n" "${YELLOW}Installing Only Office..${RC}." case "$PACKAGER" in apt-get|nala) curl -O https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb @@ -27,8 +27,8 @@ install_onlyoffice() { } install_libreoffice() { - printf "%b\n" "${YELLOW}Installing Libre Office...${RC}" if ! command_exists libreoffice; then + printf "%b\n" "${YELLOW}Installing Libre Office...${RC}" case "$PACKAGER" in apt-get|nala) "$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core @@ -51,8 +51,8 @@ install_libreoffice() { } install_wpsoffice() { - printf "%b\n" "${YELLOW}Installing WPS Office...${RC}" if ! command_exists com.wps.Office; then + printf "%b\n" "${YELLOW}Installing WPS Office...${RC}" case "$PACKAGER" in pacman) "$AUR_HELPER" -S --noconfirm wps-office @@ -69,8 +69,9 @@ install_wpsoffice() { # needs to be updated every year for latest version install_freeoffice() { - printf "%b\n" "${YELLOW}Installing Free Office...${RC}" - case "$PACKAGER" in + if ! command_exists softmaker-freeoffice-2024 freeoffice softmaker; then + printf "%b\n" "${YELLOW}Installing Free Office...${RC}" + case "$PACKAGER" in apt-get|nala) curl -O https://www.softmaker.net/down/softmaker-freeoffice-2024_1218-01_amd64.deb "$ESCALATION_TOOL" dpkg -i softmaker-freeoffice-2024_1218-01_amd64.deb @@ -91,12 +92,15 @@ install_freeoffice() { *) printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}" ;; - esac + esac + else + printf "%b\n" "${GREEN}Free Office is already installed.${RC}" + fi } install_evince() { - printf "%b\n" "${YELLOW}Installing Evince...${RC}" if ! command_exists evince; then + printf "%b\n" "${YELLOW}Installing Evince...${RC}" case "$PACKAGER" in pacman) "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm evince @@ -111,8 +115,8 @@ install_evince() { } install_okular() { - printf "%b\n" "${YELLOW}Installing Evince...${RC}" if ! command_exists okular; then + printf "%b\n" "${YELLOW}Installing Okular...${RC}" case "$PACKAGER" in pacman) "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm okular @@ -127,8 +131,8 @@ install_okular() { } install_pdfstudioviewer() { - printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}" if ! command_exists pdfstudioviewer2024/pdfstudioviewer2024; then + printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}" curl -O https://download.qoppa.com/pdfstudioviewer/PDFStudioViewer_linux64.sh "$ESCALATION_TOOL" chmod +x PDFStudioViewer_linux64.sh if sh PDFStudioViewer_linux64.sh; then @@ -143,8 +147,8 @@ install_pdfstudioviewer() { } install_pdfstudio() { - printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}" if ! command_exists pdfstudio2024/pdfstudio2024; then + printf "%b\n" "${YELLOW}Installing PDF Studio...${RC}" curl -O https://download.qoppa.com/pdfstudio/PDFStudio_linux64.sh "$ESCALATION_TOOL" chmod +x PDFStudio_linux64.sh if sh PDFStudio_linux64.sh; then @@ -158,7 +162,6 @@ install_pdfstudio() { fi } - officeSuiteSetup() { clear printf "%b\n" "Office Suite Setup Script" @@ -175,7 +178,7 @@ officeSuiteSetup() { printf "%b\n" "7. PDF Studio Viewer" printf "%b\n" "8. PDF Studio (Paid Software)" printf "%b\n" "----------------------------" - printf "%b\n" "Enter your choices (e.g., 1 3 5): " + printf "%b" "Enter your choices (e.g., 1 3 5): " read -r choice for ch in $choice; do case $ch in diff --git a/core/tabs/applications-setup/setup-flatpak.sh b/core/tabs/applications-setup/setup-flatpak.sh old mode 100644 new mode 100755 index 66f8a8030..9dd4002ec --- a/core/tabs/applications-setup/setup-flatpak.sh +++ b/core/tabs/applications-setup/setup-flatpak.sh @@ -25,32 +25,16 @@ setup_flatpak() { pacman) "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm flatpak ;; - apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y flatpak - ;; - dnf) - "$ESCALATION_TOOL" "$PACKAGER" install -y flatpak # Fedora should have flatpak already installed, this is just a failsafe - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" install -y flatpak - ;; - yum) - "$ESCALATION_TOOL" "$PACKAGER" install -y flatpak - ;; - xbps-install) - "$ESCALATION_TOOL" "$PACKAGER" install -S flatpak - ;; *) - printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}" - exit 1 + "$ESCALATION_TOOL" "$PACKAGER" install -y flatpak ;; esac printf "%b\n" "Adding Flathub remote..." "$ESCALATION_TOOL" flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo else - if command -v flatpak >/dev/null 2>&1; then + if command_exists flatpak; then if ! flatpak remotes | grep -q "flathub"; then - printf "%b\n" "${YELLOW}Detected Flatpak package manager but Flathub remote is not added. Would you like to add it? (y/n)${RC}" + printf "%b" "${YELLOW}Detected Flatpak package manager but Flathub remote is not added. Would you like to add it? (Y/n): ${RC}" read -r add_remote case "$add_remote" in [Yy]*) @@ -70,14 +54,14 @@ setup_flatpak() { # Only used for Ubuntu GNOME. Ubuntu GNOME doesnt allow flathub to be added as a remote to their store. # So in case the user wants to use a GUI siftware manager they can setup it here if [ "$DE" = "GNOME" ]; then - printf "%b\n" "${YELLOW}Detected GNOME desktop environment. Would you like to install GNOME Software plugin for Flatpak? (y/n)${RC}" + printf "%b" "${YELLOW}Detected GNOME desktop environment. Would you like to install GNOME Software plugin for Flatpak? (Y/n): ${RC}" read -r install_gnome if [ "$install_gnome" = "y" ] || [ "$install_gnome" = "Y" ]; then "$ESCALATION_TOOL" "$PACKAGER" install -y gnome-software-plugin-flatpak fi # Useful for Debian KDE spin as well elif [ "$DE" = "KDE" ]; then - printf "%b\n" "${YELLOW}Detected KDE desktop environment. Would you like to install KDE Plasma Discover backend for Flatpak? (y/n)${RC}" + printf "%b" "${YELLOW}Detected KDE desktop environment. Would you like to install KDE Plasma Discover backend for Flatpak? (Y/n): ${RC}" read -r install_kde if [ "$install_kde" = "y" ] || [ "$install_kde" = "Y" ]; then "$ESCALATION_TOOL" "$PACKAGER" install -y plasma-discover-backend-flatpak diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index 1b72b0e53..363ad0341 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -24,6 +24,10 @@ name = "DWM-Titus" description = "DWM is a dynamic window manager for X.\nIt manages windows in tiled, monocle and floating layouts.\nAll of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.\nThis command installs and configures DWM and a desktop manager.\nThe list of patches applied can be found in CTT's DWM repository\nhttps://github.com/ChrisTitusTech/dwm-titus" script = "dwmtitus-setup.sh" +[[data]] +name = "Docker Setup" +script = "docker-setup.sh" + [[data]] name = "Fastfetch" description = "Fastfetch is a neofetch-like tool for fetching system information and displaying it prettily.\nIt is written mainly in C, with performance and customizability in mind.\nThis command installs fastfetch and configures from CTT's mybash repository.\nhttps://github.com/ChrisTitusTech/mybash" @@ -34,6 +38,10 @@ name = "Flatpak / Flathub" description = "Flatpak is a universal application sandbox for Linux that uses isolated packages from Flathub to prevent conflicts and system alterations, while alleviating dependency concerns.\nThis command installs Flatpak and adds the Flathub repository" script = "setup-flatpak.sh" +[[data]] +name = "Grub Theme Setup" +script = "grub-theme.sh" + [[data]] name = "Kitty" description = "kitty is a free and open-source GPU-accelerated terminal emulator for Linux, macOS, and some BSD distributions, focused on performance and features.\nkitty is written in a mix of C and Python programming languages.\n This command installs and configures kitty." diff --git a/core/tabs/system-setup/system-cleanup.sh b/core/tabs/system-setup/system-cleanup.sh index 40d5be2a4..a8be27703 100644 --- a/core/tabs/system-setup/system-cleanup.sh +++ b/core/tabs/system-setup/system-cleanup.sh @@ -40,7 +40,7 @@ common_cleanup() { } clean_data() { - printf "%b\n" "${YELLOW}Clean up old cache files and empty the trash? (y/N): ${RC}" + printf "%b" "${YELLOW}Clean up old cache files and empty the trash? (y/N): ${RC}" read -r clean_response case $clean_response in y|Y) diff --git a/core/tabs/system-setup/tab_data.toml b/core/tabs/system-setup/tab_data.toml index 22612d94d..57a3fbbb5 100644 --- a/core/tabs/system-setup/tab_data.toml +++ b/core/tabs/system-setup/tab_data.toml @@ -55,19 +55,11 @@ name = "Virtualization Setup" description = "Enables Virtualization through dnf" script = "fedora/virtualization.sh" -[[data]] -name = "Auto Mount Drive" -script = "auto-mount.sh" - [[data]] name = "Build Prerequisites" description = "This script is designed to handle the installation of various software dependencies across different Linux distributions" script = "compile-setup.sh" -[[data]] -name = "Docker Setup" -script = "docker-setup.sh" - [[data]] name = "Full System Cleanup" script = "system-cleanup.sh" @@ -87,15 +79,7 @@ name = "Global Theme" description = "This script is designed to handle the installation and configuration of global theming" script = "global-theme.sh" -[[data]] -name = "Grub Theme Setup" -script = "grub-theme.sh" - [[data]] name = "Remove Snaps" description = "This script is designed to remove snap" script = "remove-snaps.sh" - -[[data]] -name = "SSH-Samba Setup" -script = "samba-ssh-setup.sh" diff --git a/core/tabs/system-setup/auto-mount.sh b/core/tabs/utils/auto-mount.sh similarity index 100% rename from core/tabs/system-setup/auto-mount.sh rename to core/tabs/utils/auto-mount.sh diff --git a/core/tabs/system-setup/samba-ssh-setup.sh b/core/tabs/utils/samba-ssh-setup.sh similarity index 91% rename from core/tabs/system-setup/samba-ssh-setup.sh rename to core/tabs/utils/samba-ssh-setup.sh index 4989a2223..96e754e12 100755 --- a/core/tabs/system-setup/samba-ssh-setup.sh +++ b/core/tabs/utils/samba-ssh-setup.sh @@ -68,7 +68,7 @@ setup_samba() { if [ -f "$SAMBA_CONFIG" ]; then printf "%b\n" "${YELLOW}Samba configuration file already exists in $SAMBA_CONFIG.${RC}" - printf "Do you want to modify the existing Samba configuration? (yes/no): " + printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): " read -r MODIFY_SAMBA if [ "$MODIFY_SAMBA" = "yes" ]; then "$ESCALATION_TOOL" "$EDITOR" "$SAMBA_CONFIG" @@ -77,7 +77,7 @@ setup_samba() { printf "%b\n" "${YELLOW}No existing Samba configuration found. Setting up a new one...${RC}" # Prompt user for shared directory path - printf "Enter the path for the Samba share (default: /srv/samba/share): " + printf "%b" "Enter the path for the Samba share (default: /srv/samba/share): " read -r SHARED_DIR SHARED_DIR=${SHARED_DIR:-/srv/samba/share} @@ -86,7 +86,7 @@ setup_samba() { "$ESCALATION_TOOL" chmod -R 0777 "$SHARED_DIR" # Add a new Samba user - printf "Enter Samba username: " + printf "%b" "Enter Samba username: " read -r SAMBA_USER # Loop until the passwords match @@ -163,14 +163,14 @@ setup_ssh_samba(){ clear # Display menu - printf "Select an option:\n" - printf "1. Setup SSH\n" - printf "2. Setup Samba\n" - printf "3. Configure Firewall\n" - printf "4. Setup All\n" - printf "5. Exit\n" - - printf "Enter your choice [1-5]: " + printf "%b\n" "Select an option:" + printf "%b\n" "1. Setup SSH" + printf "%b\n" "2. Setup Samba" + printf "%b\n" "3. Configure Firewall" + printf "%b\n" "4. Setup All" + printf "%b\n" "5. Exit" + + printf "%b" "Enter your choice [1-5]: " read CHOICE case "$CHOICE" in @@ -203,4 +203,4 @@ setup_ssh_samba(){ checkEnv checkEscalationTool -setup_ssh_samba +setup_ssh_samba \ No newline at end of file diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index 050d72f1f..c0b0b4676 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -19,6 +19,10 @@ name = "Auto Detect Displays" description = "This utility is designed to detect and apply recommended configuration for monitors connected with your system" script = "monitor-control/auto_detect_displays.sh" +[[data]] +name = "Auto Mount Drive" +script = "auto-mount.sh" + [[data.entries]] name = "Change Orientation" description = "This utility is designed to change the orientation of monitors in your system" @@ -55,6 +59,10 @@ description = "This utility is designed to reset scaling of a monitor in your sy script = "monitor-control/reset_scaling.sh" matches = true +[[data]] +name = "SSH-Samba Setup" +script = "samba-ssh-setup.sh" + [[data.entries]] name = "Scale Monitors" description = "This utility is designed to change the scaling of monitors in your system" From c89b3e44803eee7c4b508b4763b3fa99bf73b601 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sat, 21 Sep 2024 11:05:01 -0400 Subject: [PATCH 2/7] attempt to fix conflicts --- core/tabs/applications-setup/docker-setup.sh | 9 ++++----- core/tabs/utils/samba-ssh-setup.sh | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/core/tabs/applications-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh index 77f3da98c..3e0c99d56 100755 --- a/core/tabs/applications-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -37,7 +37,7 @@ install_docker() { "$ESCALATION_TOOL" systemctl start docker ;; *) - printf "${RED}Unsupported package manager. Please install Docker manually.${RC}\n" + printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}" exit 1 ;; esac @@ -47,17 +47,16 @@ install_docker_compose() { printf "%b\n" "${YELLOW}Installing Docker Compose...${RC}" case "$PACKAGER" in apt-get|nala|yum) - "$ESCALATION_TOOL" "$PACKAGER" update "$ESCALATION_TOOL" "$PACKAGER" install -y docker-compose-plugin ;; zypper) "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install docker-compose ;; pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm docker-compose + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm docker-compose ;; *) - printf "${RED}Unsupported package manager. Please install Docker Compose manually.${RC}\n" + printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}" exit 1 ;; esac @@ -85,4 +84,4 @@ install_components() { checkEnv checkEscalationTool -install_components +install_components \ No newline at end of file diff --git a/core/tabs/utils/samba-ssh-setup.sh b/core/tabs/utils/samba-ssh-setup.sh index 96e754e12..376d927b4 100755 --- a/core/tabs/utils/samba-ssh-setup.sh +++ b/core/tabs/utils/samba-ssh-setup.sh @@ -9,7 +9,7 @@ install_package() { if ! command_exists "$PACKAGE"; then case "$PACKAGER" in pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm "$PACKAGE" + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$PACKAGE" ;; *) "$ESCALATION_TOOL" "$PACKAGER" install -y "$PACKAGE" @@ -68,9 +68,9 @@ setup_samba() { if [ -f "$SAMBA_CONFIG" ]; then printf "%b\n" "${YELLOW}Samba configuration file already exists in $SAMBA_CONFIG.${RC}" - printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): " + printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): " read -r MODIFY_SAMBA - if [ "$MODIFY_SAMBA" = "yes" ]; then + if [ "$MODIFY_SAMBA" = "Y" ]; then "$ESCALATION_TOOL" "$EDITOR" "$SAMBA_CONFIG" fi else @@ -97,7 +97,7 @@ setup_samba() { stty echo printf "Confirm Samba password: " stty -echo - read SAMBA_PASSWORD_CONFIRM + read -r SAMBA_PASSWORD_CONFIRM stty echo printf "\n" if [ "$SAMBA_PASSWORD" = "$SAMBA_PASSWORD_CONFIRM" ]; then @@ -171,7 +171,7 @@ setup_ssh_samba(){ printf "%b\n" "5. Exit" printf "%b" "Enter your choice [1-5]: " - read CHOICE + read -r CHOICE case "$CHOICE" in 1) From 08fde9cc13ffb9aa04f258b6e057b9ccaa436c06 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sat, 21 Sep 2024 11:05:47 -0400 Subject: [PATCH 3/7] fix extra space --- core/tabs/utils/samba-ssh-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/utils/samba-ssh-setup.sh b/core/tabs/utils/samba-ssh-setup.sh index 376d927b4..28674395d 100755 --- a/core/tabs/utils/samba-ssh-setup.sh +++ b/core/tabs/utils/samba-ssh-setup.sh @@ -68,7 +68,7 @@ setup_samba() { if [ -f "$SAMBA_CONFIG" ]; then printf "%b\n" "${YELLOW}Samba configuration file already exists in $SAMBA_CONFIG.${RC}" - printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): " + printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): " read -r MODIFY_SAMBA if [ "$MODIFY_SAMBA" = "Y" ]; then "$ESCALATION_TOOL" "$EDITOR" "$SAMBA_CONFIG" From e29c8d036b51a5409f3446a89636817e6ae482c8 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sat, 21 Sep 2024 11:20:10 -0400 Subject: [PATCH 4/7] fix lowercase Y issues --- core/tabs/utils/samba-ssh-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/utils/samba-ssh-setup.sh b/core/tabs/utils/samba-ssh-setup.sh index 28674395d..2d3b897b1 100755 --- a/core/tabs/utils/samba-ssh-setup.sh +++ b/core/tabs/utils/samba-ssh-setup.sh @@ -70,7 +70,7 @@ setup_samba() { printf "%b\n" "${YELLOW}Samba configuration file already exists in $SAMBA_CONFIG.${RC}" printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): " read -r MODIFY_SAMBA - if [ "$MODIFY_SAMBA" = "Y" ]; then + if [ "$MODIFY_SAMBA" = "Y" ] || [ "$MODIFY_SAMBA" = "y" ]; then "$ESCALATION_TOOL" "$EDITOR" "$SAMBA_CONFIG" fi else From b756342eb4c2a8d18a8584779718c0ffceb446b9 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sun, 22 Sep 2024 12:18:00 -0400 Subject: [PATCH 5/7] Fix conflicts --- core/tabs/applications-setup/tab_data.toml | 10 ++++++++-- core/tabs/utils/tab_data.toml | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index e4a5c4d9d..ea439b3a3 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -79,9 +79,12 @@ description = "DWM is a dynamic window manager for X.\nIt manages windows in til script = "dwmtitus-setup.sh" task_list = "installation, privileged file modification, systemd actions" +task_list = "installation" + [[data]] -name = "Docker Setup" +name = "Docker" script = "docker-setup.sh" +task_list = "installation, systemd actions" [[data]] name = "Fastfetch" @@ -95,9 +98,12 @@ description = "Flatpak is a universal application sandbox for Linux that uses is script = "setup-flatpak.sh" task_list = "installation" +task_list = "installation, privileged file modification" + [[data]] -name = "Grub Theme Setup" +name = "Grub Theme" script = "grub-theme.sh" +task_list = "privileged file modification" [[data]] name = "Kitty" diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index 1d403de7b..593e86b2b 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -19,9 +19,12 @@ name = "Auto Detect Displays" description = "This utility is designed to detect and apply recommended configuration for monitors connected with your system" script = "monitor-control/auto_detect_displays.sh" +task_list = "installation" + [[data]] name = "Auto Mount Drive" script = "auto-mount.sh" +task_list = "privileged file modification" [[data.entries]] name = "Change Orientation" @@ -59,9 +62,12 @@ description = "This utility is designed to reset scaling of a monitor in your sy script = "monitor-control/reset_scaling.sh" matches = true +task_list = "package removal" + [[data]] -name = "SSH-Samba Setup" +name = "SSH-Samba" script = "samba-ssh-setup.sh" +task_list = "installation, systemd actions, privileged file modification" [[data.entries]] name = "Scale Monitors" From 81de6297fe7686d15a36544c5a057d5efc9cdd28 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sun, 22 Sep 2024 12:23:50 -0400 Subject: [PATCH 6/7] fix scattered stuff around toml --- core/tabs/applications-setup/tab_data.toml | 4 ---- core/tabs/system-setup/tab_data.toml | 7 ------- core/tabs/utils/tab_data.toml | 4 ---- 3 files changed, 15 deletions(-) diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index ea439b3a3..22197dcf7 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -79,8 +79,6 @@ description = "DWM is a dynamic window manager for X.\nIt manages windows in til script = "dwmtitus-setup.sh" task_list = "installation, privileged file modification, systemd actions" -task_list = "installation" - [[data]] name = "Docker" script = "docker-setup.sh" @@ -98,8 +96,6 @@ description = "Flatpak is a universal application sandbox for Linux that uses is script = "setup-flatpak.sh" task_list = "installation" -task_list = "installation, privileged file modification" - [[data]] name = "Grub Theme" script = "grub-theme.sh" diff --git a/core/tabs/system-setup/tab_data.toml b/core/tabs/system-setup/tab_data.toml index db82df68f..dda034df2 100644 --- a/core/tabs/system-setup/tab_data.toml +++ b/core/tabs/system-setup/tab_data.toml @@ -63,8 +63,6 @@ description = "Enables Virtualization through dnf" script = "fedora/virtualization.sh" task_list = "installation" -task_list = "installation" - [[data]] name = "Build Prerequisites" description = "This script is designed to handle the installation of various software dependencies across different Linux distributions" @@ -99,11 +97,6 @@ description = "This script is designed to handle the installation and configurat script = "global-theme.sh" task_list = "installation, privileged file modification" -[[data]] -name = "Grub Theme" -script = "grub-theme.sh" -task_list = "privileged file modification" - [[data]] name = "Remove Snaps" description = "This script is designed to remove snap" diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index 593e86b2b..1f39af301 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -19,8 +19,6 @@ name = "Auto Detect Displays" description = "This utility is designed to detect and apply recommended configuration for monitors connected with your system" script = "monitor-control/auto_detect_displays.sh" -task_list = "installation" - [[data]] name = "Auto Mount Drive" script = "auto-mount.sh" @@ -62,8 +60,6 @@ description = "This utility is designed to reset scaling of a monitor in your sy script = "monitor-control/reset_scaling.sh" matches = true -task_list = "package removal" - [[data]] name = "SSH-Samba" script = "samba-ssh-setup.sh" From e9b1217ae46b0ae06dac4a4aee21ee6bb945f719 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sun, 22 Sep 2024 12:32:11 -0400 Subject: [PATCH 7/7] fix syntax issue --- core/tabs/applications-setup/setup-flatpak.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/core/tabs/applications-setup/setup-flatpak.sh b/core/tabs/applications-setup/setup-flatpak.sh index ba2644c5b..75da28af3 100755 --- a/core/tabs/applications-setup/setup-flatpak.sh +++ b/core/tabs/applications-setup/setup-flatpak.sh @@ -28,13 +28,6 @@ setup_flatpak() { *) "$ESCALATION_TOOL" "$PACKAGER" install -y flatpak ;; - xbps-install) - "$ESCALATION_TOOL" "$PACKAGER" install -S flatpak - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; esac printf "%b\n" "Adding Flathub remote..." "$ESCALATION_TOOL" flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo