diff options
Diffstat (limited to '.local/bin/dmenuprint')
-rwxr-xr-x | .local/bin/dmenuprint | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/dmenuprint b/.local/bin/dmenuprint new file mode 100755 index 0000000..cfcd179 --- /dev/null +++ b/.local/bin/dmenuprint @@ -0,0 +1,15 @@ +#!/bin/sh + +choice="$(lpstat -p -d | sed 's/.*default.*//g; + s/[^ ]* //; + s/is\sidle.//g + s/.*disabled.*//g' | + dmenu -p "Which printer?" | + sed 's/\s.*//g' )" + +lpr -P $choice "$@" + +# printer Canon_iP110_series is idle. enabled since Tue 10 Nov 2020 04:22:34 PM +# printer HP_OfficeJet_Pro_9010 is idle. enabled since Wed 09 Dec 2020 01:57:06 AM +# printer HP_OfficeJet_Pro_9010_fax is idle. enabled since Tue 27 Oct 2020 08:40:56 PM +# system default destination: HP_OfficeJet_Pro_9010 |