diff --git a/core/tabs/utils/printers/install-cups.sh b/core/tabs/utils/printers/install-cups.sh new file mode 100644 index 000000000..b70df37a2 --- /dev/null +++ b/core/tabs/utils/printers/install-cups.sh @@ -0,0 +1,27 @@ +#!/bin/sh -e + +. ../../common-script.sh + +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 new file mode 100644 index 000000000..afaab4bcc --- /dev/null +++ b/core/tabs/utils/printers/install-epson-printer-drivers.sh @@ -0,0 +1,30 @@ +#!/bin/sh -e + +. ../../common-script.sh +. ./install-cups.sh + +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 + ;; + esac +} + +checkEnv +checkEscalationTool +checkAURHelper +installCUPS +installEpsonPrinterDriver diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index ba7c0e1bc..7c51dc077 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -76,6 +76,21 @@ 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 = "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 = "Epson printer drivers" +script = "printers/install-epson-printer-drivers.sh" +description = "This script will install the Epson printer drivers." +task_list = "I" + [[data]] name = "User Account Manager" diff --git a/docs/userguide.md b/docs/userguide.md index 2b7ad82bf..36b1a2e5f 100644 --- a/docs/userguide.md +++ b/docs/userguide.md @@ -141,6 +141,11 @@ 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 + +- **CUPS**: This script will install the CUPS system, required for most printer drivers on Linux. +- **Epson printer drivers**: This script will install the Epson printer drivers. + ### User Account Manager - **Auto Mount Drive**: This utility is designed to help with automating the process of mounting a drive on to your system.