summaryrefslogtreecommitdiff
path: root/.local/bin/dmenuprint
blob: 469c8a34058a4e7cfbb5b07e3843c7217f172e12 (plain)
1
2
3
4
5
6
7
8
9
10
#!/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" "$@"