"Richard Levitte via RT" on  wrote...
| In message <[EMAIL PROTECTED]> on Fri, 25 Feb 2005 19:26:41 +0100, "Matthew 
D. Fuller via RT" <[EMAIL PROTECTED]> said:
| 
| ctwm-bugs> On Fri, Feb 25, 2005 at 04:35:41PM +0100 I heard the voice of
| ctwm-bugs> Anthony Thyssen via RT, and lo! it spake thus:
| ctwm-bugs> > "Richard Levitte - VMS Whacker via RT" on  wrote...
| ctwm-bugs> > | 
| ctwm-bugs> > | I checked, and it works for me, just the way it's supposed to. 
 What
| ctwm-bugs> > | exactly were you doing?  The relevant entries in my root menu 
tree
| ctwm-bugs> > | are:
| ctwm-bugs> > | 
| ctwm-bugs> > |     "Resize"           f.resize
| ctwm-bugs> > |     "Move"             f.move
| ctwm-bugs> > | 
| ctwm-bugs> >
| ctwm-bugs> > That is basically what I have...
| ctwm-bugs> > 
| ctwm-bugs> > However the WindowOps is a Sub-menu of the root window menu.
| ctwm-bugs> 
| ctwm-bugs> I've got it on a submenu, and it works right for me.
| 
| I'm wondering if it's this interdependency between Anthony's two menus
| that is getting the gremlins in his system.
| 
| Anthony, could you try breaking the interdependency by duplicating
| menus, as a test to see if that matters?
| 
No it did not make a difference.

Simularly with version 3.6

Here is a copy of my full .twmrc file...

.twmrc.m4
=======8<--------CUT HERE----------axes/crowbars permitted---------------
#
# Basied on Anthony's Tomato Color Scheme
#   See   http://www.sct.gu.edu.au/~anthony/icons/appl/twm
#
# This is or was generated from a General M4 twmrc file.
#
changequote([,])dnl  # m4 quoting interferes with shell escapes
dnl
dnl Testing this file...
dnl    rm /tmp/twmrc*; ctwm -k -f .twmrc.m4 -w
dnl    echo "changecom()" | cat /tmp/twmrc* - .twmrc.m4 | m4 | l
dnl
dnl Convert version number 3.5 or 3.5.2 or 3.7-alpha5   to a 3 digit number
dnl for use in ctwm version specific additions.  For example:
dnl    ifelse ( eval( CTWM_VERSION >= 350 ) )
dnl
ifelse( TWM_TYPE, ctwm,
  [define(CTWM_VERSION, substr(translit(
          substr(TWM_VERSION, 0, index(TWM_VERSION-, [-])), [.])000, 0, 3) )dnl
],[define(CTWM_VERSION, 0)dnl
])dnl
dnl Capitalised version of the window managers name, for use in Menus
define( TWM_NAME, translit(TWM_TYPE, [cvt], [CVT]))dnl
dnl
dnl
# [TWM_NAME]     => TWM_NAME
# [TWM_VERSION]  => TWM_VERSION
# [CTWM_VERSION] => CTWM_VERSION
#
#==============================================================
# EMERGENCY BINDING
# In case CTWM fails for some unknown reason, se set up this first.
# Arrange so "Alt-Pause" will re-read ctwm's RC file.
# Otherwise we may not be able to get to the "Restart" menu item.
"Pause" = m : r|w|t|m|f : f.twmrc
#==============================================================
#
# --- General Flags (all TWMs) ---
#
BorderWidth    eval(2+WIDTH/640) # border size of windows (default=2, normal=3)
MoveDelta               3        # Move or Click pixel distance
ConstrainedMoveTime     0        # disable constrained moves
OpaqueMove                       # Move windows directly, not just a border
NoGrabServer                     # don't hog the server on moves, resize, etc.
RestartPreviousState             # try to figure out the old window state
UsePPosition        "non-zero"   # honor positions that are not (0,0)
RandomPlacement                  # randomly place windows with no geometry
NoMenuShadows                    # dont shadow menus (much faster)
#Zoom                  16        # so de/iconifing in 'mac' like maner
#ReverseVideo                    # reverse the colors of the screen (BW)
#XorValue               1        # Make outlines more visible (maybe)
#MaxWindowSize  "30000x30000"    # default

ifelse( TWM_TYPE, ctwm, [dnl
#CenterFeedbackWindow            # place the resize/move feedback in center

ifelse( eval( CTWM_VERSION >= 360 ), 1, [dnl Only if CTWM  Version >= 3.6
SloppyFocus                      # keep focus when on root window
#IconifyStyle "zoomin"           # graphical effect for iconify
                                 #   "normal","mosaic","zoomin",
                                 #   "zoomout","sweep"
])dnl
ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl Only if CTWM  Version >= 3.7
#NoRaiseOnWarp                   # when should I raise a win?
#NoRaiseOnMove                   #  /\
NoRaiseOnResize                  #  ||

#RaiseOnClick                    # raise window when clicked on
#RaiseOnClickButton     3        # which button?
#RaiseDelay            10        # how long delay raise?
])dnl

#PackNewWindows               # try not to overlap with existing windows
IgnoreLockModifier            # Ignore "caplock" with all key bindings

MenuShadowDepth           2
BorderShadowDepth         3
IconManagerShadowDepth    3
ClearShadowContrast      50   # clear shadow for 3D
DarkShadowContrast       50   # dark shadow for 3D

