From aa95e70f23f924155198a877b36edc8f11fc42c4 Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:04:13 -0400 Subject: [PATCH 1/3] Add basic script to install Epson printer drivers in Arch, Debian, and Fedora. --- .../printers/install-epson-printer-drivers.sh | 26 +++++++++++++++++++ core/tabs/utils/tab_data.toml | 7 +++++ 2 files changed, 33 insertions(+) create mode 100644 core/tabs/utils/printers/install-epson-printer-drivers.sh diff --git a/core/tabs/utils/printers/install-epson-printer-drivers.sh b/core/tabs/utils/printers/install-epson-printer-drivers.sh new file mode 100644 index 00000000..9d190218 --- /dev/null +++ b/core/tabs/utils/printers/install-epson-printer-drivers.sh @@ -0,0 +1,26 @@ +#!/bin/sh -e + +. ../../common-script.sh + +# Function to install drivers for Epson printers +installEpsonPrinterDriver() { + clear + + case "$PACKAGER" in + pacman) + "${AUR_HELPER}" -S --noconfirm epson-inkjet-printer-escpr + ;; + apt-get | nala) + "$ESCALATION_TOOL" "${PACKAGER}" install -y printer-driver-escpr + ;; + dnf) + "$ESCALATION_TOOL" "${PACKAGER}" install -y epson-inkjet-printer-escpr + ;; + *) ;; + esac +} + +checkEnv +checkEscalationTool +checkAURHelper +installEpsonPrinterDriver diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index ba7c0e1b..9435bcda 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -76,6 +76,13 @@ name = "Set Resolution" description = "This script is designed to change the resolution of monitors connected to your system" script = "monitor-control/set_resolutions.sh" +[[data]] +name = "Printers" + +[[data.entries]] +name = "Install EPSON printer drivers" +script = "printers/install-epson-printer-drivers.sh" + [[data]] name = "User Account Manager" From e170ec0cc8f4a0fd5856819635f452f999a21cb4 Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:12:53 -0400 Subject: [PATCH 2/3] Add I to the task_list for this script. --- core/tabs/utils/tab_data.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index 9435bcda..ceea4738 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -82,6 +82,7 @@ name = "Printers" [[data.entries]] name = "Install EPSON printer drivers" script = "printers/install-epson-printer-drivers.sh" +task_list = "I" [[data]] name = "User Account Manager" From 69c5d0a41275c1962e7ac232cf92cdf32d49d997 Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:32:04 -0400 Subject: [PATCH 3/3] Update core/tabs/utils/printers/install-epson-printer-drivers.sh Co-authored-by: JEEVITHA KANNAN K S --- .../printers/install-epson-printer-drivers.sh | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/core/tabs/utils/printers/install-epson-printer-drivers.sh b/core/tabs/utils/printers/install-epson-printer-drivers.sh index 9d190218..be70c037 100644 --- a/core/tabs/utils/printers/install-epson-printer-drivers.sh +++ b/core/tabs/utils/printers/install-epson-printer-drivers.sh @@ -7,16 +7,19 @@ installEpsonPrinterDriver() { clear case "$PACKAGER" in - pacman) - "${AUR_HELPER}" -S --noconfirm epson-inkjet-printer-escpr - ;; - apt-get | nala) - "$ESCALATION_TOOL" "${PACKAGER}" install -y printer-driver-escpr - ;; - dnf) - "$ESCALATION_TOOL" "${PACKAGER}" install -y epson-inkjet-printer-escpr - ;; - *) ;; + pacman) + "$AUR_HELPER" -S --noconfirm epson-inkjet-printer-escpr + ;; + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y printer-driver-escpr + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y epson-inkjet-printer-escpr + ;; + *) + printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}" + exit 1 + ;; esac }