# To make M4 happy #undefine(`include') # Unfortunately, order does matter in this file # The correct order for inserting configurations is: # 1. Colors # 2. Assorted configuration paramters such as ClickToFocus, or MWMBorders # 3. Path setup (ModulePath, PixmapPath, IconPath) # 4. Style settings, including the default style Style "*" ... # 5. InitFunction and ResetFunction definitions. # 6. Other Functions. Functions cannot be forward referenced from # other functions, but they can be backward referenced. # 7. Menus definitions. Same caveats about forward referencing # 8. Key and Mouse Bindings. # 9. Module options. # The order of steps 5, 6, and 7 is not critical, as long as there are # no forward references to functions or menus. # If you get it wrong, the most common problem is that color or font settings # are ignored ########################################################################### # set up the colors # # OK some people like bright clear colors on their window decorations. # These people, I guess would mostly be from nice sunny/good weather places # line California. # # StdForeColor Black # StdBackColor LightSkyBlue # HiForeColor yellow # HiBackColor PeachPuff1 # PagerBackColor BlanchedAlmond # Me, I'm from Upstate New York, and live in New Hampshire, so I prefer # these dark muddy colors... # this is used for the selected window HiForeColor Black HiBackColor #5f9ea0 StdForeColor Black StdBackColor #d3d3d3 # pager colors near the end of this file StickyForeColor Black StickyBackColor #908090 # Menu colors MenuForeColor Black MenuBackColor grey MenuStippleColor SlateGrey ############################################################################ # Now the fonts - one for menus, another for window titles, another for icons Font -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* WindowFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* IconFont -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-* #IconFont fixed ########################################################################### # Set up the major operating modes # ######################## FOCUS STUFF ############################## # Set windows to auto-raise after 750 milliseconds if you like it. # Autoraise can sometimes obscure pop-up windows. Performance is now # similar to olvwm's auto-raise feature. #AutoRaise 750 # Normally, we'll be in focus-follows mouse mode, but uncomment this # for mwm-style click-to-focus #ClickToFocus ######################## ICON STUFF ############################## # Auto Place Icons is a nice feature.... # This creates two icon boxes, one on the left side, then one on the # bottom. Leaves room in the upper left for my clock and xbiff, # room on the bottom for the Pager. #IconBox -150 90 -5 -140 #IconBox 5 -140 -140 -5 IconBox -70 1 -1 -140 # If you uncomment this, and make sure that the WindowList is bound to # something, it works pretty much like an icon manager. #SuppressIcons # StubbornIcons makes icons de-iconify into their original position on the # desktop, instead of on the current page. StubbornIcons # With AutoPlacement, icons will normally place themselves underneath active # windows. This option changes that. StubbornIconPlacement # If you want ALL you icons to follow you around the desktop (Sticky), try # this #StickyIcons ######################## MWM EMULATION ####################### # # My feeling is that everyone should use MWMDecorHints and MWMFunctionHints, # since some applications depend on having the window manager respect them # MWMFunction hints parses the function information in the MOTIF_WM_HINTS # property, and prohibits use of these functions on the window. Appropriate # portions of the window decorations are removed. MWMFunctionHints # MWM is kinda picky about what can be done to transients, and it was keeping # me from iconifying some windows that I like to iconify, so here's an # over-ride that will allow me to do the operation, even tough the menu # item is shaded out. MWMHintOverride # MWMDecor hints parses the decoration information in the MOTIF_WM_HINTS # property, and removes these decoratons from the window. This does not affect # the functions that can be performed via the menus. MWMDecorHints # These are affect minor aspects for the look-and-feel. # Sub-menus placement mwm-style? MWMMenus # mwm-style border reliefs (less deep than default fvwm) ? MWMBorders # Maximize button does mwm-inversion thingy MWMButtons ######################## MISCELLANEOUS STUFF ####################### # If you don't like the default 150 msec click delay for the complex functions # change this and uncomment it. #ClickTime 150 # OpaqueMove has a number (N) attached to it (default 5). # if the window occupies less than N% of the screen, # then opaque move is used. 0 <= N <= 100 OpaqueMove 30 # flip by whole pages on the edge of the screen. EdgeScroll 100 100 # A modest delay before flipping pages seems to be nice... # I thresh in a 50 pixel Move-resistance too, just so people # can try it out. EdgeResistance 250 50 ######################## WINDOW PLACEMENT ####################### # RandomPlacement prevents user interaction while placing windows: # RandomPlacement # SmartPlacement makes new windows pop-up in blank regions of screen # if possible, or falls back to random or interactive placement. SmartPlacement # With SmartPlacement, windows will normally place themselves over icons. # Uncomment this to change that. StubbornPlacement # NoPPosition instructs fvwm to ignore the PPosition field in window # geometry hints. Emacs annoyingly sets PPosition to (0,0)! NoPPosition ######################## DECORATIONS ####################### # If you want decorated transient windows, uncomment this: DecorateTransients ########################################################################### # Set up the virtual desktop and pager #set the desk top size in units of physical screen size widthxheight DeskTopSize 3x3 # and the reduction scale used for the panner/pager DeskTopScale 32 ### how can i change the orientation of the different desktops..? # Use the Fvwm Pager ## Pager -1 -1 ########################################################################## # Module path and paths to the icons # # ModulePath is a colon-separated list, just like regular unix PATH ModulePath /usr/local/lib/X11/fvwm:/usr/lib/X11/fvwm:/usr/local/lib/fvwm/modules PixmapPath /usr/local/include/X11/pixmaps:/usr/include/X11/pixmaps:/usr/lib/X11/pixmaps:/usr/local/lib/fvwm/pixmaps IconPath /usr/local/include/X11/bitmaps:/usr/include/X11/bitmaps:/usr/lib/X11/bitmaps ############################################################################ # Set the decoration styles and window options # Order is important!!!! # If compatible styles are set for a single window in multiple Style # commands, then the styles are ORed together. If conflicting styles # are set, the last one specified is used. # These commands should command before any menus or functions are defined, # and before the internal pager is started. # change the default width. Style "*" BorderWidth 5, HandleWidth 5, Color Black/#d3d3d3,Icon unknown1.xpm #Style "Fvwm*" NoTitle, NoHandles, Sticky, WindowListSkip,BorderWidth 0 Style "Fvwm Pager" StaysOnTop, Icon, NoTitle, Sticky, WindowListSkip, NoHandles Style "FvwmPager" StaysOnTop, Icon, NoTitle, Sticky, WindowListSkip, NoHandles Style "FvwmBanner" StaysOnTop Style "GoodStuff" NoTitle, NoHandles, Sticky, StaysOnTop, WindowListSkip, BorderWidth 0 Style "Swxcrmgr" Title Style "*lock" NoTitle, Sticky, WindowListSkip Style "*load" NoTitle, Sticky, WindowListSkip Style "jvgrab*" NoTitle, NoHandles, Sticky, WindowListSkip Style "xbiff" NoTitle, Sticky, WindowListSkip Style "faces" NoTitle, NoHandles, Sticky, WindowListSkip Style "xhtalk" NoTitle, NoHandles, Sticky, WindowListSkip Style "login" NoTitle, Sticky, WindowListSkip Style "xconsole" NoTitle, Sticky, WindowListSkip Style "dxsession" NoTitle, Sticky, WindowListSkip Style "rxvt" Icon term.xpm Style "xterm" Icon xterm.xpm, Color black/grey Style "Appointment" Icon datebook.xpm, NoButton 2, NoButton 4 Style "xcalc" Icon xcalc.xpm, NoButton 2 Style "xbiff" Icon mail1.xpm, NoButton 2 Style "*xmh" Icon mail1.xpm, NoButton 2 Style "xman" Icon xman.xpm Style "xvgr" Icon graphs.xpm Style "matlab" Icon math4.xpm Style "xmag" Icon mag_glass.xpm Style "xgraph" Icon graphs.xpm Style "GoodStuff" Icon toolbox.xpm Style "Emacs" Icon edit.xpm Style "Xteddy" NoTitle, WindowListSkip Style "xeyes" NoTitle, Sticky, WindowListSkip Style "Swxcrmgr" BorderWidth 5, HandleWidth 5, Icon unknown1.xpm # Change the Maximize and iconify buttons to up and down triangles. # I prefer MWM style minimize and maximize buttons #ButtonStyle : 2 4 50x35@1 65x65@0 35x65@0 50x35@1 #ButtonStyle : 4 4 50x65@1 35x35@1 65x35@1 50x65@0 ButtonStyle 2 50x50 ButtonStyle 4 22x22 ############################################################################# # Stuff to do at start-up Function "InitFunction" Exec "I" xsetroot -solid "slategrey" ifdef(`COLOR',`Exec "I" xsetroot -solid "slategrey"') # Module "I" GoodStuff # the following defines how many Desktops are in the pager: # Module "I" FvwmPager 0 1 Module "I" FvwmPager 0 # disable paging by default as this might confuse newbies :-) TogglePage "I" EndFunction Function "RestartFunction" # Module "I" GoodStuff # the following defines how many Desktops are in the pager: # Module "I" FvwmPager 0 1 Module "I" FvwmPager 0 EndFunction ############################################################################ # Now define some handy complex functions # This one moves and then raises the window if you drag the mouse, # only raises the window if you click, or does a RaiseLower if you double # click Function "Move-or-Raise" Move "Motion" Raise "Motion" Raise "Click" RaiseLower "DoubleClick" EndFunction # This one maximizes vertically if you click (leaving room for the GoodStuff bar at the # bottom, or does a full maximization if you double click, or a true full vertical # maximization if you just hold the mouse button down. Function "maximize_func" Maximize "Motion" 0 100 Maximize "Click" 0 80 Maximize "DoubleClick" 100 100 EndFunction # This one moves and then lowers the window if you drag the mouse, # only lowers the window if you click, or does a RaiseLower if you double # click Function "Move-or-Lower" Move "Motion" Lower "Motion" Lower "Click" RaiseLower "DoubleClick" EndFunction # This one moves or (de)iconifies: Function "Move-or-Iconify" Move "Motion" Iconify "DoubleClick" EndFunction # This one resizes and then raises the window if you drag the mouse, # only raises the window if you click, or does a RaiseLower if you double # click Function "Resize-or-Raise" Resize "Motion" Raise "Motion" Raise "Click" RaiseLower "DoubleClick" EndFunction # This is provided as a hint only. # Move to a known page on the desktop, then start an application in a # known location. Could also switch to a known desktop, I guess #Function "abs_coord" # GoToPage "Immediate" 1,1 # Exec "Immediate" exec xcalc -geometry +100+100& #EndFunction ############################################################################## #now define the menus - defer bindings until later # This menu is invoked as a sub-menu - it allows you to quit, # restart, or switch to another WM. Popup "Quit-Verify" Title "Really Quit Fvwm?" Quit "Yes, Really Quit" Restart "Restart Fvwm" fvwm Restart "Start twm" twm Restart "Start tvtwm" tvtwm Restart "Start mwm" mwm Restart "Start olwm" /usr/openwin/bin/olwm Nop "" Nop "No, Don't Quit" EndPopup # Provides a list of modules to fire off Popup "Module-Popup" Title "Modules" Module "GoodStuff" GoodStuff Module "Clean-Up" FvwmClean Module "Identify" FvwmIdent Module "SaveDesktop" FvwmSave Module "Debug" FvwmDebug # Module "Pager" FvwmPager 0 2 Module "FvwmWinList" FvwmWinList EndPopup # This menu will allow telnet to any machine in my menus Popup "Machines" # Title "Machines" Exec "islay" exec xterm -title islay -e rlogin islay Exec "drpepper" exec xterm -title drpepper -e rlogin drpepper Exec "fetch" exec xterm -title fetch -e rlogin fetch Exec "AKA / glacier" exec xterm -title "AKA / glacier" -e rlogin glacier Exec "gaston" exec xterm -title Gaston -e rlogin gaston Exec "cvsserver" exec xterm -title cvsserver -e rlogin cvsserver Exec "cvs WWW" exec xterm -title "cvs WWW" -e rlogin cvs Exec "Destroyer" exec xterm -title destroyer -e rlogin destroyer Exec "DeathStar" exec xterm -title deathstar -e rlogin deathstar nop "---Build Machines:---" Exec "Solaris 2.7 / opapayas" exec xterm -title "Solaris 2.7 / opapayas" -e rlogin opapayas Exec "Solaris 2.6 / puerco" exec xterm -title "Solaris 2.6 / puerco" -e rlogin puerco Exec "Solaris 2.5.1 / plating" exec xterm -title "Solaris 2.5.1 / plating" -e rlogin plating Exec "HP/UX 10.10 / russia" exec xterm -title "HP/UX 10.10 / russia" -e rlogin russia Exec "HP/UX 11.00 / smarch" exec xterm -title "HP/UX 11.00 / smarch" -e rlogin smarch Exec "DEC/OSF 4.0 / utrecht" exec xterm -title "DEC/OSF 4.0 / utrecht" -e rlogin utrecht Exec "DEC/OSF 4.0 / trex" exec xterm -title "DEC/OSF 4.0 / trex" -e rlogin trex Exec "IRIX 5.3 /pjglet" exec xterm -title "IRIX 5.3 / pjglet" -e rlogin pjglet Exec "IRIX 6.2 / suppenschwein" exec xterm -title "IRIX 6.2 / suppenschwein" -e rlogin suppenschwein Exec "IRIX 6.5 / vertigo" exec xterm -title "IRIX 6.5 / vertigo" -e rlogin vertigo Exec "LINUX 2.2.5" exec xterm -title "LINUX 2.2.5 / shabadoo" -e rlogin shabadoo Exec "LINUX 2.0.36 ??" exec xterm -title "LINUX 2.2.5 / shabadoo" -e rlogin shabadoo Exec "AIX 4.1 / sweetcan" exec xterm -title "AIX 4.1 / sweetcan" -e rlogin sweetcan Exec "AIX 4.2 / itchy" exec xterm -title "AIX 4.2 / itchy" -e rlogin itchy EndPopup PopUp "Editors" Title "Editors" Exec "Emacs 9x15" exec emacs -fn 9x15 & Exec "Emacs 8x13" exec emacs -fn 8x13 & Exec "Emacs 7x13" exec emacs -fn 7x13 & Exec "Emacs 6x13" exec emacs -fn 6x13 & Exec "Emacs 5x7" exec emacs -fn 5x7 & Exec "Emacs default" exec emacs & Exec "Lucid Emacs 19" exec xemacs & Exec "GNU Emacs 19" exec emacs-19.29 & # Exec "aXe" exec axe & # Exec "Jed" exec xjed & # Exec "Crisp" exec xcr & Exec "XEdit" exec xedit & # Exec "Joe" exec xterm -e joe & # Exec "ez" exec /usr/andrew/bin/ez & Exec "vi" exec xterm -e vi & EndPopup ############################################################### # This menu will fire up some very common utilities # # Main Menu for left mousebutton on root!!! # # Popup "Utilities" Title "Utilities" Exec "Xterm" exec xterm -e tcsh & Exec "Xlock" exec xlock -mode blank -enablesaver & Exec "Netscape" exec /tools/ns/bin/nova & Popup "Editors" Editors Popup "Login to.." Machines Nop "" Popup "Modules" Module-Popup Nop "" Popup "Exit Fvwm" Quit-Verify EndPopup # This defines the most common window operations Popup "Window Ops" Title "Window Ops" Function "Move" Move-or-Raise Function "Resize" Resize-or-Raise Raise "Raise" Lower "Lower" Iconify "(De)Iconify" Stick "(Un)Stick" Function "(Un)Maximize" maximize_func Nop "" Destroy "Destroy" Close "Close" Nop "" Refresh "Refresh Screen" EndPopup # A trimmed down version of "Window Ops", good for binding to decorations Popup "Window Ops2" Function "Move" Move-or-Raise Function "Resize" Resize-or-Raise Raise "Raise" Lower "Lower" Iconify "Iconify" Stick "(Un)Stick" Nop "" Destroy "Destroy" Close "Close" Nop "" Module "ScrollBar" FvwmScroll 2 2 EndPopup ############################################################################# # 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 # 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" # Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise Mouse 1 T A Function "Move-or-Raise" #Button 2 resizes window if clicked in the resize border Mouse 2 SF A Function "Resize-or-Raise" #Button 2 moves window if clicked in the title sides or icon Mouse 2 T A Function "Move-or-Raise" # Button 1 raises window if clicked anywhere, but eats mouse clicks :-( #Mouse 1 W A Raise # Button 1 resizes window if clicked in the resize border Mouse 1 S A Function "Resize-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 anywhere in the decoration (except the title-bar buttons) # does the Windowops Menu Mouse 3 TSIF A PopUp "Window Ops" # Button 3 in the window, with the Modifier-1 keyOB (usually alt or diamond) # gives Raise-Lower. Used to use control here, but that interferes with xterm #Mouse 3 W M RaiseLower Mouse 1 A M RaiseLower Mouse 2 A M Resize Mouse 3 A M Move Mouse 1 A MS Iconify Mouse 3 A MS PopUp "Window Ops" ############################################################################ # Now some keyboard shortcuts. # Help Key raises/lowers current window Key Help A A RaiseLower Key F1 A A RaiseLower Key Front A A RaiseLower vvKey F12 A A exec /usr/openwin/bin/xlock -mode blank -nice 19 & Key Pause A A exec /usr/openwin/bin/xlock -mode blank -nice 19 & Key SunPowerSwitch A A Exec "" exec "/usr/openwin/bin/xlock -mode blank -nice 19 &" # Arrow Keys # press arrow + control anywhere, and scroll by 1 page Key Left A M Scroll -100 0 Key Right A M Scroll +100 +0 Key Up A M Scroll +0 -100 Key Down A M Scroll +0 +100 # press arrow + alt key, and scroll by 1/10 of a page #Key Left A S4 Scroll -10 +0 #Key Right A S4 Scroll +10 +0 #Key Up A S4 Scroll +0 -10 #Key Down A S4 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 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 #Window Keys like the ones I used with MWM! Key F1 A A RaiseLower Key F2 A A Lower Key F3 W M Lower Key F4 W M Iconify Key Menu A A Iconify # Key Pause A A Iconify # Key F12 A A Iconify # Key F20 A A Destroy #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 ############################################################################ ############################################################################ #Definitions used by the modules ###################### GoodStuff button-bar ################################ # Colors *GoodStuffFore Black *GoodStuffBack #d3d3d3 # Font *GoodStuffFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* # Geometry - really likes to pick its own size, but giving a position is OK *GoodStuffGeometry +0-1 # Layout: specify rows or columns, not both *GoodStuffRows 1 # Define the buttons to use..... #*GoodStuff Kill rbomb.xpm Destroy *GoodStuff Xterm rterm.xpm Exec "" exec xterm & *GoodStuff KA rterm.xpm Popup "GermanyMenu" *GoodStuff Window dialog_box.xpm PopUp "Window Ops" *GoodStuff Lock xlock.xpm Exec "" exec dxpause & *GoodStuff Xcalc rcalc.xpm Exec "Calculator" xcalc & #*GoodStuff HMan question.xpm Exec "hman" exec hman & *GoodStuff Mail mail2.xpm Exec "Mail" exec exmh & *GoodStuff Calendar datebook.xpm Exec "Calendar" exec ical & #*GoodStuff News clipboard.xpm Exec "xrn" exec xrn & *GoodStuff WWW Mosaic.xpm Exec "netscape" exec netscape -ncols 64 http://www.is.cs.cmu.edu/ & *GoodStuff Xarchie map.xpm Exec "xarchie" exec xarchie & *GoodStuff Paging clamp.xpm TogglePage *GoodStuff - clock.xpm Swallow "oclock" oclock -bg "#d3d3d3" -geometry -1500-1500 -padding 0 *GoodStuff - whatever Swallow "xload" xload -bg "#d3d3d3" -geometry -1500-1500 -label xload #*GoodStuff(4x1) - whatever SwallowModule "FvwmPager" FvwmPager 0 2 ######################### No Clutter ######################################## # I only wrote NoClutter as a simple test case, but maybe some big sites like # universities really have usage problems (too many open windows).... # Time delays are in seconds. *FvwmNoClutter 3600 Iconify 1 *FvwmNoClutter 86400 Delete *FvwmNoCLutter 172800 Destroy ########################## Window-Identifier ############################### # Just choose colors and a fonts *FvwmIdentBack #d3d3d3 *FvwmIdentFore Black *FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* ########################### Pager ######################################### *FvwmPagerBack #d3d3d3 *FvwmPagerFore Black *FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* *FvwmPagerHilight #cab3ca *FvwmPagerGeometry -1-1 *FvwmPagerLabel 0 # *FvwmPagerLabel 1 Tools # *FvwmPagerLabel 2 CVS *FvwmPagerSmallFont 5x8 ##########################FvwmWinList################################## *FvwmWinListBack #d3d3d3 *FvwmWinListFore Black *FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* *FvwmWinListAction Click1 Iconify -1,Focus *FvwmWinListAction Click2 Iconify *FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent *FvwmWinListUseSkipList *FvwmWinListGeometry +0-1