% % @(#)$Header: /u/eric/client/psterm/RCS/sampl.user.ps,v 2.2 88/11/10 17:05:50 eric Update $ % to use this file, copy it to ~/user.ps % % these guys switch on and off some of the parts of the file... /narrowborders true def % give all windows nice skinny borders /startclock false def % start a clock up for me /startconsole false def % start a console window for me /changefocus false def % make the focus paint around the borders /newstretch true def % twiddle with the shape of the stretch box /initialrootimage null def % put the name of a picture here if you want /NetSecurityWanted false store % stop annoying ``security violation'' popups %%%% Redirect stderr for process that have been 'forkunix'ed %% This is done so that error message from forked processed can be seen. %% Note: only available under A/UX, hence the errored... {(/dev/console) setforkunixstderr} errored pop %%%% Set up LiteMenus so that submenus are stroked (outlined) and %% things you can select are inverted. { /OrigPaintBox /PaintBox load def /DiffPaintBox { % value => - dup null ne { dup % save a copy for the getmenuaction MenuItems exch get begin X Y W H end rectpath 5 setrasteropcode getmenuaction type /dicttype eq {stroke} {fill} ifelse } {pop} ifelse } def /PaintBox /DiffPaintBox load def } LitePullRightMenu send DefaultMenu begin /StrokeSelection true def /Shadow 4 def /ShadowColor 0 0 0 rgbcolor def end narrowborders { DefaultWindow begin /FrameFont /Times-Roman findfont 12 scalefont def /ZoomSteps 0 def /BorderLeft 3 def /BorderRight 3 def /BorderBottom 3 def /BorderTop 16 def /stroketop? true def changefocus { /PaintFocus { gsave FrameCanvas setcanvas KeyFocus? {KeyFocusColor} {FrameFillColor} ifelse setcolor stroketop? { BorderLeft FrameHeight BorderTop sub 2 add moveto FrameWidth BorderRight sub FrameHeight BorderTop sub 2 add lineto } { BorderLeft 2 div FrameHeight BorderTop sub moveto BorderLeft 2 div BorderBottom 2 div lineto FrameWidth BorderRight 2 div sub BorderBottom 2 div lineto FrameWidth BorderRight 2 div sub FrameHeight BorderTop sub lineto } ifelse stroke grestore } def /PaintFrameControls nullproc def } if end } if newstretch { DefaultWindow begin /MoveFrameControls { % - => - ([Re]set frame control shapes) gsave CloseControl setcanvas 0 FrameHeight BorderTop sub BorderTop ControlSize sub 2 div add movecanvas StretchControl setcanvas FrameWidth ControlSize sub 0 movecanvas grestore } def /CreateFrameControls { % - => - (Create frame control canvases/items) gsave FrameCanvas setcanvas /CloseControl FrameCanvas newcanvas dup begin /Mapped true def /EventsConsumed /AllEvents def end def /StretchControl FrameCanvas newcanvas dup begin /Mapped true def /EventsConsumed /AllEvents def end def 0 0 ControlSize dup BorderTop le exch BorderLeft le or {ControlSize ControlSize} {BorderTop BorderTop} ifelse rectpath CloseControl reshapecanvas ControlSize BorderRight gt ControlSize BorderBottom gt and { newpath 0 0 moveto 0 BorderBottom lineto ControlSize BorderRight sub BorderBottom lineto ControlSize BorderRight sub ControlSize lineto ControlSize ControlSize lineto ControlSize 0 lineto closepath } { 0 0 ControlSize ControlSize rectpath } ifelse StretchControl reshapecanvas grestore } def end } if /davincipicturemenu [ (angel) (ermine) (lady) (man) (mona-face) (mona-hands) (mona-smile) % (mona-hires) (mona) (stjerome) (virgin) (virgino) ] [{currentkey setrootpicture}] /new DefaultMenu send def /japanesepicturemenu [ (cherries) (fuji) (geese) (puppet) (snow) (stormy) (washing) % (wash-hires) (writing) ] [{currentkey setrootpicture}] /new DefaultMenu send def /sunpicturemenu [ (founders) (sun3110) (sun3160c) (sun3160m) (sun3260h) (sun350) (sun352) (sun352w) (sunballs) (suncase) (sungame) (sunnet) (sunnfs) (sunprism) ] [{currentkey setrootpicture}] /new DefaultMenu send def /travelpicturemenu [ (bryce) (harem) (joshua) (lascruces) (new_york) (pagosa) (saturn) (fullmoon) (shroom) (taj-detail) (taj) (vla) (zion) ] [{currentkey setrootpicture}] /new DefaultMenu send def /picturerootmenu [ (Da Vinci =>) davincipicturemenu (Japanese =>) japanesepicturemenu % (Sun =>) sunpicturemenu (Travel =>) travelpicturemenu ] /new DefaultMenu send def systemdict begin /setrootpicture { gsave framebuffer /Retained true put (NEWSHOME) getenv (/images/) append exch append (.im8) append readcanvas systemdict begin /RootImageCanvas exch def /PaintRoot { gsave framebuffer setcanvas clippath pathbbox scale pop pop RootImageCanvas imagecanvas } def end PaintRoot grestore } def end /roots [ (random) { systemdict begin /DefaultRootGrayOrColor {random random random hsbcolor} def framebuffer /Retained false put PaintRoot end } (normal) { systemdict begin /DefaultRootGrayOrColor {.5 .5 .5 hsbcolor} def framebuffer /Retained false put PaintRoot end } (dull) { systemdict begin /PaintRoot systemdict /DullPaintRoot get def PaintRoot /RootImageCanvas null def end } (pictures...) picturerootmenu ] /new DefaultMenu send def /term (psterm -ls -t psterm -li 66 -co 132) def % I like big windows /loginmenu [ (local) { term forkunix } % change rsh below to remsh under A/UX (yourhost) { (rsh yourhost ) term append forkunix } (myhost) { (rsh myhost ) term append forkunix } (console) { (psterm -C -t sun -sl 512 -il Console -fl Console) forkunix } % you can put a command at the end of the command line too: (login) { (psterm /bin/login -p) forkunix } % make it ask for user name and passwd (login me) { (psterm /bin/login -p me) forkunix } % make it ask for passwd for me (login you) { (psterm /bin/login -p you) forkunix } % make it log you in (tip out) { (psterm tip out) forkunix } % when the tip dies, the window goes away! ] /new DefaultMenu send def 0 (Roots =>) roots /insertitem rootmenu send 0 (Login =>) loginmenu /insertitem rootmenu send systemdict begin /DefaultRootGrayOrColor {.5 .5 .5 hsbcolor} def systemdict /DullPaintRoot known not { /DullPaintRoot systemdict /PaintRoot get def } if initialrootimage null ne { initialrootimage setrootpicture } { PaintRoot } ifelse end { pause pause % allow server to start accpting connections startclock { (/usr/NeWS/demo/roundclock -s) forkunix pause } if startconsole { (psterm -C -t sun -sl 512 -il Console -fl Console) forkunix pause } if } fork /dragframe? false store % false means continuously repaint % /xhair /xhair_m framebuffer setstandardcursor