From: ucjtrjf@ucl.ac.uk (Jonny Farringdon)
Newsgroups: comp.windows.x
Subject: Re: Who's got a nice .twmrc?
Date: 28 Sep 92 18:15:21 GMT
Organization: Bloomsbury Computing Consortium

>Hi all, I'm looking for a nice .twmrc, presumably with something other
>than the standard menu.  Who's got such a file for me?

MONO     Workstations
REVERSE  windows in general (look nicer, easier to read &c)
VTWM     Virtual TWM
SUN      keyboard  (open, front buttone &c)

The following .twmrc  for twm or vtwm adds just one extra button to
each window giving some (sunview'y) feautres like zoom and quit.



NoGrabServer
RestartPreviousState
DecorateTransients
RandomPlacement
IconDirectory "~/icons"
UnknownIcon "target"
Zoom 50

# iff your machine's got the OOMMph
# OpaqueMove

TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"  
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"  
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*" 

Color
{
    BorderColor "slategrey"
    {
     "XTerm"   "red"
    }
    DefaultBackground "maroon"
    DefaultForeground "gray85"
    TitleBackground "maroon"  
    TitleForeground "gray85"  
    MenuBackground "maroon"   
    MenuForeground "gray85"   
    MenuTitleBackground "gray70"
    MenuTitleForeground "maroon"
    IconBackground "maroon"
    IconForeground "gray85"
    IconBorderColor "gray85"
    IconManagerBackground "maroon"
    IconManagerForeground "gray85"
}

StartIconified
{ "xmailtool" }

Icons
{
        "xterm"         "xterm.icon"
        "xmeter"        "star"
        "outbound_msg"  "envelope"
}

Monochrome
{
    BorderColor "white"
    {
     "XTerm"   "white"
    }
    BorderTileForeground "slategrey"
    BorderTileBackground "grey85"   
}

IconRegion "300X100+825+100" North West 5 5
IconRegion "300x500-0-0" North East 10 10

#
#   VIRTUAL DESKTOP SETTINGS
#  ~~~~~~~~~~~~~~~~~~~~~~~~~~    6x10, next font up, is a bit too big
VirtualDesktopFont "5x7"
DesktopDisplayBorder "black"
DesktopDisplayForeground "maroon"
DoorFont "5x7"
VirtualDesktop "200x200+10+10" 12


DeiconifyToScreen

Doors { "Home"  "100x20+101+10" "+0+0"
        "Right" "100x20+206+10" "+1248+0" }
        
NailedDown {
    "Virtual Desktop"
    "Twm Door"
    "Twm Icon Manager"
 }
MoveDelta 3
Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }
Function "move-or-raiselower" { f.move f.deltastop f.raiselower }


RightTitleButton "black" = f.menu "windowmenu"




Button1 =   : door  : f.enterdoor
Button2 =   : door  : f.enterdoor
Button3 =   : door  : f.enterdoor
 
 
Button1 = : root : f.menu "defops"
Button2 = : root : f.menu "defops"
Button3 = : root : f.menu "defops"

Button1 = m : title|window|icon : f.move
Button2 = m : title|window|icon : f.move
Button3 = m : title|window|icon : f.move

Button1 = : title : f.function "move-or-raise"
Button1 = : icon : f.function "move-or-iconify"
Button1 = : iconmgr : f.iconify



Button2 = : title | icon | iconmgr : f.raiselower

Button3= : icon : f.menu "iconops"

"L7" = : window|icon|title|iconmgr : f.iconify
"L7" = : root : f.newdoor
"L5" = : all : f.raiselower

"Up" = : root : f.panup "30"
"Down" = : root : f.pandown "30"
"Left" = : root : f.panleft "30"
"Right" = : root : f.panright "30"
"R7" = : root : f.resetdesktop




#
menu "defops"
{
"vtwm"          f.title
"rlogin"        f.menu "rlogin_menu"
"unix"          f.menu "unix_menu"  
"vtwm"          f.menu "vtwm_menu"  
"windows"       f.menu "windows_menu"
"gadgets"       f.menu "gadgets_menu"
"lock"          f.exec "xlock &"
"Exit"          f.quit
}
 
# if xon works fine, use it, if not (say delete doesn't work &c)
# use the R- example
menu "rlogin_menu"
{
"Miro"          f.exec "xon miro xterm -T miro -n miro $D &"
"Faust"         f.exec "xon faust xterm -T faust -n faust $D &"
"R-TS"          f.exec "xterm -T TS -n TS -tn vt100 -e /usr/ucb/rlogin ts -l uc$
"TS"            f.exec "xon ts -user ucjtrjf xterm -ls $D &"
"Toast"         f.exec "xon toast -user jfarring /usr/ucl/xterm -T toast -n toa$
"Sol"           f.exec "xon sol.cs -user jfarring /usr/ucl/xterm -T sol -n sol $
}
 

menu "gadgets_menu"
{
"Pattern"       f.exec "nice xmartin -static &"
"Sunclock"      f.exec "sunclock &"
"Xtank"         f.exec "xtank &"   
"audio"         f.exec "xcmdpanel audio/.xcmd_quiet &"
"AUDIO"         f.exec "xcmdpanel audio/.xcmdpanel &" 
"Time"          f.exec "saytime &"
"Status"        f.exec "play -i -v 40 /home/jonny/audio/Very_Depressed.au &"
}

menu "unix_menu"
{
"du"            f.exec "du | xdu &"
"calc"          f.exec "xcalc &"   
"clock"         f.exec "swisswatch &"
"meter"         f.exec "xmeter -rv -update 1 -cpu `hostname` &"
"mailtool"      f.exec "xmailtool -rv -iconic &"
"man"           f.exec "xman &"
}

menu "vtwm_menu"
{
"Show Iconmgr"  f.showiconmgr
"Hide Iconmgr"  f.hideiconmgr
"Show Desktop"  f.showdesktopdisplay
"Hide Desktop"  f.hidedesktopdisplay
"Door"          f.newdoor
"Refresh"       f.refresh
"Restart"       f.restart
}

menu "windows_menu"
{
"Iconify"       f.iconify
"Resize"        f.resize 
"Move"          f.move   
"Raise"         f.raise  
"Lower"         f.lower  
"Focus"         f.focus  
"Unfocus"       f.unfocus
""              f.nop
"Quit"          f.delete
"Kill"          f.destroy
}
 
menu "iconops"
{
        "icon"  f.title
        "Open"          f.iconify
        "Move"          f.move   
        "Identify"      f.identify
        "Raise"         f.raise   
        "Lower"         f.lower   
        "Nail"          f.nail    
        ""              f.nop     
        "Quit"          f.delete  
        "Kill"          f.destroy 
}
 
# menus for all windows
menu "windowmenu"
{
"Refresh"       f.winrefresh
"Iconify"       f.iconify   
"ZoomHori"      f.horizoom  
"ZoomVert"      f.zoom
"FullZoom"      f.fullzoom
"Identify"      f.identify
"Nail"          f.nail
""              f.nop 
"Quit"          f.delete
"Kill"          f.destroy
}
Newsgroups: comp.windows.x