DontMoveOff                   # Windows don't move of screen (unless pushed)
MoveOffResistance        20   # If you reall push, then overide DontMoveOff
#ConstrainedMoveTime      0   # turn off constrained moves

#OpaqueResize                 # Move windows directly, not just a border
#OpaqueMoveThreshold     50   # % of screen area
#OpaqueResizeThreshold   50
AnimationSpeed            5   # frames per second

ThreeDBorderWidth         2   # 3d Effects
UseThreeDMenus
UseThreeDIconManagers
UseThreeDWMap
#SunkFocusWindowTitle
#UseThreeDTitles
#UseThreeDBorders
#BeNiceToColorMap             # use dither shading -- not extra colors

], TWM_TYPE, vtwm, [dnl
StayUpOptionalMenus           # popup and wait menus
VirtualReceivesMotionEvents   # Changes are reflected as they happen
#VirtualSendsMotionEvents     # visa-versa
#OldFashionedVtwmWindowsMenu  # retain icon manager colors
#PrettyZoom
IconBorderWidth           2

IconBevelWidth            2   # 3d Effects
IconManagerBevelWidth     3
InfoBevelWidth            3
MenuBevelWidth            2
#BorderBevelWidth         2
#ButtonBevelWidth         2
#TitleBevelWidth          2
#ShallowReliefWindowButton
#SunkFocusWindowTitle
])dnl

#
# --- Font Selection ---
#
TitleFont       "*-lucida-bold-i-*-120-75-75-*"     # Window Titles
ifelse( eval(WIDTH<1024), 1, [dnl  Smaller fonts on small displays
IconFont        "*-lucida-bold-r-*-80-75-75-*"      # Icon Title
IconManagerFont "*-lucida-bold-r-*-80-75-75-*"      # Postit Icon Manager
MenuFont        "fixed"                             # Menu  (fixed)
],[dnl
IconFont        "*-lucida-bold-i-*-100-75-75-*"     # Icon Title
IconManagerFont "*-lucida-bold-i-*-100-75-75-*"     # Postit Icon Manager
MenuFont        "fixed"                             # Menu  (fixed)
])dnl
ResizeFont      "*-lucida-bold-r-*-240-75-75-*"     # Size Adj (large)
ifelse( TWM_TYPE, ctwm, [dnl
WorkSpaceFont   "*-clean-medium-r-*--6-*-c-40-*"    # Workspace Font (tiny)
])dnl

#
# --- Color and Cursour Fluff ---
#
Color {
  DefaultBackground     "black"         DefaultForeground     "white"
  TitleBackground       "tomato"        TitleForeground       "black"
  BorderColor           "firebrick"
  BorderTileBackground  "darkslategrey" BorderTileForeground  "darkslategrey"
  IconManagerBackground "grey"          IconManagerForeground "black"
  IconBackground        "wheat"         IconForeground        "black"
  MenuTitleBackground   "tomato"        MenuTitleForeground   "black"
  MenuBackground        "grey"          MenuForeground        "black"
  MenuShadowColor       "darkslategrey"
ifelse( TWM_TYPE, ctwm, [dnl
  # CTWM Specific Colors
  IconBorderColor       "black"         IconManagerHighlight  "slategrey"
  MapWindowBackground   "grey"          MapWindowForeground   "black"
], TWM_TYPE, vtwm, [dnl
  # VTWM Specific Colors
  VirtualBackground     "firebrick"     VirtualForeground     "black"
  DesktopDisplayBackground "slategrey"
])dnl
}

Monochrome {
  BorderColor             "black"
  BorderTileBackground    "white"    BorderTileForeground    "black"
  TitleBackground         "white"    TitleForeground         "black"
  MenuTitleBackground     "white"    MenuTitleForeground     "black"
ifelse( TWM_TYPE, ctwm, [dnl
  MapWindowBackground     "white"    MapWindowForeground     "white"
])dnl
}

ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl Only if CTWM  Version >= 3.7
SaveColor                                       # tell client about these
{                                               # settings to "smooth"
     BorderColor
     TitleBackground
     TitleForeground
}
])dnl

ifelse( TWM_TYPE, ctwm, [dnl
BorderResizeCursors     # use nice border cursors for resizing
])dnl
Cursors { Button "hand2"  Resize "sizing"  Icon "gumby"   Destroy "pirate" }

#
# --- Window Handling ---
#
NoTitle {             # programs which are not to have a title bar
  "PostItNote Icon Manager" "WorkSpaceManager" "xpostit"
  "xlabel" "xeyes" "notitle" "UnseenWin" "xapplaunch" "LicqWharf"
  "Modem_Monitor" "Ping_Monitor" "CD_Monitor" "x0rfbserver" "VTWM *"
  "desktop_window"    # Gnome filemanager desktop
  ### title-less monitor windows
  "xclock"  "xbiff"  "xload" "xmeter"  "xnetload" "xosview" "xlogout"
  "Sunclock"
  ### shaped windows
  "xmms"  "i8kmon"  "gkrellm" 
}
StartIconified {      # Programs to iconify immediately on starup
  "Terminal Controls"  "Console"  "XConsole"   "xterm-failsafe"
  "PostItNote"   "Sunclock"   "Licq *"
}

