# $Id: .fvwm2rc,v 1.8 2003/01/19 02:52:46 buff Exp $ # $Revision: 1.8 $ # $Author: buff $ # # .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 (the default, it seems, which is a bar) + ButtonStyle 1 -- ActiveUp # First in from right (an X, meaning delete window) + ButtonStyle 2 -- ActiveUp + 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 # 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 # Put numbers in the middle of the screen when resizing/moving Emulate Mwm # Set the desk top size in units of physical screen size DeskTopSize 4x2 ImagePath /usr/X11R6/icons/:/usr/X11R6/share/fvwm2/pixmaps/ # 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, StaysOnTop Style "*clock" NoTitle, NoHandles, Sticky, WindowListSkip Style "xbiff" StaysOnTop, Sticky, WindowListSkip Style "Netscape*" StartsOnPage 1 0, SkipMapping Style "Galeon*" 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 # Or at re-start. AddToFunc "RestartFunction" + "I" Module FvwmButtons # # 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" 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 & + "ggv%mini.gv.xpm%" Exec ggv & + "xmag%mini.zoom.xpm%" Exec xmag & + "xv%mini.xv.xpm%" Exec xv & AddToMenu "Shells" "Shells" Title + "Xterm (7x14 font)%mini.term.xpm%" Exec xterm -sb -sl 500 \ -j -fn 7x14 -bg BlanchedAlmond & AddToMenu "Browsers" "Browsers" Title + "Galeon" Exec /usr/X11R6/bin/galeon & + "Lynx%mini.term.xpm%" Exec /usr/X11R6/bin/xterm -sb -j \ -fn 7x14 -bg BlanchedAlmond -e lynx & + "Mozilla" Exec /usr/local/bin/mozilla & + "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 & # 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 & + "" 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 + "Modules%mini.modules.xpm%" Popup Module-Popup + "" Nop + "Refresh Screen%mini.ray.xpm%" Refresh + "Restart%mini.turn.xpm%" Restart + "" 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" "" 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 Close 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 &') *FvwmButtons (Title wiggins, Icon rterm.xpm, \ Action 'Exec vncviewer -passwd ~/.vnc/passwd wiggins: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 -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 -highlight rgb:c3/c3/c3 &`) *FvwmButtons (2x1, Swallow "FvwmPager" `FvwmPager 0 0`) # Definitions of the panels mentioned above. # -- Panel: Audio *AudioBack BlanchedAlmond *AudioGeometry -10-10 *AudioColumns 1 *Audio (Title xmcd, Icon mini.cd.xpm, Action 'Exec xmcd') *Audio (Title xmms, Icon mini.cd.xpm, Action 'Exec xmms') *Audio (Title RealAudio, , Action 'Exec realplay') # ----- FvwmIdent *FvwmIdentBack #000080 *FvwmIdentFore Yellow *FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*