Linux Online Advertisement
[ Register ]

[ Applications ]
[ Documentation ]
[ Distributions ]
[ Download Info ]
[ General Info ]
[ Book Store ]

Advertisement

[ Courses ]
[ News ]
[ People ]
[ Hardware ]
[ Vendors ]
[ Projects ]
[ Events ]
[ User Groups ]
[ User Area ]

Moving to Linux: Kiss the Blue Screen of Death Goodbye!

[ About Us ]
[ Home Page ]
[ Advertise ]

Getting Started with Linux - Lesson 19

fvwm2 screenshot


I know the horizontal scrolling is horrendous. Please don't mail me about it ;-)

##############################
# Sample .fvwm2rc file
# Configured by Jay Kuri
# 2/9/99
##############################

# Paths
#	Paths are given as a list of directories, seperated by colons
#
# ImagePath 	A list of directories where images (bitmaps, pixmaps,
#		etc) can be found.
#
# ModulePath	A list of directories where fvwm modules are stored.
#		The compiled-in setting will contain all modules
#		distributed with fvwm, so you only set this if you
#		add your own modules in another directory.
#
ImagePath /usr/X11R6/include/X11/pixmaps/:$HOME/xpms:$HOME/pixmaps:/usr/X11R6/lib/X11/fvwm2/pixmaps
#ModulePath	$FVWM_MODULEDIR:$HOME/fvwm-modules

# set XORvalue to something visible.  This sets the coloration of the
# 'rubber-band' window-borders when moving and resizing windows.
XORvalue 208

# Make our windows snap-up against other windows and make icons snap
# up against other icons
SnapAttraction 20 SameType

# Font configuration
#
# WindowFont style	Sets the font to be used in window title-bars
#
# IconFont style 	Sets the font that will be used for icon labels.
#
#Style * Font		-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-
#Style * Font -b&h-lucidatypewriter-bold-r-normal-*-*-120-*-*-m-*-iso8859-2
Style * Font  -microsoft-tahoma-bold-r-normal-*-16-*-*-*-p-*-iso8859-1
# Style * IconFont	-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*
# Style * IconFont -b&h-lucidatypewriter-bold-r-normal-*-*-120-*-*-m-*-iso8859-2
Style * IconFont -microsoft-verdana-bold-r-normal-*-12-*-*-*-p-*-iso8859-9
# Highlight color
#
# This sets the textcolor and background color for the active window
Style * HilightFore #2F4F4F, HilightBack #00CED1


# BorderStyle
#
# This sets how the border of windows will be displayed.
# Format:  BorderStyle [state] [style] [ -- [!flag] ... ]
# State is either Active or Inactive
# The commands below set the borders to solid colors
#
BorderStyle Active -- NoInset HiddenHandles
BorderStyle Inactive -- NoInset HiddenHandles

# TitleStyle
#
# This option sets the style of the window title-bar
# We set the Active style to a Green vertical gradient,
# the Active (pushed down) style to the reverse of the green gradient
# and the Inactive style to a blue vertical gradient
#
# Format: TitleStyle [state] [style] [ -- [!flag] ... ]
#
#TitleStyle ActiveUp Vgradient 16 #1ea819 #065414 -- flat
#TitleStyle ActiveDown Vgradient 16 #065414 #1ea819 -- flat
#TitleStyle Inactive Vgradient 16 #11236b #03092b -- flat

# these are my changes - June 29, 2001

TitleStyle ActiveUp Vgradient 16 #FAAFAA #FFFFFF -- flat
TitleStyle ActiveDown Vgradient 16 #87CEFA #FFFFFF -- flat
TitleStyle Inactive Vgradient 16 #708090 #CDCD90 -- flat

# The Second Variation of TitleStyle:
#
# Format: TitleStyle [ justification ] [ height num ]
#
TitleStyle LeftJustified height 18