ifelse( TWM_TYPE, ctwm, [dnl
NoIconTitle { "sunclock" }
ifelse( eval( CTWM_VERSION >= 352 ), 1, [dnl Only if CTWM  Version  >= 3.5.2
#StartInMapState { }  # Programs which are not to start in iconic mode
#AutoRaise {          # program to raise to top if pointer is in its window
#}
AutoLower {          # Window lowered when pointer leaves it.
  "desktop_window"   # Gnome filemanager desktop (always below everything)
  "xclock" "gkrellm" "lavaps"
}
])dnl
NoBorder {            # programs which are not to have a border (shaped?)
  "PostItNote Icon Manager"
  "i8kmon"  "lavaps" "xmms" "gkrellm"  
  "panel"
}

], TWM_TYPE, vtwm, [dnl
#NailedAbove       # Put nailed window Above everything else
NailedDown {       # Specify the Sticky Windows
  "VTWM Desktop"  "xclock"
}
DontShowInDisplay {
  "xclock"  "xbiff"  "xload"  "xnetload"  "xmeter" "xeyes" "xlogout"
  "xcdplayer" "xpostit" "bricons" "Sunclock" "notitle" "UnseenWin"
  "xapplaunch" "PostItNote Icon Manager" "WorkSpaceManager"
  "VTWM *" "setcolor"
}

ifelse( eval( CTWM_VERSION >= 360 ), 1, [dnl Only if CTWM  Version >= 3.6
# Sub-window boxes for specific clients  -- does nto see to work!
#WindowBox "xloadbox" "320x100+0-0" { "xload" }  # sized for 4 windows
#windowBox  "rfb" "64x64-5+435" { "x0rfbserver" }  # this does not work!

# Force some windows to start with specific postions and geometrys
# This must be the windows title
WindowGeometries {
  "*Mozilla*"      "1175x810"
  "unison"         "-50+50"
  # nautilus desktop (no border)  -- special - overide its settings
  "desktop_window"  "eval(WIDTH-4)[x]eval(HEIGHT-124)+0+120"
}
])dnl


])dnl
#
# Tab Windows  (the 't' in twm)
#
DontSqueezeTitle
#SqueezeTitle {       # compress the title on these windows
#  "desktop_window"   # Gnome filemanager desktop (window is very large)
#}
dnl  Load a file defining SqueezeTitle for Lab Machines if present
syscmd( test -f "HOME/.twmrc.labs.m4" )dnl
ifelse( sysval(), 0, [include(HOME/.twmrc.labs.m4)] )dnl
dnl   Example of SqueezeTitle for a old obsolete set of 15 lab machines...
#SqueezeTitle {       # compress the title on these windows
#     "xterm-red"             left   15    24
#     ...
#     "xterm-maroon"          left    1    24
#}
ifelse( eval( CTWM_VERSION >= 352 ), 1, [dnl Only if CTWM  Version  >= 3.5.2
#StartSqueezed {}
#AutoSqueeze {}
])
#NoTitleHighlight {  # compress squeezed title even further
#     "xterm-red"  ...   "xterm-maroon"
#}

#
# --- Transient Window Handling ---
#
AutoFocusToTransients            # transient windows auto-focus
TransientOnTop           60      # % area of parent (above this ignore)
TransientHasOccupation           # transient windows popup on current WS
DecorateTransients               # Add a Titlebar to the temporary windows

ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl Only if CTWM  Version  >= 3.7
# Ignore the transient windows for these clients
# That is clients pop them up in very specific locations (don't move them)
IgnoreTransient { "Wine" }
])dnl

# --- Icon Handling ---
#
ForceIcons                              # force programs to use icon listed
ifelse( eval( CTWM_VERSION >= 360 ), 1, [dnl Only if CTWM  Version  >= 3.6
IconBorderWidth           3
IconJustification   "center"  # where put image/title in reagions
SchrinkIconTitles             # Motif like icon title shrink and expand
MaxIconTitleWidth       150   # titles larger than this is ridiculous
# If not using  SchrinkIconTitles  use this instead...
#MaxIconTitleWidth  ifelse( eval(WIDTH<1024), 1, 56, 64 ) # forced max width
])dnl

#
# Symbolic directory links in the "twm" directory point to appication icons
define(TWM_ICONS, HOME/icons/appl/twm)dnl
define(APP_ICONS, HOME/icons/desc)dnl
# Bitmap/Color Icon Location (set in bitmapFilePath resource)
IconDirectory   "TWM_ICONS"
ifelse( TWM_TYPE, ctwm, [dnl
# Color Icon location (ctwm only)
PixmapDirectory "TWM_ICONS:APP_ICONS"
])dnl

#
# Icon Regions -- where icons appear on the screen.
#
ifelse( eval(WIDTH<1024), 1, [dnl
dnl  ------------  Small Displays ------------
# Place small 32x32 icons, along top of screen only
IconRegion "=eval(WIDTH-150)x120+0+3" West North 40 55
],[dnl
dnl  ---------  Normal/Large Displays --------
# Place standard 64x54 icons, along top, just below postitnote icon manager
IconRegion "=eval(WIDTH-150)x80+2+30"   West North 70 80
# Put any extra icons along bottom, then upward.
IconRegion "=eval(WIDTH-150)x300+2-0"   West South 70 80
])dnl

