############################################################################# # One more complex function - couldn't be defined earlier because it used # pop-up menus # # This creates a motif-ish sticky menu for the title-bar window-ops # pop-up # Menu acts like normal twm menu if you just hold the button down, # but if you click instead, the menu stays up, motif style Function "window_ops_func" PopUp "Click" Window Ops2 PopUp "Motion" Window Ops2 # Motif would add: # I'll add it too, it can be mighty handy. Close "DoubleClick" EndFunction ############################################################################## # This defines the mouse bindings # First, for the mouse in the root window # Button 1 gives the Utilities menu # Button 2 gives the Window Ops menu # Button 3 gives the WindowList (like TwmWindows) # I use the AnyModifier (A) option for the modifier field, so you can hold down # any shift-control-whatever combination you want! # Button Context Modifi Function Mouse 1 R A PopUp "Utilities" Mouse 2 R A PopUp "Window Ops" Mouse 3 R A Module "winlist" FvwmWinList transient # Now the title bar buttons # Any button in the left title-bar button gives the window ops menu # Any button in the right title-bar button Iconifies the window # Any button in the rightmost title-bar button maximizes # Note the use of "Mouse 0" for AnyButton. # Button Context Modifi Function #Mouse 0 1 A Function "window_ops_func" #Mouse 0 2 A Function "maximize_func" #Mouse 0 4 A Iconify Mouse 0 1 A Function "window_ops_func" Mouse 1 2 A Iconify Mouse 3 2 A Destroy Mouse 1 4 A Maximize 0 100 Mouse 3 4 A Maximize 100 100 # Now the rest of the frame # Here I invoke my complex functions for Move-or-lower, Move-or-raise, # and Resize-or-Raise. # Button 1 in the corner pieces, with any modifiers, gives resize or raise #Mouse 1 F A Function "Resize-or-Raise" Mouse 1 FS A Resize # Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise #Mouse 1 TS A Function "Move-or-Raise" Mouse 1 T A Function "Move-or-Raise" # Button 1 in an icons gives move for a drag, de-iconify for a double-click, # nothing for a single click # Button 2 in an icon, w/ any modifiers, gives de-iconify Mouse 1 I A Function "Move-or-Iconify" Mouse 2 I A Iconify # Button 2 in the corners, sides, or title-bar gives the window ops menu Mouse 2 FST A Function "window_ops_func" # Button 3 anywhere in the decoration (except the title-bar buttons) # does a raise-lower Mouse 3 TSIF A RaiseLower # Button 3 in the window, with the Modifier-1 key (usually alt or diamond) # gives Raise-Lower. Used to use control here, but that interferes with xterm #Mouse 3 W M RaiseLower Mouse 1 W M RaiseLower Mouse 2 W M Move Mouse 3 W M Resize ############################################################################ # Now some keyboard shortcuts. # Arrow Keys # press arrow + control anywhere, and scroll by 1 page #Key Left A C Scroll -100 0 #Key Right A C Scroll +100 +0 #Key Up A C Scroll +0 -100 #Key Down A C Scroll +0 +100 # press arrow + meta key, and scroll by 1/10 of a page #Key Left A M Scroll -10 +0 #Key Right A M Scroll +10 +0 #Key Up A M Scroll +0 -10 #Key Down A M Scroll +0 +10 # press shift arrow + control anywhere, and move the pointer by 1% of a page #Key Left A SC CursorMove -1 0 #Key Right A SC CursorMove +1 +0 #Key Up A SC CursorMove +0 -1 #Key Down A SC CursorMove +0 +1 # press shift arrow + meta key, and move the pointer by 1/10 of a page #Key Left A SM CursorMove -10 +0 #Key Right A SM CursorMove +10 +0 #Key Up A SM CursorMove +0 -10 #Key Down A SM CursorMove +0 +10 # Keyboard accelerators #Key F1 A M CirculateUp #Key F1 A M Popup "Utilities" #Key F2 A M Popup "Window Ops" #Key F3 A M Module "WindowList" FvwmWinList #Key F4 A M Iconify #Key F5 A M Move #Key F6 A M Resize #Key F7 A M CirculateUp #Key F8 A M CirculateDown #Page Up/Dapge Down keys are used to scroll by one desktop page # in any context, press page up/down + control # in root context, just pressing page up/down is OK # # I prefer the non-wrapping scroll. These are for example purposes only #Key Next A C Scroll 100000 0 #Key Next R N Scroll 100000 0 #Key Prior A C Scroll -100000 0 #Key Prior R N Scroll -100000 0
Last Modified: 14 June 1997
St. Louis Unix Users Group - Linux SIG