From: Dan Doner (dd435157@longs.LANCE.ColoState.Edu)
Date: 10/25/92


From: dd435157@longs.LANCE.ColoState.Edu (Dan Doner)
Subject: a sample twmrc 
Date: Mon, 26 Oct 1992 03:30:45 GMT

Fellow linuxers (or Xers),

Following is a sample .twmrc file I modified from my unix account at the university.

I like it because:

      1) it doesn't force you to bring up the main menu to kill a window
      2) brings up windows of different colors & with scrollbars
      3) brings up windows with different fonts
      4) doesn't put a titlebar on obvious things like xclock
      5) the mouse button definitions are optimized for netrek :)

Of course, all this is trivial stuff. The scrollbar is only the '-sb' option to xterm, etc.
The fonts were selected with 'xfontsel' (do a man on it). This post is intended as a simple
example of an alternative .twmrc file for those of use that are relatively new to X.

Also, a friend of mine suggested a neat prompt:

copy the .bashrc file from /root (or wherever) and replace the line that starts
with 'PS1 ... ' with :

PS1='`whoami`@ `pwd` >'

Put this new .bashrc file in the root directory of your account along with
the following .twmrc or your own .twmrc file. Enjoy! you'll have to mess with the mouse
for a sec to figure out the mapping, or just stare at the .twmrc file for a while.

Dan
=================== cut =============== cut ==============
# file: .twmrc
#
# Global variables
#

TitleFont "helv10b"
IconFont "helv10b"
ResizeFont "9x15"
MenuFont "accordbsx"

DefaultFunction f.beep
#DontMoveOff

IconManagerGeometry "=200x100+0+0"
BorderWidth 4
WarpCursor

AutoRaise
{
        "xclock"
}

NoHighlight
{
    "Clock"
    "xload"
    "xtetris"
    "xman"
    "xclock"
    "No Name"
}

Monochrome {
    BorderColor "white"
}

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

ForceIcons

IconManagerDontShow
{
    "Clock"
    "xpostit"
    "xload"
    "xclock"
    "xman"
}

NoTitle
{
    "Clock"
    "xpostit"
    "xclock"
    "xload"
    "xtetris"
    "xman"
    "xbiff"
    "xnetload"
    "xdbx"
    "xprompt"
# "Untitled"
    "No Name"
}

RandomPlacement

#
# ButtonN= :keys :context :action
# -------- ----- -------- --------

#
# root button operations
#

Button1= :root :f.circleup
Button2= :root :f.beep
Button3= :root :f.menu "Main Menu"

#
# title button operations
#

Button1= :title :f.move
Button2= :title :f.raise
Button3= :title :f.menu "window options"
Button1=m :title :f.iconify
Button2=m :title :f.resize
Button3=m :title :f.zoom

#
# frame button operations
#

Button1= :frame :f.move
Button2= :frame :f.raise
Button3= :frame :f.menu "window options"
Button1=m :frame :f.iconify
Button2=m :frame :f.resize
Button3=m :frame :f.zoom

#
# window button operations
#

Button1=m :window :f.iconify
Button2=m :window :f.resize
Button3=m :window :f.zoom

#
# icon button operations
#

Button2= :icon :f.move
Button3= :icon :f.move
Button1=m :icon :f.iconify
Button2=m :icon :f.resize
Button3=m :icon :f.zoom

#
# Menu specifications
#

menu "window options"
{
        "Window ops" f.title
        "Move" f.move
        "Resize" f.resize
        "(De)Iconify" f.iconify
        "Raise" f.raise
        "Lower" f.lower
        "UnFocus" f.unfocus
        "Destroy" f.destroy
}

menu "TWM Ops"
{
        "TWM Operations" f.title
        "Refresh" f.refresh
        "Restart" f.twmrc
        "Focus" f.focus
        "Version" f.version
        "Show Icon Manager" f.showiconmgr
        "Remove Icon Manager" f.hideiconmgr
        "Exit" f.quit
}

menu "Main Menu"
{
        "Main Menu" f.title
        "Normal Window" ! "xterm -geometry 80x24 -fn fixed -fg yellow -fb vtbold -rv -n 'Normal ' -sb -e /bin/bash &"
        "Big Window" ! "xterm -geometry 80x24 -fn '-*-fixed-*-*-normal-*-*-170-*-*-*-*-*-*' -fb vtbold -fg yellow -rv -n 'Big ' -sb -e /bin/bash &"
        "Medium Window" ! "xterm -geometry 80x24 -fn '-*-*-*-*-*-*-13-130-*-*-*-*-*-*' -fb vtbold -rv -n 'Medium ' -sb -e /bin/bash &"
        "Small Window" ! "xterm -geometry 80x24 -fn '-*-*-*-r-*-*-*-80-*-*-*-*-*-*' -fb vtbold -rv -n 'Small ' -sb -e /bin/bash &"
        "tcsh" ! "xterm -geometry 80x50+0+0 -bw 4 -bg black -fg orange -n ' local ' -e tcsh &"
        "Mono tcsh" ! "xterm -geometry 80x50+0+0 -bw 4 -bg black -fg white -n ' local ' -e tcsh &"
        "small tcsh" ! "xterm -geometry 80x24+0+0 -bw 4 -n ' local ' -e tcsh &"
        "Backgrounds" f.menu "backgrounds"
        "TWM Ops" f.menu "TWM Ops"
        "Xgame" f.menu "xgames"
        "X-utils" f.menu "xutils"
}

menu "xgames"
{
"Tetris" !"/usr/bin/X11/xtetris &"
"Spider" !"/usr/bin/X11/Spider &"
"spider" !"/usr/bin/X11/spider &"
"Roach" !"/usr/bin/X11/xroach &"
"Lander" !"/usr/bin/X11/xlander &"
"Puzzle" !"/usr/bin/X11/xpuzzle &"
"Chomp" !"/usr/bin/X11/xchomp &"
"Chess" !"/usr/bin/X11/xboard &"
"Eyes" !"/usr/bin/X11/xeyes &"
"Gas" !"/usr/bin/X11/xgas &"
"Logo" !"/usr/bin/X11/xlogo &"
"Othello" !"/usr/bin/X11/othello &"
"Vier" !"/usr/bin/X11/xvier &"
"Ico" !"/usr/bin/X11/ico &"
}

menu "xutils"
{
"Edit" !"/usr/bin/X11/xedit &"
"Manual" !"/usr/bin/X11/xman &"
"Clock" !"/usr/bin/X11/xclock &"
"Lock Screen" !"/usr/bin/X11/xlock &"
"Magnifing Glass" !"/usr/bin/X11/xmag &"
"Color Map" !"/usr/bin/X11/xcolormap &"
"Redraw Screen" !"/usr/bin/X11/xrefresh &"
}

menu "backgrounds"
{

        "Backgrounds" f.title
        "Ico" ! "xdemo ico -r &"
        "Black" ! "xsetroot -solid black &"
        "Grey" ! "xsetroot -solid grey &"
        "White" ! "xsetroot -solid white &"
        "Default Weave" ! "xsetroot &"
}

}