ifelse( TWM_TYPE, ctwm, [dnl
# Place specific application icons in specific locations
#IconRegion "=70x70-140+5" North East 70 70 { "Exmh" }  # This FAILS

# Region flags
IconRegionAlignement     "top"         # How to place icon in region
IconRegionJustification  "center"
])dnl

#
# Application Icon Override
#
# The following table tells twm what icon it should use for each application.
# The elements are in pairs of strings the first being either the the class of
# the application being used (EG `XConcole')  OR name of the window (EG
# `xterm-host'). The second string is the filename of the icon to use and is
# found either in the above `IconDirectory' or in the `*bitmapFilePath'
# Xresource directorys.              --- Anthony Thyssen  19/7/1993
#
ifelse( eval(WIDTH<1024), 1, [dnl
dnl ------------- Small Displays -----------
ifelse( TWM_TYPE, twm, [dnl
include(APP_ICONS/bw-32/TWM.icons)dnl  small bitmap icons only
],[dnl
include(APP_ICONS/cl-32/TWM.icons)dnl  small pixmap icons only
])dnl
],[dnl
dnl   -------  Normal/Large Displays -------
# Standard 64x54 icons, along top, just below postitnote icon manager
include(APP_ICONS/std/TWM.icons)dnl       Bitmap icons
ifelse( TWM_TYPE, twm, [],[dnl
include(APP_ICONS/std-cl/TWM.icons)dnl    Also color pixmaps
])])dnl

#
# --- Icon Managers ---
#

ifelse( eval(WIDTH>=1024), 1, [dnl small laptop display?
# PostItNote IconManager along top edge, each button 100 pixels wide
IconManagers { "PostItNote" "=WIDTH[x]21+45+5" eval(WIDTH/100) }
],[dnl
# PostItNote Icon Manager on right side, label width auto-adjusts
IconManagers { "PostItNote" "=80x200-3+125"  1 }
])dnl
# The next three is to get ctwm to display the Icon Manager, immediately!
ShowIconManager                      # Show Icon Managers
IconManagerDontShow                  # but NOT the global manager
IconManagerShow { "PostItNote" }     # and only show the PostIt manager
# Don't these show icons (ReMap via  icon manager  or  twm window menus)
IconifyByUnmapping { "WorkSpaceManager" "PostItNote" }
ifelse( TWM_TYPE, ctwm, [dnl
# Sort the contents of the postitnot icon manager (otherwise randomised order)
SortIconManager                      # Sort the Postitnotes Titles
#NoCaseSensitive                     # sort with case?
#NoIconManagerFocus                  # don't focus window pointed to

#
# --- CTWM -- Workspace Manager ---
#
# Looks and options
ShowWorkSpaceManager           # start with workspace manager up
StartInMapState                # start in the map rather than button state
DontPaintRootWindow            # don't draw WS pixmap into root window
DontWarpCursorInWMap           # don't warp cursor to window picked in map
# ReverseCurrentWorkspace      # use inverse fg/bg colors for current workspace
ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl  Only if CTWM  Version >= 3.7
WMgrHorizButtonIndent     0    # /dist. between buttons
WMgrVertButtonIndent      0    # \when in button mode
])dnl
# ReallyMoveInWorkspaceManager   # really move the win when manipulated in map
# AlwaysShowWindowWhenMovingFromWorkspaceManager  # show win during move

# WS Manager Size/Position (40 pixel high screens)
define([WS_NUM],    5)dnl     5 seperate workspaces
define([WS_COLS],   3)dnl
define([WS_POS],    -5-5)dnl
define([WS_ROWS],   eval((WS_NUM-1)/WS_COLS+1))dnl
define([WS_HEIGHT], eval(40*WS_ROWS))dnl
define([WS_WIDTH],  eval(40*WS_COLS*WIDTH/HEIGHT))dnl
WorkSpaceManagerGeometry "WS_WIDTH[x]WS_HEIGHT[]WS_POS"  WS_COLS

WorkSpaces {
  # name  bg-button  fg-button  bg-root      fg-root    pixmap
  "Main"   { "grey"    "black"    "dodgerblue" "black"    "rootmap1.xbm" }
  "Music"  { "grey"    "black"    "seagreen"   "black"    "rootmap2.xbm" }
ifelse( eval( WS_COLS >= 3 ), 1, [dnl
  "Laptop" { "grey"    "black"    "purple"     "black"    "rootmap1.xbm" }
])dnl
  "Screen" { "grey"    "black"    "khaki4"     "black"    "rootmap2.xbm" }
  "Extra"  { "grey"    "black"    "Sienna"     "black"    "rootmap1.xbm" }
}
MapWindowCurrentWorkSpace { "firebrick" }  # highlight the current WS