# Button Styles
#
# Now we are going to set up the buttons
#
# The two commands we use are:
#
# ButtonStyle button [ state ] [ style ] [ -- [!]flag ... ]
#
# AddButtonStyle button [ state ] [ style ] [-- [!]flag ...]
#
# the 'button' is the number of the button you are defining, it can be
# a number from 0-9 or the word 'all' which means apply the style to all
# buttons.
# Even button numbers are on the right, while odd button numbers are on the
# left. The lower numbers are on the outside:  13579	title	86420
#
# First, we set all buttons to start with the same style we are using for
# the title.  Then we define the pixmaps we use as our buttons using
# AddButtonStyle.
ButtonStyle All -- UseTitleStyle flat
AddButtonStyle 1 Pixmap button.xpm
AddButtonStyle 2 Pixmap button-max.xpm
AddButtonStyle 4 Pixmap button-vert.xpm
AddButtonStyle 6 Pixmap button-horiz.xpm
AddButtonStyle 8 Pixmap button-close.xpm


# FvwmButtons
# this was taken from ESR's .fvwm2rc file
*FvwmButtonsFore Gray60
*FvwmButtonsBack Navy 
*FvwmButtonsFont -bitstream-copprplgoth hv bt-medium-r-normal-*-14-*-*-*-p-*-iso8859-1
## if you want the buttons to show up in the bot. left of a 800x640 resol.
*FvwmButtonsGeometry +330+510
*FvwmButtonsRows 1

*FvwmButtons Xterm	xterm-linux.xpm	Exec "xterm" xterm -geometry 70x8+100+50 -fn 6x13 -fg navy -bg azure2 -e fireup_xterm  
*FvwmButtons Emacs	gnu-animal.xpm	Exec "Emacs" emacs -geometry =80x78-0+0 &
*FvwmButtons Mozilla	mozicon50.xpm	Exec "Mozilla" mozilla_start &
*FvwmButtons Sylpheed   my_mailbox.xpm  Exec "Sylpheed" sylpheed &
*FvwmButtons Status     com_pin.xpm     Exec "Status" xterm -geometry 70x8+100+50 -fn 6x13 -fg azure -bg black -T status -n status -e status_report
*FvwmButtons Lock       bomb.xpm        Exec "Lock" xlock -mode julia       
#*FvwmButtons(Swallow XEyes 'Exec xeyes -center LightGrey &')


# MenuStyle
#
# MenuStyle is perhaps the most complicated configuration option. For this
# reason we suggest you read the fvwm2 man page.  However, using the
# MenuStyle definition below, we will attempt to give you an idea of how to
# use it.
#
# Format: MenuStyle stylename options
#
# The StyleName is a name to indicate which menustyle you are defining.  All
# of the menus get the '*' by default. (you can change the menu style a menu
# uses with the 'changemenustyle' option)
#
# Here we set the default menu-style:
#
# Background sets the default menu background color
#
# ActiveFore sets the foreground color of the currently selected menu-item
#
# ForeGround sets the foreground color of non-selected menu-items
#
# Popupoffset sets the offset of child-menus.
#   Format: Popupoffset pixels percent
#	We set the percent to 100, making the child-menus pop-up to the right
#	of the existing menus.
#
# MenuFace sets the background of the menu using the 'fancy' options.
# 	Menuface is another complicated one so again, check the man-page,
#	but I'll explain the one here:
#	This menuface command sets the background of the menus to a
#	   Horizontal gradient using 64 colors, with one pair of colors,
#	   from the color #758591 to the color #102030.
#
# Animation turns menu animations on.  If you pop-up a submenu on the right
# 	edge of the screen, the menu will move over so it is fully visible.
#
MenuStyle * background #800000, ActiveFore #ADFF2F, ForeGround #FFFACD
MenuStyle * popupoffset 0 100
MenuStyle * MenuFace HGradient 64 1  #6495ED 100 #0000CD, Animation
#MenuStyle * Font -b&h-lucida-medium-r-normal-*-*-120-*-*-p-*-iso8859-2
#MenuStyle * Font  -bitstream-zurich-medium-r-normal-*-14-*-*-*-p-*-iso8859-1
MenuStyle * Font '-bitstream-copprplgoth hv bt-medium-r-normal-*-16-*-*-*-p-*-iso8859-1'

