#!/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" "$@"