# Where to place each window (after workspace declarations)
#NoShowOccupyAll        # don't display windows appearing on all workspaces
#AutoOccupy             # if application changes name, change occupy
OccupyAll {  # make these clients sticky
  "xclock"  "xmeter"  "xload"  "xosview"  "xlogout"  "lavaps"  "i8kmon"
  "Gkrellm"  "Notifier"  "SshAskpass"
}
Occupy {
  "xmms"               {"Music"}
  "VMware Workstation" {"Music"}
  "Vncviewer"          {"Screen"}
  "Nautilus"           {"Screen"}
  "GQview"             {"Extra"}
  "Povray"             {"Extra"}
#  "*" {"Main"}   # default is current workspace
}
# These are for use by ill-behavied clients (like Frame5)
#UnmapByMovingFarAway { }  # Don't unmap these when you goto other WS
#DontSetInactive { }       # Don't make these wins inactive in other WS

], TWM_TYPE, vtwm, [dnl
#
# --- VTWM -- Virtual Desktop -and- Auto Panning ---
#
# WARNING: TWM windows are not properly positioned after re-parenting.
# as such I have to move window down and right by BorderWidth.
#VirtualDesktop "80x60-3+3" 15   # Overlay Clock with Virtual Panner
VirtualDesktop "70x40-0+6" 15    # -- fixed position to overlay clock
#
AutoPan               5   # percent of Screen to pan by (start non-natural)
#PanResistance        0   # time (ms) before panning
AutoPanBorderWidth    2   # screen edge size for active autopan (both)
#AutoPanExtraWarp     1   # mouse position after non-natural autopan
#NaturalAutopanBehavior   # keep cursour in same virtual location as we pan
])dnl

#
# ============================================================================
#
# ------------- Bind Mouse, Keys and Title Bar Actions ---------------
#
# --- Global Functions ---
#
DefaultFunction  f.beep            # beep use if not a proper function
#WindowFunction  f.function "..."  # Action to perform from "Twm Window" menus
#WarpUnmapped            # Requied to make default "WindowFunction" work

dnl dnl forloop([N], start, end, [string-N])
dnl define([forloop],
dnl        [pushdef([$1], [$2])_forloop([$1], [$2], [$3], [$4])popdef([$1])])
dnl define([_forloop],
dnl        [$4][ifelse($1, [$3], ,
dnl        [define([$1], incr($1))_forloop([$1], [$2], [$3], [$4])])])

# --- General User Functions ---
#
Function "MoveRaiseLower" { f.move f.deltastop f.raiselower }
Function "MoveIconify"    { f.move f.deltastop f.iconify }

ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl  Only if CTWM  Version >= 3.7
function "NextWSwithWindow" {   # move window to next WS and follow it
              f.raise  f.movetonextworkspace  f.nextworkspace }
function "PrevWSwithWindow" {   # move window to prev WS and follow it
              f.raise  f.movetoprevworkspace  f.prevworkspace }
])dnl

ifelse( TWM_TYPE, ctwm, [dnl
ifelse( CLIENTHOST, --disabled--, [dnl
define(SNDDIR, HOME/store/sounds/beeps)dnl  # where to find the sounds
define(PLAY, play)dnl                         # and play command to use
ChangeWorkspaceFunction !"exec 2>/dev/null; PLAY SNDDIR/shhhhuuu.au"
IconifyFunction         !"exec 2>/dev/null; PLAY SNDDIR/drip.au"
DeIconifyFunction       !"exec 2>/dev/null; PLAY SNDDIR/boink.au"
])])dnl

#
#------------------- Mouse Buttons --------------------
# NOTES on bindings...
# Mod List:  s=shift c=control m=meta
#            a=altcontex  (see f.altcontext and f.altkeymap)
# Contex:    a=all r=root t=title f=frame i=icon m=iconmgr w=window
#
# Root Menus -- Main Menus, including user defined menus
Button1 =   : r   : f.menu "TwmControls"    # Twm Controls Menu
Button2 =   : r   : f.menu "LoginHosts"     # Host List Selection (ext file)
Button3 =   : r   : f.menu "Applications"   # User Application Menu (ext file)

# Window Manager controls (shift-button3 on anything BUT application window)
Button3 = s : t|f|i|m|r : f.menu "TwmControls"

# Window (titlebar and frame) Controls
Button1 =   : t|f : f.function "MoveRaiseLower"
Button2 =   : t|f : f.resize
Button3 =   : t|f : f.menu "WindowOps"

# Icon Controls
Button1 =   : i|m : f.function "MoveIconify"
Button3 =   : i|m : f.menu "IconOps"

ifelse( TWM_TYPE, ctwm, [dnl
# Squeeze window experiments
Button1 = s : t|f : f.squeeze
Button1 = c : t|f : f.squeeze
Button1 = m : t|f : f.squeeze
])dnl

#---------------- Title Bar Buttons -------------------
#
NoDefaults                # remove all title buttons first (iconify,resize)
TitleButtonBorderWidth 0  # remove boarders around title buttons
FramePadding 1            # frame padding between text and buttons
ButtonIndent 0            # extra indentation around buttons
# Define the active window title bar highlight
ifelse( TWM_TYPE, ctwm, [dnl
Pixmaps { TitleHighlight "xpm:tomato_highlight.xpm" } # title highlight
#Pixmaps { TitleHighlight "xpm:title_eyes.xpm" }
],[dnl
Pixmaps { TitleHighlight "title_squiggle.xbm" }
#Pixmaps { TitleHighlight "title_herring.xbm" }
])dnl