# Set up some desktop options
#
# Desktop [Horizontal]x[vertical]  Defines the virtual desktop size,
#	1x1 = one physical screen size (no virtual desktop
DesktopSize	1x1

# EdgeResistance scrolling moving
#   Sets how hard it is to change the desktop viewport
#   scrolling is in milliseconds
#   moving is in pixels (how far a window's edge must move to move off-screen
#
# These values don't much matter in this configuration as our viewport
# is only as big as our screen anyway.
EdgeResistance	750 75

# EdgeScroll horizontal vertical
#   Sets the percentage of a page to scroll when the cursor is on the edge
#   of the screen.   Again, not useful in this configuration since we only
#   have a viewport as big as our screen.
EdgeScroll	100 100

# OpaqueMoveSize percentage
#   This option tells fvwm the maximum size window that it should move
#   with contents intact (ie, not 'rubber-banding')  You should keep this
#   low if you don't have good video hardware.
OpaqueMoveSize 50



# Style related options
#
# Styles are used to set-up how windows are treated by the window manager.
# They allow you to change the way windows are placed, decorated and treated
# in general.  You can give different options to different windows, so that
# your xterms may be decorated differently than, say, your netscape window.
#
# The format of the style commands are:
# 	Style windowname options
#
# The windowname is the window's name class or resource string that you want
# this option to affect.  You can use wildcards (such as * or ?), thus
# "*" specifies options for all windows.
# The options that you can specify with the Style command are many and varied
# and really warrant a look at the fvwm2 man page.
#
#  We set up some global defaults here for all windows.
Style "*" ForeColor grey40
Style "*" BackColor #11236b
Style "*" TileCascadePlacement
Style "*" StickyIcon
Style "*" IconBox	5 -50 -134 -5
Style "*" BorderWidth 5, HandleWidth 5
Style "*" NoPPosition
Style "*" NakedTransient


# Some Fvwm-Related Styles
Style "Fvwm*"	NoTitle, NoHandles, Sticky, WindowListSkip
Style "FvwmWinList"	NoTitle
Style "FvwmPager"	BorderWidth 3

# styles taken from my own old fvwm2rc file - since SuSE 7.2 update, some of this doesn't work

Style "emacs"	        Icon my_emacs.xpm
Style "linuxmail"       Icon little_tux.xpm
Style "xterm-1"	        Icon communism.xpm 
Style "xterm-1"		Color rgb:FA/BC/AB/rgb:99/00/00, HilightFore rgb:00/00/80, HilightBack rgb:00/66/00
Style "netscape"        Icon nscape.xpm
Style "opera"           Icon my_opera.xpm
Style "xterm-3"		Icon politics.xpm
Style "xterm-3"		Color rgb:ff/00/00/rgb:88/88/88, HilightFore rgb:00/00/00, HilightBack rgb:d1/72/1c
Style "commands"        Icon com_pin.xpm
Style "xmms"            Icon wmxmms.xpm 
Style "MUTT"		Icon my_mailbox.xpm 
Style "LOmail"          Icon nasa.xpm
Style "xterm-2"         Icon jfk_winner.xpm
Style "xterm-2"		Color rgb:00/00/00/rgb:FF/FF/F0, HilightFore rgb:99/00/00, HilightBack rgb:FA/E9/C9
Style "RealPlayer"      Icon real_audio.xpm
Style "xterm-4"         Icon dave1-shape.xpm 
Style "REMOTE TERM"     Icon xfiles.xpm
Style "lynx"            Icon bosox.xpm
Style "lynx"		Color rgb:99/00/00/rgb:FF/FF/FF, HilightFore rgb:00/64/00, HilightBack rgb:00/00/FF
Style "Sylpheed"	Color rgb:00/00/00/rgb:FF/FF/F0, HilightFore rgb:99/00/00, HilightBack rgb:FA/E9/C9
Style "Sylpheed"        Icon my_mailbox.xpm
Style "cdplayer"        Icon trek_tvguide.xpm
Style "xmms"            NoTitle, Sticky, WindowListSkip
Style "gkrellm"         NoTitle, Sticky, WindowListSkip



