# this file belongs to the printop distribution.
# printop is copyrighted by Olaf Gellert
# <gellert@informatik.uni-hamburg.de>
# this is an example file. It shows how to configure printop.
# The patterns are regular expressions (as of tcl), so
# "." means any character (just one)
# "^" means the start of the string to be matched
#     eg. "^a" matches all strings starting with an "a"
# "$" means the end of the string to be matched
#     eg. "a^" matches all strings ending with an "a"
# "*" means any number of the previous character
#     eg. "a*" matches "", "a", "aa" etc.
# and some more I don't remember now...


# here are some entries that you could find in a typical
# printop.cmd-file:

# tell printop to use the command /usr/bin/lpq:
set confLPQ /usr/bin/lpq

# tell printop where lprm is:
set confLPRM {/usr/bin/lprm}

# tell printop not to read the file "~/.printop.cmd". This is necessary
# if printop runs suid root. If you don't enter this anywhere in your
# printop.cmd it doesn't matter (it's the default setting). If you
# want to allow every user to use his own commands for lpq, lpc etc.
# (for what reason I can't guess...) set confSUID to 0 (and NEVER NEVER
# run printop with suid root!).
set confSUID {1}



# here are some entries that you could find in a typical
# printop.cfg-file:

# tell printop to display the queue of printer "d105_lw" at startup:
printer startup d105_lw

# tell printop to create a some buttons in the main-menu with the
# mostly used printers:
printer button {d105_lw}
printer button {d105_hp}
printer button {d116_lw}

# tell printop to create submenus for each building at our campus
# (printernames consist of a letter indicating in wich building
# they are, the number of the room in wich they are and a suffix
# indicating the type of printer (lp for a lineprinter, lw for
# laserwriter, hp for laserjet...).
printer menu "Building A" {men_a}
# All printers beginning with a: into menu men_a
printer button {^a.*} {men_a}

# smae for building c
printer menu "Building C" {men_c}
printer button {^c.*} {men_c}
# and for buildings d, f and r
printer menu "Haus D" {men_d}
printer button {^d.*} {men_d}
printer menu "Haus F" {men_f}
printer button {^f.*} {men_f}
printer menu "Haus R" {men_r}
printer button {^r.*} {men_r}

# or maybe create empty submenus for the buildings and in those
# create submenus for the different types of printers:
# An empty submenu...
printer menu "Building A" {men_a}
# all printers of "Building A" (with prefix a) suffix "lp" in menu men_a
printer menu "Lineprinters" {lp} {men_a}
printer button {^a.*_lp$} {men_a.lp}

printer menu "Laserjets" {ljets} {men_a}
printer button {^a.*_hp$} {men_a.ljets}

# and the same for building b, c, ...

# for a special printer (eg a color printer) create a button in submenu
# "Building A" (not a submenu 'cause there is just one color printer):
printer button {^d105_color$} {men_a}

# or maybe add a special submenu to submenu "Laserjets" eg. for some
# color-laserjets:
printer menu "Color" {color} {men_a.ljets}
printer button {^a.*_coljet$} {men_a.ljets.color}