# Define the title bar buttons
# The "tomato_*" icon images set is defined for a 12 point "TitleFont"
# CTwm does not (yet) allow shift events on titlebar buttons.
#
ifelse( TWM_TYPE, ctwm, [dnl
dnl   pixmap color buttons
  # OPTIONAL "titlebar handle" buton, for almost completely obscured windows
  # or stacked, "tabbed" windows. EG: same operations as a title or frame.
  LeftTitleButton  "xpm:tomato_dash.xpm" {    # titlebar extension
        button1 : f.function "MoveRaiseLower"
        button2 : f.resize
        button3 : f.menu "WindowOps"
        # button3 = s : f.menu "TwmMenu"  # This is NOT posible yet!
      }
  LeftTitleButton  "xpm:tomato_iconify.xpm"   = f.iconify
ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl  Only if CTWM  Version >= 3.6
  LeftTitleButton  "xpm:tomato_pin.xpm" {     # f.menu "Occupy"
        button1 :  f.function "NextWSwithWindow"
        button3 :  f.menu "Occupy"
      }
],[dnl
  LeftTitleButton  "xpm:tomato_pin.xpm"       = f.menu "Occupy"
])dnl
# LeftTitleButton  "xpm:tomato_focus.xpm"     = f.focus
  LeftTitleButton  "xpm:tomato_lightning.xpm" = f.delete
  LeftTitleButton  "xpm:tomato_nuke.xpm"      = f.destroy
# RightTitleButton "xpm:tomato_question.xpm"  = f.identify
  RightTitleButton "xpm:tomato_fullscrn.xpm"  = f.fullzoom
  RightTitleButton "xpm:tomato_expand.xpm"    = f.zoom
  RightTitleButton "xpm:tomato_resize.xpm"    = f.resize
],[dnl  bitmap buttons
  LeftTitleButton  "bm_12pt_dash.xbm"         = f.function "MoveRaiseLower"
  LeftTitleButton  "bm_12pt_iconify.xbm"      = f.iconify
  LeftTitleButton  "bm_12pt_pin.xbm"          = f.menu "Occupy"
# LeftTitleButton  "bm_12pt_focus.xbm"        = f.focus
  LeftTitleButton  "bm_12pt_lightning.xbm"    = f.delete
  LeftTitleButton  "bm_12pt_nuke.xbm"         = f.destroy
# RightTitleButton "bm_12pt_question.xbm"     = f.identify
  RightTitleButton "bm_12pt_fullscrn.xbm"     = f.fullzoom
  RightTitleButton "bm_12pt_expand.xbm"       = f.zoom
  RightTitleButton "bm_12pt_resize.xbm"       = f.resize
])dnl

#
#----------------- Keyboard HotKeys ---------------------
# Stacked Window Handling controls
#Insert"= c -- used in xterm binding for quick pasting to a stack of windows
#                      (EG: Next, Insert, Next, Insert..)
"Prior" = c : all : f.iconify             # Ctrl - Page Up
"Next"  = c : all : f.raiselower          # Ctrl - Page Down
"Home"  = c : all : f.fullzoom            # Ctrl - Home
"End"   = c : all : f.delete              # Ctrl - End


# Hotkeys for Web access
"F12"    =   : all : !"www_ctrl &"    # Jump to the selected URL
"F12"    = s : all : !"www_ctrl -w &" # Start new window with URL
"F11"    =   : all : !"www_ctrl -s"   # Google Search Engine
"F11"    = s : all : !"www_ctrl -si"  # Google Image Search

"SunF37" =   : all : !"www_ctrl &"    # Jump to the selected URL
"SunF37" = s : all : !"www_ctrl -w &" # Start new window with URL
"SunF36" =   : all : !"www_ctrl -s"   # Google Search Engine
"SunF36" = s : all : !"www_ctrl -si"  # Google Image Search

# Hot key for workspaces
"Print"  =    : all     : f.nextworkspace                 # next WS
"Print"  = s  : all     : f.prevworkspace                 # prev WS
ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl  Only if CTWM  Version >= 3.7
"Print"  =  c  : t|f|i|w : f.function "NextWSwithWindow"
"Print"  = s|c : t|f|i|w : f.function "PrevWSwithWindow"
])dnl

# Special Keyboard Functions (if present) -- MP3 Player
# These keys were not defined in the kernal. Set in /etc/rc.local
# then the X window keycodes were found and set in ".xmodmap.wumpus"
# The XKeySyms were chossen so the KDE would not muck around with them.
ifelse( CLIENTHOST, wumpus, [dnl
# NOTE for wumpus sound, due to use of external speakers -v does not work
# Also while -w works for most things, it fails for "cdp" which ignores it
# It looks like -W (PCM 2) controls output to external speakers directly.
"F21"   =   : all : !"amixer -q set Master 1-; \
                      amixer -q set PCM    1-"          # volume up
"F22"   =   : all : !"mount_encrypted music /dev/hda9 &&
                      ( xmms --play-pause 2>/dev/null & ) &"  # play/pause
"F23"   =   : all : !"amixer -q set Master 1+; \
                      amixer -q set PCM    1+"          # volume down
"F21"   = s : all : !"xmms --rew &"                     # previous song
"F22"   = s : all : !"killall xmms; sleep 1;
                      mount_encrypted -u music"  # stop and kill
"F23"   = s : all : !"xmms --fwd &"                     # next song
"XF86Standby"  =   : all : !"xscreensaver-command -lock >/dev/null &"
], CLIENTHOST, mage, [dnl
# MultiMedia Keys were defined by Keyboard "hp2505"
# Music Controls
"XF86AudioPlay" =   : all : !"mount_encrypted music /dev/hda9 &&
                              ( xmms --play-pause 2>/dev/null & ) &"
"XF86AudioPlay" = s : all : !"mount_encrypted music /dev/hda9 &&
                              ( xmms --play 2>/dev/null & ) &"
"XF86AudioStop" =   : all : !"xmms --stop &"
"XF86AudioStop" = s : all : !"killall xmms; sleep 1;
                              mount_encrypted -u music"
"XF86AudioPrev" =   : all : !"xmms --rew &"     # previous song
"XF86AudioNext" =   : all : !"xmms --fwd &"     # next song
# Volume Controls
# on i8600 "Master" controls the speakers, "Headphone" the hedphones
# PCM adjusts both.  this allows you to set them seperatally via Kmix.
"XF86AudioLowerVolume" =  : all : !"amixer -q set PCM 1-"  # volume down
"XF86AudioRaiseVolume" =  : all : !"amixer -q set PCM 1+"  # volume up
"XF86AudioMute"        =  : all : !"amixer -q set PCM toggle" # mute
])dnl