# My own settings
#style "XTerm"	BorderWidth 4, Handlewidth 4, Icon Monitor.xpm
style "Netscape" BorderWidth 3, Handlewidth 3
Style "*clock"	BorderWidth 0,NoTitle,NoHandles,WindowListSkip,Sticky
Style "XMcd"	NoTitle
Style "*Dialog_popup" WindowListSkip
Style "*Download" WindowListSkip,NoTitle

# Resources for Modules
#
# Resources are usually of the form
# *ModulenameOption value
#
# Resources are used to configure fvwm modules. See the man page for each
# module to find out what resources you can set
#
# FvwmPager

*FvwmPagerBack #FAFCAF
*FvwmPagerFore #000088
*FvwmPagerFont -bitstream-zurich-medium-r-normal-*-11-*-*-*-p-*-iso8859-9 
*FvwmPagerHilight #908090
*FvwmPagerDeskTopScale 64
*FvwmPagerGeometry +5+5
*FvwmPagerLabel 0 Mike 
*FvwmPagerSmallFont 5x8
*FvwmPagerColumns 2
*FvwmPagerLabel 1 One
*FvwmPagerLabel 2 Two
*FvwmPagerLabel 3 Three
*FvwmPagerBalloons Pager
*FvwmPagerBalloonfore white

