# This file is copied to a new user's FVWM_USERDIR by FvwmForm-Setup form. # This file contains the commands fvwm reads while starting. # # # This is based initally on Fvwm-1.x -- not pretty in terms of configuration # options. Hopefully, I'll clean this up a bit.... # # Changelog # --------- # # 2004-06-22 -- Added More comments. # -- Defined Functions for FvwmEvent to add different title styles # for sticky windows. # -- Minor changes to otherwise deprecated configuration issues. # # # 2004-06-21 -- Defined Decor # -- Added definition to WindowShade for Mouse bindings # # # 2004-06-20 -- Added Comments. # -- Cleaned up Syntax. # -- Added ColorSet definitions for menus and windows # #ImagePath sets the location for pixmaps -- it's where Fvwm is going to look # first off ImagePath /home/heather/.fvwm/icons/:+ # ModulePath because otherwise some modules don't want to load. :/ ModulePath /usr/lib/fvwm/2.5.10/ # EdgeResistance dictates the threshold level that is used when moving windows # between pages. EdgeResistance 250 10 # EdgeScroll is the setting that sets the level that for moving between pages # with the mouse when it hits the edge of the screen. EdgeScroll 100 100 # Fvwm uses a default ClickTime of 150ms, which is way too short for me. # A Click that lasts <= ClickTime is considered a `Click` in functions, # > ClickTime is a `Hold`. # Remember that if you have a function that has actions on Click (C) and # DoubleClick (D), fvwm will have to wait at least this long so it can tell which # action you are trying to make. ClickTime 750 # This sets the number of pages within a desk -- hence FvwmPager DeskTopSize 4x2 # Set the names of the desks. Originally this was used in FvwmPager: # # *FvwmPager: Label # # But this has been deprecated since Fvwm version 2.3.8 # So we'll now use the proper command "DesktopName " DesktopName 0 Ops DesktopName 1 Eng DesktopName 2 Cmd DesktopName 3 Sci # EmulateFvwm is probably a good thing. If you want MWM behaviour (so that, # for example, the geometry panel is in the centre and not the top-left then # change this to 'Emulate MWM'.... This affects windows and menu behaviour in # general. Emulate Fvwm # Colorsets make the old way of specifying colour defunct. They're much more # flexible and controllable. # ColorSet 0 for menus ColorSet 0 fg SteelBlue1, bg rgb:0000/0000/3333 # ColorSet 1 for in-Active windows ColorSet 1 fg white, bg rgb:0000/2222/6666 #ColorSet 2 for Active windows ColorSet 2 fg grey40, bg black # Probably a good thing to emulate MWM-style menuus..... MenuStyle MWM MenuStyle * MenuColorSet 0, Greyed grey40 MenuStyle * Font -adobe-times-bold-r-*-*-14-*-*-*-*-*-*-* # This is better than FollowsFocus - doesn't hog the X server. ColormapFocus FollowsMouse # Decors - this style of config will be deprecated come Fvwm3, but that's a # while off yet, so we'll use it. Window title buttons are numbered like this: # # +=========================================================================+ # |1 3 5 7 9 Title 0 8 6 4 2| # |-------------------------------------------------------------------------| # | | # | | # # "Active" in the context of decors, means the window that currently has the # focus. # # "Inactive" in the context of decors, means the window that has lost or does # not have focus. This bears no direct relation to *how* the window receives # focus, be it by SloppyFocus, or FPClickRaises, etc.... AddToDecor NormalDecor + BorderStyle Simple + TitleStyle -- Raised + ButtonStyle Reset + ButtonStyle All -- Raised + ButtonStyle 1 Active Pixmap mini.fvwm.xpm + ButtonStyle 1 Inactive Vector 5 25x40@1 25x60@1 75x60@0 75x40@0 25x40@1 + ButtonStyle 3 Active Pixmap mini-go.xpm + ButtonStyle 3 Inactive Vector 3 60x20@0 60x40@0 80x40@1 80x60@0 60x60@0 60x80@0 40x80@0 40x60@1 20x60@0 20x40@1 40x40@1 40x20@1 60x20@1 + ButtonStyle 6 Active Pixmap mini-rball.xpm + ButtonStyle 6 Inactive Vector 5 40x40@1 60x40@1 60x60@0 40x60@0 40x40@1 + ButtonStyle 4 Active Pixmap mini-iconify.xpm + ButtonStyle 4 InActive Vector 5 25x25@1 25x75@1 75x75@0 75x25@0 25x25@1 + ButtonStyle 2 Active Pixmap mini-x.xpm + ButtonStyle 2 InActive Vector 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1 # Again, see notes for the above decor. I am sure there is probably an easier # way than this, but this decor is used for when a window is made "Sticky", # hence WindowButton 3 becomes a pixmap regardless of [In]Active focus. AddToDecor StickyDecor + BorderStyle Simple + TitleStyle -- Raised + ButtonStyle Reset + ButtonStyle All -- Raised + ButtonStyle 1 Active Pixmap mini.fvwm.xpm + ButtonStyle 1 Inactive Vector 5 25x40@1 25x60@1 75x60@0 75x40@0 25x40@1 + ButtonStyle 3 Active Pixmap mini-icons.xpm + ButtonStyle 3 InActive Pixmap mini-icons.xpm + ButtonStyle 6 Active Pixmap mini-rball.xpm + ButtonStyle 6 Inactive Vector 5 40x40@1 60x40@1 60x60@0 40x60@0 40x40@1 + ButtonStyle 4 Active Pixmap mini-iconify.xpm + ButtonStyle 4 InActive Vector 5 25x25@1 25x75@1 75x75@0 75x25@0 25x25@1 + ButtonStyle 2 Active Pixmap mini-x.xpm + ButtonStyle 2 InActive Vector 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1 # default Styles: # This sets the default Decor for *all* windows. If it has to change, it does # so later by means of FvwmEvent. Style * UseDecor NormalDecor Style * Button 1, Button 3, Button 2, Button 4, Button 6 Style * Font -adobe-times-bold-r-*-*-12-*-*-*-*-*-*-* Style * IconFont -adobe-times-bold-r-*-*-12-*-*-*-*-*-*-* Style * Colorset 2 Style * HilightColorSet 1 #Style * HilightFore white, HilightBack rgb:0000/2222/6666 Style * BorderWidth 5, HandleWidth 5 Style * Icon unknown1.xpm, Color Grey40/black Style * MWMFunctions, MWMDecor, HintOverride Style * DecorateTransient, NoPPosition Style * IconBox 0 -10 -280 -1 Style * FocusFollowsMouse Style * TileCascadePlacement # Styles for various Fvwm modules: Style Fvwm* NoTitle, Sticky, WindowListSkip Style Fvwm* BorderWidth 2, CirculateSkipIcon, CirculateSkip # Since FvwmPager is swallowed by FvwmButtons, this can be ignored. #Style FvwmPager StaysOnTop Style FvwmButtons Icon toolbox.xpm, ClickToFocus # Styles for your common terminal emulator programs. # xterms and rxvts in a separate icon box: Style XTerm Icon xterm.xpm, SloppyFocus, IconBox -70 1 -1 -140 Style rxvt Icon term.xpm, SloppyFocus, IconBox -70 1 -1 -140 Style rxvt MWMBorder, MWMButtons # Styles for various common programs: Style *lock !Title, !Handles, Sticky, WindowListSkip, ClickToFocus Style xbiff !Title, Sticky, WindowListSkip, ClickToFocus Style xcalc Icon xcalc.xpm, !Button 2,ClickToFocus Style xmh Icon mail1.xpm, !IconTitle,StickyIcon Style xmh !Button 2 Style xman Icon xman.xpm, ClickToFocus Style xmag Icon mag_glass.xpm, ClickToFocus Style xgraph Icon graphs.xpm, ClickToFocus Style xmosaic Color NavyBlue/grey90, ClickToFocus # some simple default key bindings: Key Next A SCM Next * Focus Key Prior A SCM Prev * Focus # Now is a good point to show where things are with respect to window # locations... # # Binding Functions: # # "I" stands for Immediate # "M" stands for Motion # "C" stands for Click # "H" stands for Hold # "D" stands for Double Click # --------------------------------------------------------------------------- # Contexts: # R = Root Window rrrrrrrrrrrrrrrrrrrrrr # W = Application Window rIrrrrFSSSSSSSSSFrrrrr # F = Frame Corners rrrrrrS13TTTT642Srrrrr # S = Frame Sides rIrrrrSwwwwwwwwwSrrrrr # T = Title Bar rrrrrrSwwwwwwwwwSrrrrr # I = Icon rIrrrrFSSSSSSSSSFrrrrr # rrrrrrrrrrrrrrrrrrrrrr # # Modifiers: (A)ny, (C)ontrol, (S)hift, (M)eta, (N)othing # --------------------------------------------------------------------------- # Heather's paging keys # # cursor combinations for paging # Key Left A SM Scroll -100 +0 Key Right A SM Scroll +100 +0 Key Up A SM Scroll +0 -100 Key Down A SM Scroll +0 +100 # --------------------------------------------------------------------------- # some simple default mouse bindings: # for the root window: Mouse 1 R A Menu MenuFvwmRoot Nop Mouse 2 R A Menu MenuFvwmWindowOps Nop Mouse 3 R A WindowList # for the title bar buttons: Mouse 0 1 A Menu MenuFvwmWindowOps2 Close Mouse 0 6 A Iconify # This button, when clicked triggers a Sticky action (see notes on FvwmEvent). Mouse 0 3 A Stick Mouse 0 4 A FuncFvwmMaximize Mouse 0 2 A Close # for other parts of the window/borders/icons: Mouse 1 FS A FuncFvwmResizeOrRaise Mouse 1 T A FuncFvwmMoveOrRaise Mouse 1 I A FuncFvwmMoveOrIconify Mouse 2 I A Iconify Mouse 2 FST A Menu MenuFvwmWindowOps2 Mouse 3 TSIF A RaiseLower ######################## Initialization Functions ############################ # This is run whenever Fvwm is started. In this instance the module "FvwmEvent" # is loaded, with the module alias "FvwmEvent-Sticky" being used. In this # manner, one can specify as many FvwmEvent type configs as desired, without # them infringing on one another. # # Also, "InitFunction can now be considered deprecated. You can use "Test # (Init)" which returns true when init is first issued, hence the bg will be # set. False otherwise, but that matters not then anyway. AddToFunc StartFunction + I Test (init) Exec exec fvwm-root /home/heather/.fvwn/stars16a.xpm + I Module FvwmEvent FvwmEvent-Sticky + I Module FvwmAnimate + I Module FvwmButtons # This is now deprecated.... (see above) #AddToFunc InitFunction #+ I exec xsetbg /usr/share/wallpapers/ravensclaw-stars.gif # For some SM-s (like gnome-session) there is an internal background setter. #AddToFunc SessionInitFunction #+ I Nop ######################## Menus ################### Read /etc/X11/fvwm/menudefs.hook Quiet Read menudefs.hook Quiet Read main-menu.heather Quiet DestroyMenu MenuFvwmRoot AddToMenu MenuFvwmRoot "$[gt.Root Menu]" Title + "" Nop + "&H. Heather's Favorites" Popup "/Heather" + "&D. Debian Menu" Popup "/Debian" + "" Nop + "&1. XTerm" Exec exec xterm + "&2. Rxvt" Exec exec rxvt + "&R. $[gt.Remote Logins]" Popup MenuFvwmLogins + "&U. $[gt.Utilities]" Popup MenuFvwmUtilities + "" Nop + "&F. $[gt.Fvwm Bits]" Popup MenuFvwmBits DestroyMenu MenuFvwmBits AddToMenu MenuFvwmBits "FVWM Bits" Title + "&R. $[gt.Restart]" Restart + "" Nop + "&M. $[gt.Fvwm Modules]" Popup MenuFvwmModules + "&W. $[gt.Fvwm Window Ops]" Popup MenuFvwmWindowOps + "&S. $[gt.Fvwm Config Ops]" Popup MenuFvwmConfig + "" Nop + "&F. $[gt.Refresh Screen]" Refresh + "&C. $[gt.Recapture Screen]" Recapture + "" Nop + "&X. $[gt.Exit Fvwm]" Popup MenuFvwmQuitVerify DestroyMenu MenuFvwmUtilities AddToMenu MenuFvwmUtilities "$[gt.Utilities]" Title + "&T. Top" Exec exec xterm -T Top -n Top -e top + "&C. Calculator" Exec exec xcalc + "&M. Xman" Exec exec xman + "&G. Xmag" Exec exec xmag + "&R. Editres" Exec exec editres + "" Nop + "&E. XEmacs" Exec exec xemacs + "&A. Xmh Mail" FuncFvwmMailXmh xmh "-font fixed" + "" Nop + "&L. XLock" Exec exec xlock -mode random + "" Nop + "&D. $[gt.Reset X defaults]" Exec xrdb -load $HOME/.Xdefaults DestroyMenu MenuFvwmConfig AddToMenu MenuFvwmConfig "$[gt.Fvwm Config Ops]" Title + "&S. $[gt.Sloppy Focus]" FuncFvwmFocusPolicyChange SloppyFocus + "&C. $[gt.Click To Focus]" FuncFvwmFocusPolicyChange ClickToFocus + "&F. $[gt.Focus Follows Mouse]" FuncFvwmFocusPolicyChange FocusFollowsMouse + "" Nop + "&1. $[gt.Colormap Follows Mouse]" ColormapFocus FollowsMouse + "&2. $[gt.Colormap Follows Focus]" ColormapFocus FollowsFocus + "" Nop + "&3. $[gt.Full Paging ON]" EdgeScroll 100 100 + "&4. $[gt.All Paging OFF]" EdgeScroll 0 0 + "&5. $[gt.Horizontal Paging Only]" EdgeScroll 100 0 + "&6. $[gt.Vertical Paging Only]" EdgeScroll 0 100 + "&7. $[gt.Partial Paging]" EdgeScroll 50 50 + "&8. $[gt.Full Paging && Edge Wrap]" EdgeScroll 100000 100000 # The window Ops menus exhibit a different HotKey style. # There are 2 versions of the WindowOps Menu, meant to be bound to different # things. Here is the "common" part: DestroyFunc FuncFvwmWindowCommon AddToFunc FuncFvwmWindowCommon + I AddToMenu $0 "$[gt.&Move]" Move + I AddToMenu $0 "$[gt.&Resize]" Resize + I AddToMenu $0 "$[gt.R&aise]" Raise + I AddToMenu $0 "$[gt.&Lower]" Lower + I AddToMenu $0 "$[gt.(De)&Iconify]" Iconify + I AddToMenu $0 "$[gt.(Un)&Stick]" Stick + I AddToMenu $0 "$[gt.(Un)Ma&ximize]" Maximize + I AddToMenu $0 "$[gt.&Identify]" Module FvwmIdent + I AddToMenu $0 "" Nop + I AddToMenu $0 "$[gt.&Delete]" Delete + I AddToMenu $0 "$[gt.&Close]" Close + I AddToMenu $0 "$[gt.Destroy]" Destroy + I AddToMenu $0 "" Nop # First windowops menu, bound to: # mouse 2 on root # Root menu DestroyMenu MenuFvwmWindowOps AddToMenu MenuFvwmWindowOps "$[gt.Window Ops]" Title FuncFvwmWindowCommon MenuFvwmWindowOps + "$[gt.Re&fresh Window]" RefreshWindow # Second windowops menu, bound to: # any mouse on titlebar button 1 # mouse 2 on frame, side or titlebar DestroyMenu MenuFvwmWindowOps2 AddToMenu MenuFvwmWindowOps2 FuncFvwmWindowCommon MenuFvwmWindowOps2 + Scroll&Bar Module FvwmScroll 2 2 + "&$[gt.Print]" FuncFvwmPrint + "$[gt.Print Re&verse]" FuncFvwmPrintReverse # 3 different ways to log on, take your pick: DestroyFunc FuncFvwmRloginXterm AddToFunc FuncFvwmRloginXterm + I Exec xterm -name $0 -title "$USER @ $0" -e ssh $0 DestroyFunc FuncFvwmRloginRxvt AddToFunc FuncFvwmRloginRxvt + I Exec rxvt -name $0 -n $0 -title $USER@$0 -e ssh $0 DestroyFunc FuncFvwmRloginRshRxvt AddToFunc FuncFvwmRloginRshRxvt + I Exec Exec ssh $0 rxvt -display $HOSTDISPLAY # be sure to fill these in with your correct machine names: DestroyMenu MenuFvwmLogins AddToMenu MenuFvwmLogins + &horizon FuncFvwmRloginXterm www.horizonpr.com + &baylisa FuncFvwmRloginXterm www.baylisa.org + s&ignal Exec rxterm signal DestroyMenu MenuFvwmModules AddToMenu MenuFvwmModules "$[gt.Fvwm Modules]" Title + "&1. $[gt.Control Animation]" Popup MenuFvwmAnimate + "&B. Button-Bar" Module FvwmButtons + "&O. IconBox" FuncFvwmConfigureIconBox + "&F. Forms" Popup MenuFvwmForms + "&I. Identify" Module FvwmIdent + "&M. IconMan" Module FvwmIconMan + "&N. Banner" Module FvwmBanner + "&C. Console" Module FvwmConsole + "&P. Pager" Module FvwmPager 0 0 + "&2. Pager (2 $[gt.desks])" Module FvwmPager 0 1 + "&R. Backer" Module FvwmBacker + "&S. ScrollBar" Module FvwmScroll 50 50 + "&T. FvwmTaskBar" Module FvwmTaskBar + "&U. AutoRaise" Module FvwmAuto 200 Raise Nop + "&W. WinList" Module FvwmWinList + "&X. $[gt.Stop Module Menu]" Popup MenuFvwmStopModule DestroyMenu MenuFvwmStopModule AddToMenu MenuFvwmStopModule "$[gt.Stop Fvwm Modules]" Title + "&B. $[gt.Stop] Button-Bar" KillModule FvwmButtons + "&O. $[gt.Stop] IconBox" KillModule FvwmIconBox + "&M. $[gt.Stop] IconMan" KillModule FvwmIconMan + "&P. $[gt.Stop] Pager" KillModule FvwmPager + "&R. $[gt.Stop] Backer" KillModule FvwmBacker + "&S. $[gt.Stop] ScrollBar" KillModule FvwmScroll + "&T. $[gt.Stop] FvwmTaskBar" KillModule FvwmTaskBar + "&U. $[gt.Stop] AutoRaise" KillModule FvwmAuto + "&W. $[gt.Stop] WinList" KillModule FvwmWinList DestroyMenu MenuFvwmForms AddToMenu MenuFvwmForms + "&C. Capture" Module FvwmForm FvwmForm-Capture + "&D. Form Defaults" Module FvwmForm FvwmForm-Form + "&R. Rlogin" Module FvwmForm FvwmForm-Rlogin + "&P. RootCursor" Module FvwmForm FvwmForm-RootCursor + "&S. Setup" Module FvwmForm FvwmForm-Setup + "&T. Talk Form" Module FvwmForm FvwmForm-Talk + "&Q. QuitVerify" Module FvwmForm FvwmForm-QuitVerify # Configure and start using an iconbox on the fly DestroyFunc FuncFvwmConfigureIconBox AddToFunc FuncFvwmConfigureIconBox + I Module FvwmIconBox + I Style * NoIcon DestroyMenu MenuFvwmQuitVerify AddToMenu MenuFvwmQuitVerify "$[gt.Really Quit Fvwm?]" Title + "&Q. $[gt.Yes, Really Quit]" Quit + "" Nop + "&T. $[gt.Start] twm" Restart twm + "&C. $[gt.Start] ctwm" Restart ctwm + "&2. $[gt.Start] tvtwm" Restart tvtwm + "&V. $[gt.Start] vtwm" Restart vtwm + "&M. $[gt.Start] mwm" Restart mwm + "&O. $[gt.Start] olwm" Restart /usr/openwin/bin/olwm + "" Nop + "&X. $[gt.Just an Xterm]" Restart xterm -n '"X Console"' -T '"X Console"' + "" Nop + "&N. $[gt.No, Don't Quit]" Nop ######################## Sample Functions ########################## DestroyFunc FuncFvwmMailXmh AddToFunc FuncFvwmMailXmh + I Next $0 Iconify false + I Next $0 Focus + I None $0 Exec $0 $1 DestroyFunc FuncFvwmMoveOrRaise AddToFunc FuncFvwmMoveOrRaise + I Raise + M Move + H Move + D WindowShade DestroyFunc FuncFvwmMaximize AddToFunc FuncFvwmMaximize + M Maximize 0 100 + H Maximize 0 100 + C Maximize 0 80 + D Maximize 100 100 DestroyFunc FuncFvwmMoveOrIconify AddToFunc FuncFvwmMoveOrIconify + I Raise + M Move + D Iconify DestroyFunc FuncFvwmResizeOrRaise AddToFunc FuncFvwmResizeOrRaise + I Raise + M Resize + D Lower DestroyFunc FuncFvwmPrint AddToFunc FuncFvwmPrint + I Raise + I Exec xdpr -id $w DestroyFunc FuncFvwmPrintReverse AddToFunc FuncFvwmPrintReverse + I Raise + I Exec xdpr 1/2 -h -rv -id $w DestroyFunc FuncFvwmFocusPolicyChange AddToFunc FuncFvwmFocusPolicyChange + I Style * $0 + I Recapture # This function gets called when a window is made Sticky. # "ThisWindow" is used in the context of the current operand window (so, in # otherwords, it's the window you clicked the button for 'sticky'). # # This does two things, it checks to see if the current window is sticky - if # it is, it changes the style ("WindowStyle" operates on the current window) # to the desired style. # # It then checks to see if the window is _not_ sticky -- in which case if this # is true then the style is reset back to the normal decor. DestroyFunc FvwmToggleStickyPixmap AddToFunc FvwmToggleStickyPixmap + I ThisWindow (sticky) WindowStyle UseDecor StickyDecor + I ThisWindow (!sticky) WindowStyle UseDecor NormalDecor # Module config for FvwmEvent... # FvwmEvent is _extremely_ useful. You can bind almost any action a window can # do in some form -- and those actions you cannot bind directly (such as as to # test when a window is sticky or not), you can do so via other other means. # In this case, FvwmEvent does a number of things: # # The Window ID (hint: Echo $[w.id] in a function can test this) is passed to # the corresponding functions. # # There is a one second delay between possible updates - any less than this, # and the event would loop indefinitely -- this is neglegable, as I cannot see # a need to stick/unstick in less than this amount of time. # # The test for this, is acted upon when: # # * The window is configured (this essentially includes a "Sticky" action, but # indirectly binds to (and tests) window move, window button press, etc. # * The window-focus changes (useful if using sloppyfocus) -- this is helpful # for a "refresh". # * A new window is added (this might already had been declared as sticky in a # a previous "Style" definition and so should ensure it gets correct title # mappings on creation. DestroyModuleConfig FvwmEvent-Sticky: * *FvwmEvent-Sticky: PassId *FvwmEvent-Sticky: Delay 1 *FvwmEvent-Sticky: configure_window FvwmToggleStickyPixmap *FvwmEvent-Sticky: focus_change FvwmToggleStickyPixmap *FvwmEvent-Sticky: add_window FvwmToggleStickyPixmap # Read config files for modules: read ConfigFvwmBacker read /home/heather/.fvwm/ConfigFvwmButtons read ConfigFvwmIconBox read ConfigFvwmIconMan read ConfigFvwmIdent read /home/heather/.fvwm/ConfigFvwmPager read ConfigFvwmScroll read ConfigFvwmTaskBar read ConfigFvwmWinList