ifelse( TWM_TYPE, vtwm, [dnl
#------------- Vitual Desktop Bindings ---------------
Button1 =       : v|desktop     : f.movescreen
"Up"    =       : v|desktop     : f.panup    "20"
"Down"  =       : v|desktop     : f.pandown  "20"
"Left"  =       : v|desktop     : f.panleft  "20"
"Right" =       : v|desktop     : f.panright "20"
ifelse( CLIENTHOST, mimic, [dnl
# win95 menu shift / scroll lock cursors
"Up"    = m4|m5 : all           : f.panup    "20"
"Down"  = m4|m5 : all           : f.pandown  "20"
"Left"  = m4|m5 : all           : f.panleft  "20"
"Right" = m4|m5 : all           : f.panright "20"
])dnl

# ----------------- Initial Actions -------------------
Function "VTwm Profile" {
  #f.autopan
  f.hidedesktopdisplay
}
])dnl

# =========================================================================
#
# ---------------------- Menu Definitions ------------------------
#
StayUpMenus                   # popup and wait for menus menus
ShortAllWindowsMenus          # Don't show IM and WSM in twm window menus
#InterpolateMenuColors        # interpolate colors in menus
#NoBackingStore               # /which is faster,
#NoSaveUnders                 # \try them out!

dnl  The f.seperator action (ctwm,vtwm) is not available for plain ol' twm
dnl  so we need to replace it appropriatly
ifelse( TWM_TYPE, [twm], [dnl
  define(F_LINE,f.nop)dnl
],[dnl
  define(F_LINE,f.separator)dnl
])dnl
dnl

# ---------------- General Window Manager Controls ------------------
# Appears on shifted menu mouse button anywhere excpt app windows
#
menu "TwmControls" {
  "TWM_NAME Controls" f.title
  "Restart"           f.restart
  "Refresh ALL"       f.refresh             # refresh whole display
  #Rebuild TWM_NAME[RC]" !"wm_launch --force TWM_TYPE --nolaunch"
  "Rebuild Hosts"     !"wm_host_menu misc/dist_list > ~/.twmrc.hosts.m4"
  "Window Ops"        f.menu "WindowOps"
  "-------------"     F_LINE
ifelse( TWM_TYPE, ctwm, [dnl
  "Animation"         f.menu "Animation"
  "Twm Icons"         f.menu "TwmIcons"
  "Twm Visible"       f.menu "TwmVisible"
  "Twm Windows"       f.menu "TwmWindows"       # windows on this WS
  "Twm All Windows"   f.menu "TwmAllWindows"    # windows on all WS
ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl Only if CTWM  is Version 3.6
  "Twm Visible"       f.menu "TwmVisible"       # Visible W on this WS
  "Twm AllIcons"      f.menu "TwmAllIcons"      # Icons on all WS
  "Twm Keys"          f.menu "TwmKeys"          # Bound Keys Lists
])dnl
  "Twm Workspaces"    f.menu "TwmWorkspaces"
  "Workspace On/Off"  f.toggleworkspacemgr      # workspace selector
  "Workspace State"   f.togglestate             # toggle button/map state
  "Icon Mgr Show"     f.showiconmgr
  "Icon Mgr Hide"     f.hideiconmgr
  "Adopt Window"      f.adoptwindow             # special usage, see  ctwm -w
ifelse( eval( CTWM_VERSION >= 360 ), 1, [dnl Only if CTWM  is Version 3.6
  "Adopt Move"        f.hypermove               # special usage, see  ctwm -w
])dnl
], TWM_TYPE, vtwm, [dnl
  "AutoPan On/Off"    f.autopan
  "Desktop Show"      f.showdesktopdisplay
  "Desktop Hide"      f.hidedesktopdisplay
  "Icon Mgr Show"     f.showiconmgr
  "Icon Mgr Hide"     f.hideiconmgr
])dnl
  "Show Version"      f.version
  "-------------"     F_LINE
  "Quit TWM_NAME"     f.menu "ReallyQuit"
  "Logout"            f.menu "ReallyLogout"
  "Reboot"            f.menu "ReallyReboot"
}

menu "ReallyQuit" {
  "Really Quit ?"     ("gold":"firebrick")  f.title
  "-------> Yes"      f.quit
}

menu "ReallyLogout" {
  "Really Logout ?"   ("gold":"firebrick")  f.title
  "---------> Yes"    !"xclosedown &"
}

menu "ReallyReboot" {
  "Really Reboot ?"   ("gold":"firebrick")  f.title
  "---------> Yes"    !"reboot &"
}

