diff --git a/core/tabs/applications-setup/office-suite-setup.sh b/core/tabs/applications-setup/office-suite-setup.sh deleted file mode 100644 index 61a08ebd..00000000 --- a/core/tabs/applications-setup/office-suite-setup.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/sh -e - -. ../common-script.sh - -install_onlyoffice() { - 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 - "$ESCALATION_TOOL" "$PACKAGER" install -y ./onlyoffice-desktopeditors_amd64.deb - ;; - zypper|dnf) - . ./setup-flatpak.sh - flatpak install -y flathub org.onlyoffice.desktopeditors - ;; - pacman) - "$AUR_HELPER" -S --needed --noconfirm onlyoffice - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Only Office is already installed.${RC}" - fi -} - -install_libreoffice() { - 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 - ;; - zypper|dnf) - . ./setup-flatpak.sh - flatpak install -y flathub org.libreoffice.LibreOffice - ;; - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Libre Office is already installed.${RC}" - fi -} - -install_wpsoffice() { - 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 - ;; - *) - . ./setup-flatpak.sh - flatpak install flathub com.wps.Office - ;; - esac - else - printf "%b\n" "${GREEN}WPS Office is already installed.${RC}" - fi -} - -# needs to be updated every year for latest version -install_freeoffice() { - 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" "$PACKAGER" install -y ./softmaker-freeoffice-2024_1218-01_amd64.deb - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" addrepo -f https://shop.softmaker.com/repo/rpm SoftMaker - "$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys refresh - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install softmaker-freeoffice-2024 - ;; - pacman) - "$AUR_HELPER" -S --noconfirm freeoffice - ;; - dnf) - "$ESCALATION_TOOL" curl -O -qO /etc/yum.repos.d/softmaker.repo https://shop.softmaker.com/repo/softmaker.repo - "$ESCALATION_TOOL" "$PACKAGER" install -y softmaker-freeoffice-2024 - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Free Office is already installed.${RC}" - fi -} - -install_evince() { - if ! command_exists evince; then - printf "%b\n" "${YELLOW}Installing Evince...${RC}" - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm evince - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y evince - ;; - esac - else - printf "%b\n" "${GREEN}Evince is already installed.${RC}" - fi -} - -install_okular() { - if ! command_exists okular; then - printf "%b\n" "${YELLOW}Installing Okular...${RC}" - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm okular - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y okular - ;; - esac - else - printf "%b\n" "${GREEN}Okular is already installed.${RC}" - fi -} - -install_pdfstudioviewer() { - 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 - printf "%b\n" "${GREEN}PDF Studio Viewer installed successfully!${RC}" - else - printf "%b\n" "${RED}Installation failed!${RC}" - fi - rm PDFStudioViewer_linux64.sh - else - printf "%b\n" "${GREEN}PDF Studio Viewer is already installed.${RC}" - fi -} - -install_pdfstudio() { - 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 - printf "%b\n" "${GREEN}PDF Studio installed successfully!${RC}" - else - printf "%b\n" "${RED}PDF Studio installation failed!${RC}" - fi - rm PDFStudio_linux64.sh - else - printf "%b\n" "${GREEN}PDF Studio is already installed.${RC}" - fi -} - -officeSuiteSetup() { - clear - printf "%b\n" "Office Suite Setup Script" - printf "%b\n" "----------------------------" - printf "%b\n" "Select the suite you want to install:" - printf "%b\n" "1. OnlyOffice" - printf "%b\n" "2. LibreOffice" - printf "%b\n" "3. WPS Office" - printf "%b\n" "4. Free Office" - printf "%b\n" "Select the PDF Suite you want to install:" - printf "%b\n" "----------------------------" - printf "%b\n" "5. Evince" - printf "%b\n" "6. Okular" - printf "%b\n" "7. PDF Studio Viewer" - printf "%b\n" "8. PDF Studio (Paid Software)" - printf "%b\n" "----------------------------" - printf "%b" "Enter your choices (e.g., 1 3 5): " - read -r choice - for ch in $choice; do - case $ch in - 1) install_onlyoffice ;; - 2) install_libreoffice ;; - 3) install_wpsoffice ;; - 4) install_freeoffice ;; - 5) install_evince ;; - 6) install_okular ;; - 7) install_pdfstudioviewer ;; - 8) install_pdfstudio ;; - *) printf "%b\n" "${RED}Invalid option: $ch ${RC}" ;; - esac - done - printf "%b\n" "${GREEN}Installation complete!${RC}" -} - -checkEnv -checkEscalationTool -checkAURHelper -officeSuiteSetup diff --git a/core/tabs/applications-setup/office-suites/freeoffice.sh b/core/tabs/applications-setup/office-suites/freeoffice.sh new file mode 100644 index 00000000..7effa3fb --- /dev/null +++ b/core/tabs/applications-setup/office-suites/freeoffice.sh @@ -0,0 +1,38 @@ +#!/bin/sh -e + +. ../common-script.sh + +installFreeOffice() { + 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" "$PACKAGER" install -y ./softmaker-freeoffice-2024_1218-01_amd64.deb + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" addrepo -f https://shop.softmaker.com/repo/rpm SoftMaker + "$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys refresh + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install softmaker-freeoffice-2024 + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm freeoffice + ;; + dnf) + "$ESCALATION_TOOL" curl -O -qO /etc/yum.repos.d/softmaker.repo https://shop.softmaker.com/repo/softmaker.repo + "$ESCALATION_TOOL" "$PACKAGER" install -y softmaker-freeoffice-2024 + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Free Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAurHelper +installFreeOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/office-suites/libreoffice.sh b/core/tabs/applications-setup/office-suites/libreoffice.sh new file mode 100644 index 00000000..a9850fdc --- /dev/null +++ b/core/tabs/applications-setup/office-suites/libreoffice.sh @@ -0,0 +1,31 @@ +#!/bin/sh -e + +. ../common-script.sh + +installLibreOffice() { + 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 + ;; + zypper|dnf) + . ./setup-flatpak.sh + flatpak install -y flathub org.libreoffice.LibreOffice + ;; + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Libre Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installLibreOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/office-suites/onlyoffice.sh b/core/tabs/applications-setup/office-suites/onlyoffice.sh new file mode 100644 index 00000000..aaea7547 --- /dev/null +++ b/core/tabs/applications-setup/office-suites/onlyoffice.sh @@ -0,0 +1,33 @@ +#!/bin/sh -e + +. ../common-script.sh + +installOnlyOffice() { + 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 + "$ESCALATION_TOOL" "$PACKAGER" install -y ./onlyoffice-desktopeditors_amd64.deb + ;; + zypper|dnf) + . ./setup-flatpak.sh + flatpak install -y flathub org.onlyoffice.desktopeditors + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm onlyoffice + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Only Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAurHelper +installOnlyOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/office-suites/wpsoffice.sh b/core/tabs/applications-setup/office-suites/wpsoffice.sh new file mode 100644 index 00000000..ce1bbc72 --- /dev/null +++ b/core/tabs/applications-setup/office-suites/wpsoffice.sh @@ -0,0 +1,25 @@ +#!/bin/sh -e + +. ../common-script.sh + +installWpsOffice() { + if ! command_exists com.wps.Office; then + printf "%b\n" "${YELLOW}Installing WPS Office...${RC}" + case "$PACKAGER" in + pacman) + "$AUR_HELPER" -S --needed --noconfirm wps-office + ;; + *) + . ./setup-flatpak.sh + flatpak install flathub com.wps.Office + ;; + esac + else + printf "%b\n" "${GREEN}WPS Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAurHelper +installWpsOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/pdf-suites/evince.sh b/core/tabs/applications-setup/pdf-suites/evince.sh new file mode 100644 index 00000000..9e0d8da0 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/evince.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installEvince() { + if ! command_exists evince; then + printf "%b\n" "${YELLOW}Installing Evince...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm evince + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y evince + ;; + esac + else + printf "%b\n" "${GREEN}Evince is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installEvince \ No newline at end of file diff --git a/core/tabs/applications-setup/pdf-suites/okular.sh b/core/tabs/applications-setup/pdf-suites/okular.sh new file mode 100644 index 00000000..6ed8d4d1 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/okular.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installOkular() { + if ! command_exists okular; then + printf "%b\n" "${YELLOW}Installing Okular...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm okular + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y okular + ;; + esac + else + printf "%b\n" "${GREEN}Okular is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installOkular \ No newline at end of file diff --git a/core/tabs/applications-setup/pdf-suites/pdfstudio.sh b/core/tabs/applications-setup/pdf-suites/pdfstudio.sh new file mode 100644 index 00000000..03ba05f4 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/pdfstudio.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installPdfstudio() { + if ! command_exists 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 + printf "%b\n" "${GREEN}PDF Studio installed successfully!${RC}" + else + printf "%b\n" "${RED}PDF Studio installation failed!${RC}" + fi + rm PDFStudio_linux64.sh + else + printf "%b\n" "${GREEN}PDF Studio is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installPdfstudio diff --git a/core/tabs/applications-setup/pdf-suites/pdfstudioviewer.sh b/core/tabs/applications-setup/pdf-suites/pdfstudioviewer.sh new file mode 100644 index 00000000..72013a11 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/pdfstudioviewer.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installPdfstudioviewer() { + if ! command_exists 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 + printf "%b\n" "${GREEN}PDF Studio Viewer installed successfully!${RC}" + else + printf "%b\n" "${RED}Installation failed!${RC}" + fi + rm PDFStudioViewer_linux64.sh + else + printf "%b\n" "${GREEN}PDF Studio Viewer is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installPdfstudioviewer diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index f6e982c1..ef6af7de 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -90,6 +90,51 @@ description = "Thunderbird is a free, open-source email client that offers power script = "communication-apps/thunderbird-setup.sh" task_list = "I" +[[data]] +name = "Office Suites" + +[[data.entries]] +name = "LibreOffice" +script = "office-suites/libreoffice.sh" +task_list = "I" + +[[data.entries]] +name = "OnlyOffice" +script = "office-suites/onlyoffice.sh" +task_list = "I" + +[[data.entries]] +name = "FreeOffice" +script = "office-suites/freeoffice.sh" +task_list = "I" + +[[data.entries]] +name = "WPS Office" +script = "office-suites/wpsoffice.sh" +task_list = "I" + +[[data]] +name = "PDF Suites" + +[[data.entries]] +name = "Evince" +script = "pdf-suites/evince.sh" +task_list = "I" + +[[data.entries]] +name = "Okular" +script = "pdf-suites/okular.sh" +task_list = "I" + +[[data.entries]] +name = "PDF Studio" +script = "pdf-suites/pdfstudio.sh" +task_list = "I" + +[[data.entries]] +name = "PDF Studio Viewer" +script = "pdf-suites/pdfstudioviewer.sh" + [[data]] name = "Web Browsers" @@ -223,12 +268,6 @@ matches = true data = "command_exists" values = [ "linutil" ] -[[data]] -name = "Office Suite" -description = "An office suite installer is a software package that installs productivity tools such as word processing, spreadsheets, presentations, and pdf viewers for business and personal use." -script = "office-suite-setup.sh" -task_list = "I" - [[data]] name = "Rofi" description = "Rofi is a window switcher, run dialog, ssh-launcher and dmenu replacement that started as a clone of simpleswitcher, written by Sean Pringle and later expanded by Dave Davenport.\nThis command installs and configures rofi with configuration from CTT's DWM repo.\nhttps://github.com/ChrisTitusTech/dwm-titus"