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/8] 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/8] 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/8] 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 } From 364a4c5973778c72b94f92066f62218f72f5ae74 Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:48:17 -0400 Subject: [PATCH 4/8] Update userguide.md based on adam's documentation update. --- docs/userguide.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/userguide.md b/docs/userguide.md index 2b7ad82b..fcf62702 100644 --- a/docs/userguide.md +++ b/docs/userguide.md @@ -141,6 +141,9 @@ For more information visit: https://rpmfusion.org/ - **Set Primary Monitor**: This script is designed to set a Primary monitor in your system - **Set Resolution**: This script is designed to change the resolution of monitors connected to your system +### Printers + + ### User Account Manager - **Auto Mount Drive**: This utility is designed to help with automating the process of mounting a drive on to your system. From 1e005b5d19befe089c8d9d2bf83d46f4883311d1 Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:51:12 -0400 Subject: [PATCH 5/8] Add description to tab_data.toml for the printer addition. --- core/tabs/utils/tab_data.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index ceea4738..f11d07b4 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -80,8 +80,9 @@ script = "monitor-control/set_resolutions.sh" name = "Printers" [[data.entries]] -name = "Install EPSON printer drivers" +name = "Install Epson printer drivers" script = "printers/install-epson-printer-drivers.sh" +descrption = "This script will install the Epson printer drivers." task_list = "I" [[data]] From c8c273461d60f56101ea75a7a538d4eff266f904 Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:52:41 -0400 Subject: [PATCH 6/8] Fix typo, oops. --- core/tabs/utils/tab_data.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index f11d07b4..4de604a4 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -82,7 +82,7 @@ name = "Printers" [[data.entries]] name = "Install Epson printer drivers" script = "printers/install-epson-printer-drivers.sh" -descrption = "This script will install the Epson printer drivers." +description = "This script will install the Epson printer drivers." task_list = "I" [[data]] From 3ad9adf84f2e7ad80dcde61e7a4e287aec28ac0e Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:53:22 -0400 Subject: [PATCH 7/8] Actually generate the updated userguide. --- docs/userguide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/userguide.md b/docs/userguide.md index fcf62702..04d200b6 100644 --- a/docs/userguide.md +++ b/docs/userguide.md @@ -143,6 +143,7 @@ For more information visit: https://rpmfusion.org/ ### Printers +- **Install Epson printer drivers**: This script will install the Epson printer drivers. ### User Account Manager From 8e935fbcc04214bc7eb6afef3591dbc35b471637 Mon Sep 17 00:00:00 2001 From: Vorthas <24818280+Vorthas@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:23:29 -0400 Subject: [PATCH 8/8] Add installation of CUPS as a pre-requisite for Epson printer drivers as well as standalone script for other printer drivers to be added in the future. --- core/tabs/utils/printers/install-cups.sh | 28 +++++++++++++++++++ .../printers/install-epson-printer-drivers.sh | 28 ++++++++++--------- core/tabs/utils/tab_data.toml | 6 ++++ docs/userguide.md | 1 + 4 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 core/tabs/utils/printers/install-cups.sh diff --git a/core/tabs/utils/printers/install-cups.sh b/core/tabs/utils/printers/install-cups.sh new file mode 100644 index 00000000..fdc2b78f --- /dev/null +++ b/core/tabs/utils/printers/install-cups.sh @@ -0,0 +1,28 @@ +#!/bin/sh -e + +. ../../common-script.sh + +# Function to install CUPS for printers +installCUPS() { + clear + + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm cups + ;; + apt-get | nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y cups + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y cups + ;; + *) + printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}" + exit 1 + ;; + esac +} + +checkEnv +checkEscalationTool +installCUPS diff --git a/core/tabs/utils/printers/install-epson-printer-drivers.sh b/core/tabs/utils/printers/install-epson-printer-drivers.sh index be70c037..3f2eecea 100644 --- a/core/tabs/utils/printers/install-epson-printer-drivers.sh +++ b/core/tabs/utils/printers/install-epson-printer-drivers.sh @@ -1,29 +1,31 @@ #!/bin/sh -e . ../../common-script.sh +. ./install-cups.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 - ;; - *) - printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}" - exit 1 - ;; + 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 } checkEnv checkEscalationTool checkAURHelper +installCUPS installEpsonPrinterDriver diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index 4de604a4..3ede5641 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -79,6 +79,12 @@ script = "monitor-control/set_resolutions.sh" [[data]] name = "Printers" +[[data.entries]] +name = "Install CUPS" +script = "printers/install-cups.sh" +description = "This script will install the CUPS system, required for most printer drivers on Linux." +task_list = "I" + [[data.entries]] name = "Install Epson printer drivers" script = "printers/install-epson-printer-drivers.sh" diff --git a/docs/userguide.md b/docs/userguide.md index 04d200b6..b0848093 100644 --- a/docs/userguide.md +++ b/docs/userguide.md @@ -143,6 +143,7 @@ For more information visit: https://rpmfusion.org/ ### Printers +- **Install CUPS**: This script will install the CUPS system, required for most printer drivers on Linux. - **Install Epson printer drivers**: This script will install the Epson printer drivers. ### User Account Manager