Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: printer driver installation #837

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
Vorthas committed Oct 25, 2024
commit 8e935fbcc04214bc7eb6afef3591dbc35b471637
28 changes: 28 additions & 0 deletions core/tabs/utils/printers/install-cups.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh -e

. ../../common-script.sh

# Function to install CUPS for printers
Vorthas marked this conversation as resolved.
Show resolved Hide resolved
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
28 changes: 15 additions & 13 deletions core/tabs/utils/printers/install-epson-printer-drivers.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
#!/bin/sh -e

. ../../common-script.sh
. ./install-cups.sh

# Function to install drivers for Epson printers
Vorthas marked this conversation as resolved.
Show resolved Hide resolved
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
6 changes: 6 additions & 0 deletions core/tabs/utils/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ script = "monitor-control/set_resolutions.sh"
[[data]]
name = "Printers"

[[data.entries]]
name = "Install CUPS"
Vorthas marked this conversation as resolved.
Show resolved Hide resolved
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"
Vorthas marked this conversation as resolved.
Show resolved Hide resolved
script = "printers/install-epson-printer-drivers.sh"
Expand Down
1 change: 1 addition & 0 deletions docs/userguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down