# # .fvwm2rc (rc file for fvwm2) # # Based on the system default for fvwm2 or fvwm-95 or something, then # customized over a long period of time, with tips from news and # mailing lists. # # William Denton (buff@pobox.com) # # HOW THINGS LOOK AND WORK # # Create a Decor called "Buff" and specify details. # This kind of thing is new circa 2.2, it seems. AddToDecor Buff # First in from left (a down-arrow) + ButtonStyle 1 (Solid Red -- Flat) + AddButtonStyle 1 ActiveUp (4 50x75@1 25x25@1 75x25@1 50x75@0 ) + AddButtonStyle 1 ActiveDown (4 50x75@0 25x25@0 75x25@0 50x75@1 ) + AddButtonStyle 1 Inactive (4 50x75@1 25x25@1 75x25@1 50x75@0 ) # First in from right (an X, meaning delete window) + ButtonStyle 2 (Solid Red -- Flat) + AddButtonStyle 2 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1 # Second in from right (a larger window over a small one, meaning maximize) + ButtonStyle 4 (Solid Red -- Flat) + AddButtonStyle 4 11 95x10@0 95x75@0 25x75@0 65x75@0 65x90@0 10x90@0 10x55@1 25x55@1 25x75@1 25x10@1 95x10@1 # Third in from right (three little windows, meaning minimize) + ButtonStyle 6 (Solid Red -- Flat) + AddButtonStyle 6 17 95x20@0 95x60@0 75x60@0 75x40@0 75x70@0 55x70@0 55x60@0 55x85@0 15x85@0 15x60@1 55x60@1 30x60@1 30x40@1 75x40@1 45x40@1 45x20@1 95x20@1 + TitleStyle LeftJustified Height 24 # I should be able to use DefaultFont for all these fonts but # it didn't work right away. Try again, maybe. IconFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* # Controls whether windows are moved whole or as empty grids. OpaqueMoveSize 5 # Stuff about hitting the edge of the screen with the mouse. EdgeScroll 100 100 EdgeResistance 1000 0 EdgeThickness 1 ColormapFocus FollowsMouse # Set the desk top size in units of physical screen size DeskTopSize 3x2 ImagePath /usr/include/X11/pixmaps/:/usr/X11R6/icons/:\ /usr/include/X11/bitmaps/:/usr/local/icons/ # 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 come before any menus or functions are # defined, and before the internal pager is started. Style "*" ClickToFocus, Icon, MWMFunctions, MWMDecor, HintOverride Style "*" RandomPlacement, SmartPlacement, DecorateTransient, # NoPPosition Style * BorderWidth 5, HandleWidth 5, ForeColor White, BackColor Grey45 Style * UseDecor Buff Style * HilightFore White Style * HilightBack SlateBlue Style * Font -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* Style * CleverPlacement, ClickToFocusPassesClick Style * CaptureHonorsStartsOnPage, RecaptureHonorsStartsOnPage Style "Fvwm*" NoTitle, StaysOnTop, Sticky, WindowListSkip, CirculateSkip Style "FvwmPager" NoHandles Style "FvwmWinList" NoHandles Style "FvwmButtons" NoHandles Style "*clock" NoTitle, NoHandles, Sticky, WindowListSkip Style "xbiff" StaysOnTop, Sticky, WindowListSkip Style "rxvt" Icon term.xpm Style "xterm" Icon xterm.xpm Style "color_xterm" Icon rterm.xpm Style "xcalc" Icon Rcalc.xpm Style "xbiff" Icon mail1.xpm Style "xman" Icon xman.xpm Style "xvgr" Icon graphs.xpm Style "xmag" Icon mag_glass.xpm Style "xgraph" Icon graphs.xpm Style "xv" Icon xview.xpm Style "xconsole" Icon koala.xpm Style "xsession" Icon koala.xpm Style "ghostview" Icon gv.xpm Style "Netscape*" StartsOnPage 1 0, SkipMapping # Pop-up menus. MenuStyle "*" HilightBack Black, Hilight3DThick, ActiveForeOff MenuStyle "*" AnimationOff, MenuFace MenuStyle "*" TitleWarpOff, TitleUnderlines2, SeparatorsShort MenuStyle "*" TrianglesSolid, PopupImmediately, PopupOffset -3 100 MenuStyle "*" Font -adobe-times-bold-r-*-*-12-*-*-*-*-*-*-* # # TO DO AT START-UP # AddToFunc "InitFunction" + "I" Module FvwmButtons + "I" Module FvwmWinList + "I" Module FvwmAnimate # + "I" Module FvwmPager 0 0 # + "I" Module FvwmAudio # + "I" Module FvwmIconMan # Or at re-start. AddToFunc "RestartFunction" + "I" Module FvwmButtons + "I" Module FvwmWinList # + "I" Module FvwmPager 0 0 # + "I" Module FvwmAudio # + "I" Module FvwmIconMan # # FUNCTIONS # # This one moves and then raises the window if you drag the mouse, # only raises the window if you click, and drops or raises the # windowshade if you double-click. AddToFunc "Move-or-Raise" + "M" Move + "M" Raise + "C" Raise # + "D" Maximize 100 100" + "D" Windowshade # 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 AddToFunc "Move-or-Lower" + "M" Move + "M" Lower + "C" Lower + "D" RaiseLower # This one moves or (de)iconifies: AddToFunc "Move-or-Iconify" + "M" Move + "D" Iconify # 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 AddToFunc "Resize-or-Raise" + "M" Resize + "M" Raise + "C" Raise + "D" RaiseLower # You can probably guess what this does. AddToFunc "Raise-and-FlipFocus" + "I" Raise + "I" FlipFocus # # POP-UP MENUS # AddToMenu "Applications" "Applications" Title + "Cheque Book%mini.maze.xpm" Exec cbb & + "ghostview%mini.gv.xpm%" Exec ghostview & + "xconsole%mini.x2.xpm%" Exec xconsole & + "xmag%mini.zoom.xpm%" Exec xmag & + "xpaint%mini.paint.xpm%" Exec xpaint & + "xv%mini.xv.xpm%" Exec xv & + "xxgdb%mini.bug2.xpm%" Exec xxgdb & AddToMenu "Shells" "Shells" Title + "Xterm (7x14 font)%mini.term.xpm%" Exec xterm -sb -sl 500 \ -j -ls -fn 7x14 & + "" Nop + "Color Rxvt (VT100)%mini.term.xpm%" Exec rxvt -font 7x14 -ls & + "Color Xterm (7x14 font)%mini.term.xpm%" Exec color_xterm -sb \ -sl 500 -j -ls -fn 7x14 \ -fb 7x14bold -title "Color xterm" & + "Color Xterm (8x13 font)%mini.term.xpm%" Exec color_xterm -sb \ -sl 500 -j -ls -fn 8x13 \ -title "Color xterm" & + "" Nop + "Large Xterm (10x20 font)%mini.term.xpm%" Exec xterm -sb -sl 500 \ -j -ls -fn 10x20 & + "Large Rxvt (10x20 font)%mini.term.xpm%" Exec rxvt -font 10x20 -ls & + "Large Color Xterm (10x20 font)%mini.term.xpm%" Exec color_xterm \ -sb -sl 500 -j -ls -fn 10x20 & AddToMenu "Browsers" "Browsers" Title + "Lynx%mini.term.xpm%" Exec /usr/X11/bin/xterm -sb -j -ls \ -fn 7x14 -bg BlanchedAlmond -e lynx -book & + "Netscape 4%mini.nscape.xpm%" Exec /usr/local/bin/netscape -geometry =640x900+620+80 -no-about-splash -dont-force-window-stacking & AddToMenu "Games" "Games" Title + "sol%mini.happy.xpm%" Exec sol & + "xothello%mini.tetris.xpm%" Exec xothello & AddToMenu "LockScreen" "Lock Screen" Title + "Clock%mini.lock.xpm%" Exec xlock -mode clock + "Prisoner's Dilemma%mini.lock.xpm%" Exec xlock -mode dilemma + "Fractal Forest%mini.lock.xpm%" Exec xlock -mode forest + "Galaxy%mini.lock.xpm%" Exec xlock -mode galaxy + "Geometric Morphing%mini.lock.xpm%" Exec xlock -mode morph3d + "Goop%mini.lock.xpm%" Exec xlock -mode goop + "Planets in gravity%mini.lock.xpm%" Exec xlock -mode grav + "Life%mini.lock.xpm%" Exec xlock -mode life + "3D Life%mini.lock.xpm%" Exec xlock -mode life3d + "Papo's Mountains%mini.lock.xpm%" Exec xlock -mode mountain + "Maze%mini.lock.xpm%" Exec xlock -mode maze + "Pipes%mini.lock.xpm%" Exec xlock -mode pipes + "Shaded spheres%mini.lock.xpm%" Exec xlock -mode sphere + "Star Trek%mini.lock.xpm%" Exec xlock -mode star + "Dewdney's Voters%mini.lock.xpm%" Exec xlock -mode voters + "Wire%mini.lock.xpm%" Exec xlock -mode wire AddToMenu "Screensaver" "Screensaver" Title + "Clock%mini.hammer.xpm%" Exec xlock -nolock -mode clock + "Prisoner's Dilemma%mini.hammer.xpm%" Exec xlock -nolock -mode dilemma + "Fractal Forest%mini.hammer.xpm%" Exec xlock -nolock -mode forest + "Galaxy%mini.hammer.xpm%" Exec xlock -nolock -mode galaxy + "Goop%mini.hammer.xpm%" Exec xlock -nolock -mode goop + "Geometric Morphing%mini.hammer.xpm%" Exec xlock -nolock -mode morph3d + "Planets in gravity%mini.hammer.xpm%" Exec xlock -nolock -mode grav + "Life%mini.hammer.xpm%" Exec xlock -nolock -mode life + "3D Life%mini.hammer.xpm%" Exec xlock -nolock -mode life3d + "Papo's Mountains%mini.hammer.xpm%" Exec xlock -nolock -mode mountain + "Maze%mini.hammer.xpm%" Exec xlock -nolock -mode maze + "Pipes%mini.hammer.xpm%" Exec xlock -nolock -mode pipes + "Star Trek%mini.hammer.xpm%" Exec xlock -nolock -mode star + "Shaded spheres%mini.hammer.xpm%" Exec xlock -nolock -mode sphere + "Dewdney's Voters%mini.hammer.xpm%" Exec xlock -nolock -mode voters + "Wire%mini.hammer.xpm%" Exec xlock -nolock -mode wire # Can fire off a module if we like. AddToMenu "Module-Popup" "Modules" Title + "Animate%mini.modules.xpm%" Module FvwmAnimate + "Auto%mini.modules.xpm%" Module FvwmAuto + "Backer%mini.modules.xpm%" Module FvwmBacker + "Banner%mini.modules.xpm%" Module FvwmBanner + "Buttons%mini.modules.xpm%" Module FvwmButtons + "Console%mini.modules.xpm%" Module FvwmConsole + "Clean-Up%mini.modules.xpm%" Module FvwmClean + "Cpp%mini.modules.xpm%" Module FvwmCpp + "Event%mini.modules.xpm%" Module FvwmEvent + "Form%mini.modules.xpm%" Module FvwmForm + "IconBox%mini.modules.xpm%" Module FvwmIconBox + "IconMan%mini.modules.xpm%" Module FvwmIconMan + "Identify%mini.modules.xpm%" Module FvwmIdent + "M4%mini.modules.xpm%" Module FvwmM4 + "Pager%mini.modules.xpm%" Module FvwmPager 0 0 + "Rearrange%mini.modules.xpm%" Module FvwmRearrange + "Save%mini.modules.xpm%" Module FvwmSave + "SaveDesk%mini.modules.xpm%" Module FvwmSaveDesk + "Talk%mini.modules.xpm%" Module FvwmTalk + "Window List%mini.modules.xpm%" Module FvwmWinList # Quitting FVWM has its own little menu so it's harder to kill # everything by accident. AddToMenu "Quit-Verify" "Really Quit Fvwm?" Title + "Yes!%mini.exclam.xpm%" Quit + "No!%mini.cross.xpm%" Nop # This is the menu you get when clicking normally on the root window. # It's mostly made up of menus defined above. AddToMenu "Main-Menu" "My Main Menu" Title + "Emacs%mini.x2.xpm%" Exec emacs & + "xcalc%mini.calc.xpm%" Exec xcalc & + "xman%mini.book1.xpm%" Exec xman & + "" Nop + "Applications%mini.x2.xpm%" Popup Applications + "Shells%mini.term.xpm" Popup Shells + "Web Browsers%mini.x2.xpm%" Popup Browsers + "Games%mini.happy.xpm%" Popup Games + "" Nop + "Lock Screen%mini.lock.xpm%" Popup LockScreen + "Screensaver%mini.display.xpm%" Popup Screensaver + "" Nop + "Modules%mini.modules.xpm%" Popup Module-Popup + "" Nop + "Refresh Screen%mini.ray.xpm%" Refresh + "Restart%mini.turn.xpm%" Restart fvwm2 + "" Nop + "Exit Fvwm%mini.stop.xpm%" Popup Quit-Verify # This defines the most common window operations. Set so Mouse-2 on # the root window pops it up. AddToMenu "Window Ops" "Window Ops" Title + "&Move" Function Move-or-Raise + "&Resize" Function Resize-or-Raise + "R&aise%mini.raise.xpm%" Raise + "&Lower%mini.lower.xpm%" Lower + "(De)Iconify" Iconify + "(Un)Stick" Stick + "(Un)Maximize" Maximize 100 100 + "" Nop + "Kill" Destroy + "Close" Delete + "" Nop + "Switch to ..." WindowList + "Refresh Screen%mini.ray.xpm%" Refresh # This is a trimmed-down version of the above which is set to pop up # when the top-left window button (1) is clicked. AddToMenu "Shorter-Window-Ops" "Short Window Ops List" Title + "&Move" Function Move-or-Raise + "&Size" Function Resize-or-Raise + "(De)&Iconify" Iconify + "Ma&ximize" Maximize 100 100 + "&Windowshade" Windowshade + "" Nop + "&Kill" Destroy + "&Close" Delete # This uses pop-up menus defined above, so it couldn't be defined # before. This function is called below. AddToFunc "Window-Ops-Func" + "C" PopUp Shorter-Window-Ops + "M" PopUp Shorter-Window-Ops + "D" Delete # # MOUSE BINDINGS # # First, for the mouse in the root window. # Button 1 gives the Main 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: 0=any, 1, 2 or 3 # | Context: R=RootWdw, W=AppsWdw, T=TitleBar, S=Sides # | | F=Frame (corners), I=IconWindow, 0-9=WindowButtons # | | Window button order: 1 3 5 7 9 0 8 6 4 2 # | | Modifiers: None,Control,Shift,Meta,Any,3=super,4=hyper # | | | Function # +------ +------ +------ +------- # Button Con Mod Function Mouse 1 R A Menu "Main-Menu" Mouse 2 R A Menu "Window Ops" Mouse 3 R A WindowList # Now the title bar buttons. # Any button in the left title-bar button gives the Shorter-Window-Ops # menu. # Any button in the first right title-bar button Iconifies the window. # Any button in the second title-bar button full-maximizes. # Button 1 in the third (rightmost) title-bar button nukes the window. # Note the use of "Mouse 0" for AnyButton.. # Button Con Mod Function Mouse 0 1 A Function "Window-Ops-Func" Mouse 1 2 A Delete Mouse 0 4 A Maximize 100 100 Mouse 0 6 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, which not surprisingly lets you resize or raise the # window. Mouse 1 F A Function "Resize-or-Raise" # Button 1 in the title-bar or sides with any modifiers gives you # Move-or-Raise, which does just what you think. Mouse 1 TS A Function "Move-or-Raise" # Button 1 in an icon gives move for a drag, de-iconify for a # double-click, nothing for a single click. Button 2 in an icon, with # 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 (Alt) gives RaiseLower. Mouse 3 W M RaiseLower # # KEYBOARD SHORTCUTS # # Arrow Keys # Ctrl-Arrow scrolls 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 # Alt-Arrow scrolls 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 # Shift-Control-Arrow moves 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 # Shift-Alt-Arrow moves 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 "Main-Menu" Key F2 A M Popup "Window Ops" Key F3 A M WindowList Root c c NoDeskSort Key F4 A M Iconify Key F5 A M Move Key F6 A M Resize Key F7 A M Nop Key F8 A M Nop # Gives Microsoft Windows-style Alt-Tab behaviour, sort of. # Hit it twice fast and you can bounce between two windows. Key Tab A M WindowList "Prev Raise-and-FlipFocus" # The following will just circulate around windows (unless they're # set to CirculateSkip. # Key Tab A M Next [CurrentPage !Iconic] focus Key Escape A C WindowList # # MODULE DEFINITIONS # # ----- FvwmPager *FvwmPagerRows 1 # *FvwmPagerColumns 1 *FvwmPagerBack grey60 *FvwmPagerFore black # *FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* *FvwmPagerFont "none" *FvwmPagerHilight rgb:c3/c3/c3 *FvwmPagerSmallFont 5x8 # *FvwmPagerGeometry -1-1 # *FvwmPagerLabel 0 Desktop # *FvwmDesktopScale 36 # ----- FvwmButtons *FvwmButtonsFore Black *FvwmButtonsBack rgb:c3/c3/c3 *FvwmButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* *FvwmButtonsGeometry +645+1 # Layout: specify rows or columns, not both *FvwmButtonsRows 1 *FvwmButtonsBoxSize smart *FvwmButtonsPadding 2 2 # Define the buttons to use..... *FvwmButtons (Swallow xclock 'Exec xclock -bg rgb:c3/c3/c3 -padding 0 &') # A couple of panels. Panels are done differently now. *FvwmButtons (Title WinOps, Panel (down) WinOps \ "Module FvwmButtons -transientpanel WinOps") *FvwmButtons (Title Audio, Icon mini.cd.xpm, Panel (down) Audio \ "Module FvwmButtons -transientpanel Audio") # You can use Style commands on the panel names to control how they # look, but the default is fine for me. *FvwmButtons (Title Emacs, Icon lemacs.xpm, Action 'Exec emacs') *FvwmButtons (Title xcalc, Icon rcalc.xpm, Action `Exec "Calculator" xcalc &`) *FvwmButtons (Title xterm, Icon rterm.xpm, Action 'Exec "XTerm" \ xterm -sb -sl 500 -j -ls -fn 7x14 -bg BlanchedAlmond &') # Can do a built-in fvwm action like Resize, Move, Lower or Raise # *FvwmButtons (Title Resize, Icon resize.xpm, Action Resize) # See man page for a three-in-one-column thingie. *FvwmButtons (Swallow xbiff 'Exec xbiff -bg rgb:c3/c3/c3') *FvwmButtons (Icon rbomb.xpm, Action Destroy) *FvwmButtons (2x1, Swallow(UseOld,NoKill) "xload" \ `Exec xload -nolabel -bg rgb:c3/c3/c3 -update 10 &`) *FvwmButtons (2x1, Swallow "FvwmPager" `FvwmPager 0 0`) # Definitions of the panels mentioned above. # -- Panel: WinOps *WinOpsBack BlanchedAlmond *WinOpsGeometry -10-10 *WinOpsColumns 1 *WinOps (Title Resize ,Icon mini.resize4.xpm ,Action Resize) *WinOps (Title Move ,Icon arrows2.xpm ,Action Move ) *WinOps (Title Lower ,Icon mini.lower2.xpm ,Action Lower ) *WinOps (Title Raise ,Icon mini.raise2.xpm ,Action Raise ) # -- Panel: Audio *AudioBack BlanchedAlmond *AudioGeometry -10-10 *AudioColumns 1 *Audio (Title gnapster, Icon mini.cd.xpm, Action 'Exec gnapster') *Audio (Title gqmpeg, Icon mini.cd.xpm, Action 'Exec gqmpeg') *Audio (Title RealAudio, , Action 'Exec realplay'); #------------- # FvwmIdent *FvwmIdentBack #000080 *FvwmIdentFore Yellow *FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* # FvwmWinList *FvwmWinListAction Click1 Iconify -1,Focus, Raise *FvwmWinListAction Click2 Module "FvwmIdent" FvwmIdent *FvwmWinListAction Click3 Iconify, Focus *FvwmWinListBack rgb:c3/c3/c3 *FvwmWinListFore Black *FvwmWinListIconFore Purple *FvwmWinListFocusBack Black *FvwmWinListFocusFore White *FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* *FvwmWinListGeometry +0+0 *FvwmWinListMaxWidth 100 # Makes buttons all *FvwmWinListMinWidth 100 # the same size *FvwmWinListTruncateRight *FvwmWinListUseIconNames *FvwmWinListUseSkipList *FvwmWinListNoAnchor