From 71dd11054c0e8f13e148ab669b69c312202f6dc8 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 14 Mar 2024 15:44:20 +0100 Subject: bash & lps: Make use of $PRINTER --- .bashrc | 1 + .local/bin/lps | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 53655ef..930106d 100644 --- a/.bashrc +++ b/.bashrc @@ -86,6 +86,7 @@ export GPG_TTY=`tty` export HISTSIZE=100000 export LESS='-RF' export VAULT_2FA='2 Factor Authentication' +export PRINTER='HP_OfficeJet_8010' alias ..='cd ..' alias d='git --git-dir="$REPODIR/Mango0x45/dotfiles.git" --work-tree="$HOME"' diff --git a/.local/bin/lps b/.local/bin/lps index 8e49fa5..2df4126 100755 --- a/.local/bin/lps +++ b/.local/bin/lps @@ -1,9 +1,9 @@ #!/usr/local/bin/andy -set flags -m color -r 300 +set flags -m color if test $#args -ge 2 { set flags $flags --area=0,0,$args[1],$args[1] } -set uri `lpoptions | sed -E 's/.*device-uri=hp:([^ ]+).*/hpaio:\1/' +set uri `lpoptions -p $PRINTER | sed -E 's/.*device-uri=hp:([^ ]+).*/hpaio:\1/' chronic hp-scan -d $uri $flags -- cgit v1.2.3