# FvwmForm
# options for the FvwmForm module which we specify as 'Ssh' later on
*SshFore	#990000
*SshBack	#6495ED
*SshItemBack    #FFFFFF
*SshItemFore	#000080
*SshFont	-*-lucidatypewriter-medium-r-*-*-14-*-*-*-m-*-*-*
*SshButtonFont	-*-lucidatypewriter-medium-r-*-*-14-*-*-*-m-*-*-*
*SshInputFont	-*-lucidatypewriter-medium-r-*-*-14-*-*-*-m-*-*-*
*SshLine		Left
*SshText		"Host"
*SshInput	Host 30
*SshLine		Left
*SshText		"User"
*SshInput	User 30
*SshLine		Center
*SshButton	quit "OK"	^M
*SshCommand	Exec exec xterm -sl 1024 -cr white -fn -*-fixed-medium-r-*--18-*-*-*-*-*-*  -fg black -bg gray60 +ai -T "\"$(User)\"" -e ssh $(Host) -l $(User) &
*SshButton	quit "Cancel"	^[
*SshCommand	Nop

# Function definitions
#
# Functions let you define more complex events than fvwm provides
#  in it's default configuration.  It allows you to do multiple things
#  when something happens... for example.  The following function
#  can be used on the titlebar of a window, and will allow you to move,
#  raise or windowshade a window when you move, click, or doubleclick
#  the titlebar, respectively.
AddToFunc "Move-or-Raise" "M" Move
+              "M" Raise
+              "C" Raise
+              "D" WindowShade

AddToFunc "Move-or-Iconify" "M" Move
+              "D" Iconify
+              "C" RaiseLower

AddToFunc "Resize-or-Raise" "M" Resize
+              "M" Raise
+              "C" Raise
+              "D" RaiseLower

AddToFunc "StartFunction"
+              "I" exec xsetroot -fg navy
+              "I" exec xv -root -max -quit rotation_bkg/current_guay_pic &
+              "I"  exec start_gkrellm
+              "I" Module FvwmButtons
+	       "Immediate" Module FvwmPager 0 3
+	       "Immediate" Module FvwmAudio
+	       "Immediate" Module FvwmAuto 750
+              "Immediate" Module FvwmAnimate

AddToFunc "InitFunction"
#+              "Immediate" Exec xsetroot -solid \#050530
+              "Immediate" Desk 0 2
+              "Immediate" Desk 0 0

AddToFunc "RestartFunction"
#+	       "Immediate" Exec xsetroot -solid \#004020
+              "I" Module FvwmButtons


AddToFunc "Maximize_func" "M" Maximize 0 100
+              "C" Maximize 0 80
+              "D" Maximize 100 100

# Popup menus
#
# Now we start defining menus.  The Window-popups are used for
# window-operations.
#
# Application and root-menu definitions come later
AddToMenu "Window-Popup" "Window Ops" Title
+              "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "(De)Iconify" Iconify
+              "(Un)Stick" Stick
+              "(Un)Maximize" Function maximize_func
+              "Identify" Module FvwmIdent
+              "" Nop
+              "Destroy" Destroy
+              "Close" Close
+              "" Nop
+              "Refresh Screen" Refresh

AddToMenu "Window-ops-Popup" "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "Iconify" Iconify
+              "(Un)Stick" Stick
+              "Identify" Module FvwmIdent
+              "" Nop
+              "Destroy" Destroy
+              "Close" Close
+              "" Nop
+              "Scrollbar" Module FvwmScroll 2 2


# Key bindings
#
#  Now we set-up some hot-keys.
#  The format for Key-bindings is:
#
#  Key keyname context modifier function
#
#  context describes where the binding applies, W for an application window,
#     R for root window, A for anywhere, T for title, etc.
#  modifier is keyboard meta-keys which should be pressed, N for none,
#     S for Shift, M for Meta, C for Control, or A for any. You can combine
#     these, so things like SM (shift-Meta) are valid.
#
Key F3 W M Iconify
Key F3 I M Iconify
Key F4 W M Close
Key F11 A C Exec exec xlock -mode julia &
Key F9 A M Desk 0 0
Key F10 A M Desk 0 1
Key F11 A M Desk 0 2
Key F12 A M Desk 0 3

# These are some neat ones.  They allow you to hit control-
# to switch focus to the window next to your current window in that direction.
# Some people don't like this, if you don't, comment out these lines
#
Key Right A C Direction East (CurrentDesk !Iconic) Focus
Key Left A C Direction West (CurrentDesk !Iconic) Focus
Key Up A C Direction North (CurrentDesk !Iconic) Focus
Key Down A C Direction South (CurrentDesk !Iconic) Focus

# Familiar alt-tabbing
Key Tab A M Next (CurrentDesk !Iconic) Focus
Key Tab A SM Prev (CurrentDesk !Iconic) Focus

# Mouse bindings
#
# Mouse bindings work in very much the same way as key bindings
#
# Format:  Mouse Button Context Modifiers function
#
Mouse 1 R N Menu "Utilities" Nop
Mouse 2 R N Menu "Window-Popup" Nop
Mouse 3 R N Module FvwmWinList transient
Mouse 1 1 N Iconify
Mouse 3 1 N Menu "Window-ops-Popup" Nop
Mouse 1 2 N Maximize
Mouse 3 2 N Function "Resize-or-Raise"
Mouse 1 4 N Maximize 0 100
Mouse 1 6 N Maximize 100 0
Mouse 1 8 N Delete
Mouse 1 T N Function "Move-or-Raise"
Mouse 1 SF N Function "Resize-or-Raise"
Mouse 3 T N RaiseLower
Mouse 1 I N Function "Move-or-Iconify"
Mouse 3 I N Function "Move-or-Iconify"
Mouse 2 TSFI N Menu "Window-ops-Popup" Nop
Mouse 3 S N Function "Move-or-Iconify"

#
# Some Example Menus
#
#

AddToMenu "Shells-Popup" 

+		"Xterm 1"       exec xterm -font -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-*-* -background seashell3  -T xterm-1 -n xterm-1
+		"Xterm 2"       exec xterm -font -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-*-* -background bisque3  -T xterm-2 -n xterm-2
+		"Xterm 3"       exec xterm -font -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-*-* -background Khaki  -T xterm-3 -n xterm-3
+		"Xterm 4"       exec xterm -font -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-*-* -background White -T xterm-4 -n xterm-4
+               "commands"  exec  xterm -geometry 70x8+5+5 -font 7x14*bold -background navy -foreground NavajoWhite -T commands -n commands &

AddToMenu "Remote-Popup" 
+               "linuxmail" 	exec xterm -sl 1024 -fn 7x14 -cr white -fg navy -bg bisque3 -T linuxmail -n linuxmail -e ssh -l linuxorg mikehome.starfleet
+              "SSH Anywhere" FvwmForm Ssh
+               "mike3"         exec xterm -font -*-fixed-medium-r-*-*-14-*-*-*-*-*-iso8859-*  -bg gray10 -fg wheat -T 'MIKE3' -n 'MIKE3' +ai -e ssh -l mike mike3 &
+               "englishbos local"  exec xterm -bg antiquewhite2 -fg gray10 -fn 7x14 -T englishbos -n englishbos +ai &

AddToMenu "Applications-Popup"  

+              "opera"    Exec opera 
+	       "Status"   Exec  xterm -geometry 70x8+100+50 -fn 6x13 -fg azure -bg black -T status -n status -e status_report 
+              "Mozilla"  Exec mozilla_start
+              "Sylpheed" Exec sylpheed
+              "RealPlayer"  Exec realplay
+              "On-line Books" Exec xterm -bg antiquewhite2 -fg gray10 -fn -*-fixed-medium-r-*--18-*-*-*-*-*-* -e lynx http://digital.library.upenn.edu/books/new.html
+              "Lynx Plain"    Exec xterm -bg bisque2 -fg black -fn -*-fixed-medium-r-*--18-*-*-*-*-*-* -e lynx

AddToMenu "Graphics-Popup" 
+              "The GIMP" Exec xterm -fg \#30d030 -bg black -T gimpit -geometry 80x5+602+787 -e gimp
+              "xv" Exec xv
+              "Gcolorsel" Exec gcolorsel
 
AddToMenu "Development-Popup"  

+              "emacs" Exec emacs
+              "Kylix" Exec ~/kylix/bin/startkylix

AddToMenu "Accessories-Popup" 
+              "Calculator" Exec gcalc
#+             "Seyon" Exec seyon -modems /dev/cuaa1
+              "xchat" Exec xchat
+	       "Lock" Exec xlock -mode julia 
+              "fetchmail" Exec xterm -fg wheat -bg gray20 -fn -*-fixed-medium-r-*--14-*-*-*-*-*-* +ai -e fetchmail &

AddToMenu "Sound-Popup" 
+              "gmix" Exec gmix
+              "tcd"  Exec xterm -fn 7x14 -T cdplayer -n cdplayer -e tcd &
+              "xmms" Exec xmms 

AddToMenu "BackgroundsMenu"
PipeRead 'for i in $HOME/rotation_bkg/*; \
do echo "+ $i Exec echo $i > $HOME/rotation_bkg/desktop_background && xv -root -max -quit  $i"; done'

AddToMenu "Module-Popup" "FvwmTalk" Module FvwmTalk
+              "Clean-Up" Module FvwmClean
+              "Identify" Module FvwmIdent
+              "IconManager" Module FvwmIconMan
+              "Control Animation" Popup MenuFvwmAnimate


AddToMenu "Utilities" "Utilities" Title

+              "" Nop
+              "Shells" Popup Shells-Popup
+              "Remotes" Popup Remote-Popup
+              "Applications" Popup Applications-Popup
+              "Graphics Apps" Popup Graphics-Popup
+              "Development" Popup Development-Popup
+              "Accessories" Popup Accessories-Popup
+              "Sound Stuff" Popup Sound-Popup
+	       "Backgrounds" Popup BackgroundsMenu
+              "Modules" Popup Module-Popup
+              "" Nop
+              "Refresh" Refresh
+              "Quit X" Popup Quit-Verify

AddToMenu "Quit-Verify" "Restart WM" Restart
+              "Yes, Really Quit" Quit
+              "" Nop
+              "No, Don't Quit" Nop



[ Return to the Lesson 19 ]




Comments: feedback (at) linux.org
Advertising: banners (at) linux.org
Copyright Linux Online Inc.
Compilation ©1994-2008 Linux Online, Inc.
All rights reserved.