# ----------------- Window Controls ------------------
# Menu mouse button on window title or frame
# Or mouse button 1 on root window
#
menu "WindowOps" {
  "Window Ops"     f.title
  "Information"    f.identify
  "Iconify"        f.iconify                 # titlebar button
  "Refresh Win"    f.winrefresh
  "Refresh ALL"    f.refresh
  "Move (force)"   f.forcemove
  "Move"           f.move                    # titlebar          mouse 1 move
  "Resize"         f.resize                  # titlebar button & mouse 2
  "Raise/Lower"    f.raiselower              #                   mouse 1
  "Focus(Un)"      f.focus                   # titlebar button
  "Zoom (vert)"    f.zoom                    # titlebar button
  "FullZoom"       f.fullzoom                # titlebar button
ifelse( TWM_TYPE, ctwm, [dnl
  "Squeeze"        f.squeeze                 # experimental - shift mouse 1
ifelse( eval( CTWM_VERSION >= 370 ), 1, [dnl Only if CTWM  is Version 3.7
  "Hyper Move"     f.hypermove               # adopting move, see ctwm -w
])dnl
  "Occupy..."      f.menu "Occupy"
], TWM_TYPE, vtwm, [dnl
  "Nail"           f.nail
])dnl
  # Dangerious Functions (use warning colors)
  "-----------"    F_LINE
  "Delete"      ("firebrick":"grey")   f.delete
  "Destroy"     ("firebrick":"grey")   f.destroy
ifelse( TWM_TYPE, ctwm, [dnl
  "Del/Destory" ("firebrick":"grey")   f.deleteordestroy
])dnl
  "-----------"    F_LINE

  # Other less important functions
  "Print"          !"import -frame -page A4 ps:- | lpr &"
  " `' Inverse"    !"import -frame -page A4 -negate ps:- | lpr &"
  " `' Landscape"  !"import -frame -page A4 -rotate 90 ps:- | lpr &"
  "Dump eps"  !"import eps:`xprompt -rlen 40 -ibw 0 -re -p 'PS Filename '` &"
  " `'  xbm"  !"import xbm:`xprompt -rlen 40 -ibw 0 -re -p 'XBM Filename '` &"
  " `'  xpm"  !"import xpm:`xprompt -rlen 40 -ibw 0 -re -p 'XPM Filename '` &"
  " `'  gif"  !"import gif:`xprompt -rlen 40 -ibw 0 -re -p 'GIF Filename '` &"

  "-----------"       F_LINE
#  "TWM_NAME Controls" f.menu "TwmControls"
}

# -------------------- Icon Menu ---------------------
# Menu mouse button on icon or icon manager
#
menu "IconOps" {
  "Icon Ops"       f.title
  "Information"    f.identify
  "De-Iconify"     f.deiconify               # Button 1
  "Move"           f.move                    # Button 1 movement
ifelse( TWM_TYPE, ctwm, [dnl
  "Occupy"    f.menu "Occupy"
], TWM_TYPE, vtwm, [dnl
  "Nail"           f.nail
])dnl
  # Dangerious Functions (use warning colors)
  "-----------"      F_LINE
  "Delete"   ("firebrick":"grey") f.delete
  "Destroy"  ("firebrick":"grey") f.destroy
}

ifelse( TWM_TYPE, ctwm, [dnl
# ---------------- Animation Controls -----------------
menu "Animation" {
  "Anim Start"     f.startanimation
  "Anim Faster"    f.speedupanimation
  "Anim Slower"    f.slowdownanimation
  "Anim Stop"      f.stopanimation
}

# ----------------- Workspace Menu -------------------

# Move window to a specific Workspaces
Function "Occupy_Main"   { f.raise f.addtoworkspace "Main"   f.vanish }
Function "Occupy_Music"  { f.raise f.addtoworkspace "Music"  f.vanish }
Function "Occupy_Laptop" { f.raise f.addtoworkspace "Laptop" f.vanish }
Function "Occupy_Screen" { f.raise f.addtoworkspace "Screen" f.vanish }
Function "Occupy_Extra"  { f.raise f.addtoworkspace "Extra"  f.vanish }

menu "Occupy" {
  "Occupy Main"    f.function "Occupy_Main"
  "Occupy Music"   f.function "Occupy_Music"
ifelse( eval( WS_COLS >= 3 ), 1, [dnl
  "Occupy Laptop"  f.function "Occupy_Laptop"
])dnl
  "Occupy Screen"  f.function "Occupy_Screen"
  "Occupy Extra"   f.function "Occupy_Extra"
  "------------"   f.separator
  "Vanish"         f.vanish
  "Occupy All"     f.occupyall
  "Occupy..."      f.occupy
}

])dnl

# --------- Applications Menu (right button) ----------
dnl  include this file if present
syscmd( test -f "HOME/.twmrc.apps.m4" )dnl
ifelse( sysval(), 0, [include(HOME/.twmrc.apps.m4)])dnl

# --------- Login Hosts Menu (middle button) ----------
dnl  include this file if present
syscmd( test -f "HOME/.twmrc.hosts.m4" )dnl
ifelse( sysval(), 0, [include(HOME/.twmrc.hosts.m4)])dnl

# -----------------------------------------------------

=======8<--------CUT HERE----------axes/crowbars permitted---------------

  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
  It is sometimes hard to decide whether Usenet is a glimpse into the 21st
  century or a New England town meeting gone international - Andrew Tanenbaum
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


Reply via email to