# # ~/.fvwmrc - configuration for the feeble virtual window manager # Customized for CFHT by Sidik Isani # # This file should be installed as .fvwmrc in your home directory. It # allows you to customize the look-and-feel of fvwm. The colors, fonts, # and behavior of the window manager, as described in the "man page" for # fvwm are all controlled by this file. Colors, fonts, and behaviors of # APPLICATIONS are NOT controlled here (use .Xdefaults for applications). # This configuration file only controls appearance of the window frames, # icons, menus, desktop, and desktop toolbars. # # After making changes in this file, save it and select "restart" from # the window manager root menu (click left mouse button anywhere on desktop.) # # Note: You can't forward-reference things in this file. Order matters! # Handy macro for expand shell environment vars for m4 # # The following have special meaning to this .fvwmrc (SSO=Session Startup Opts) # $SSO_COLORS if defined, try to load /apps/wm/common/system.fvwmrc.colors. # $SSO_PAGER if defined, gives size of virtual desktop. If 0, disables it # $SSO_IMTOOL if defined, gives preferred FITS viewer (saoimage, skycat) # $SSO_FOCUS if = "click", selects click-to-focus on window policy # $SSO_SAVEDESK if defined, enables reading of the ~/.fvwmdesk file at startup # $SSO_STATUSONLY if defined, do not display any toolbars, mouse cursors, etc. # $SSO_PEGASUS if defined, special menu options for pegasus sessions included # # Example for manual startup: SSO_PAGER=0 SSO_STATUSONLY=1 xinit fvwm.xsession -- :1 # m4_define(`m4_env',`m4_esyscmd(/apps/gnu/bin/bash -c "echo -n $$1")') # # -------------------------- Paths and Icons ----------------------------- # # Colon-separated lists of directories. Add to PixmapPath if you have # icons in your home directory that you want fvwm to use. ModulePath /usr/local/bin/:m4_FVWMDIR/:m4_HOME/bin/ PixmapPath /apps/wm/common/pixmaps/ IconPath /apps/wm/common/bitmaps/ # match up host names and applications with appropriate icons m4_include(`/apps/wm/common/system.fvwmrc.icons') m4_include(`/apps/wm/common/system.fvwmrc.icons.hosts') # add/override with your own icons here. Format is: # Icon "window title" picture.xpm # Warning: random pixmaps that didn't come from /apps/wm/common/pixmaps/ # can result in wasted colors and colormap problems! Icon "xconsole" monitor.xpm # # -------------------------------- Styles ------------------------------- # # set the default border width and other styles for windows here: m4_ifelse(m4_env(SSO_STATUSONLY),`',` Style "*" BorderWidth 7, HandleWidth 7',` # # Or, if STATUSONLY is set, get rid of all window decorations; They are useless # Style "*" BorderWidth 4, HandleWidth 4, NoHandles, NoButton 1, NoButton 2, NoButton 4') # include some default styles, if you want them (otherwise comment out) m4_include(`/apps/wm/common/system.fvwmrc.styles') # set other special behavior by-application here: # Style "Example" Stick, NoTitle, StaysOnTop, WindowListSkip, NoHandles Style "*Banner" NoTitle, NoHandles, Sticky, WindowListSkip, StaysOnTop Style "acontrol" NoTitle, NoHandles, Sticky, WindowListSkip Style "xbiff" NoTitle, NoHandles, Sticky, WindowListSkip # # ----------------------------- Colors --------------------------------- # # Colors can be "#rrrrggggbbbb" "#rrggbb" or "Colorname", like "Blue" # as long as there is a line for it in /usr/lib/X11/rgb.txt # (or /usr/openwin/lib/rgb.txt on the suns.) m4_ifelse(m4_env(SSO_COLORS),`',` HiForeColor #0000ffffffff HiBackColor #00002222bbbb StdForeColor #ffffffffffff StdBackColor #606070709090 StickyForeColor #ffffffffffff StickyBackColor #00008b8b8b8b MenuBackColor #00002222bbbb MenuForeColor #0000ffffffff MenuStippleColor #bbbbbbbbc8c8 *FvwmPagerBack #5e5e5e5e6464 *FvwmPagerFore #000000000000 *FvwmPagerHilight #00008b8b8b8b *CFHTStuffBack #bbbbbbbbc8c8 *CFHTStuffFore #000000000000 *GoodStuffBack #bbbbbbbbc8c8 *GoodStuffFore #000000000000',` m4_include(`/apps/wm/common/system.fvwmrc.colors.'m4_env(SSO_COLORS))') XORvalue 131511 # # ------------------------------- Fonts -------------------------------- # # use the xfontsel program to see which fonts are available Font -adobe-helvetica-medium-r-*-*-*-100-*-*-*-*-*-* WindowFont -adobe-helvetica-bold-r-*-*-*-100-*-*-*-*-*-* *FvwmPagerFont -adobe-helvetica-bold-r-*-*-*-100-*-*-*-*-*-* *FvwmPagerSmallFont -adobe-helvetica-medium-r-*-*-*-80-*-*-*-*-*-* *CFHTStuffFont -adobe-helvetica-medium-r-*-*-*-80-*-*-*-*-*-* *GoodStuffFont -adobe-helvetica-medium-r-*-*-*-80-*-*-*-*-*-* # # ----------------------- Placement & Geometries -------------------------- # # see man pages for info on what the following do SmartPlacement RandomPlacement StickyIcons IconBox 0 -64 1200 -1 *CFHTStuffGeometry -1+1 *CFHTStuffColumns 1 *GoodStuffGeometry +1+1 *GoodStuffRows 1 # See also: placement of pager, below. # # ----------------------- Virtual Pager Stuff -------------------------- # # Where to place pager (-1-1 means lower right corner of screen) # *FvwmPagerGeometry -1-1 # m4_ifelse(m4_env(SSO_PAGER),`',` # # Set the size of your virtual desktop here, and if you are not using SSO_PAGER # DeskTopSize 1x6 # # If SSO_PAGER is defined, use this instead to set size. If it is zero, set # the pager size to 1x1 and leave the possibility enable desktops later instead # (Desktops provide a different, but functionally similar thing.) # ',m4_ifelse(m4_env(SSO_PAGER),`0',` DeskTopSize 1x1 *FvwmPagerColumns 1',` DeskTopSize 1x'm4_env(SSO_PAGER))) # The stuff on the pager will be 1/25 the full size. DeskTopScale 24 # User overrides for styles and colors can go in the home directory: m4_sinclude(m4_HOME/`.fvwm-include') # # ----------------------- Menus and Functions --------------------------- # # see the man pages and the examples in the files below if you need to # write your own functions. Some of the functions call the pop-ups, # so the the functions should be included after them. m4_include(`/apps/wm/common/system.fvwmrc.menus') m4_include(`/apps/wm/common/system.fvwmrc.menus.hosts') m4_include(`/apps/wm/common/system.fvwmrc.functions') # If you run the FvwmSaveDesk module, it creates the following dot file # NOTE: See below also. m4_sinclude(m4_HOME/`.fvwmdesk') # This function gets called when you first log in. You can use it to start # up some xterms or whatever you like. See man page for examples. Function "InitFunction" # Dont allow "pushing" on the edge of the desktop to allow flipping to # a new page unless the user explicitly turns it on with the menu. TogglePage "I" # # If this is a status-only display, move the mouse cursor to the # lower left corner of the screen to hide it as much as possible. # Presumably there is not even a mouse connected, but it doesn't seem # possible to get rid of the pointer completely. # m4_ifelse(m4_env(SSO_STATUSONLY),`',`',` CursorMove "I" 100 100') # # Here's a hook that allows you to spawn a script from the standard # FVWM InitFunction without having to make a custom ~/.fvwmrc. It # has no effect if you don't have an executable ~/.fvwm-initfunction # Exec "I" exec sh -c "if [ -x m4_HOME/.fvwm-initfunction ]; then exec m4_HOME/.fvwm-initfunction; fi" & # In order to allow the FvwmSaveDesk to work (which it doesnt do very # well anyway) youll have to uncomment this line. Then everytime you # click Desktop->FVWM Modules->Save Desktop, a new StartupFunction will # be created that gets read every time you log in. It can be used to # open a few terminal windows, elm, etc. on login. Works with XEmacs, # but doesnt re-open files you have open. Doesnt work with Netscape. m4_ifelse(m4_env(SSO_SAVEDESK),`',`',`Function "I" StartupFunction') # I use it get rid of my CAPs lock key and make both caps lock and # control send control. (Some programs like emacs complain, but it # works on most terminals.) # Exec "I" exec xmodmap -e 'remove Lock = Caps_Lock' -e 'clear Lock' -e 'add Control = Caps_Lock' # More examples of stuff you could start up here... # Module "I" FvwmBanner # Exec "I" xpmroot /apps/wm/common/backgrounds/darkwood.xpm & # Exec "I" exec xterm -geometry 80x64+0+0 & # Wait "I" xterm # Desk "I" 0 2 # Exec "I" exec xterm # Wait "I" xterm # Desk "I" 0 0 EndFunction # And this one gets called when you "restart/refresh". Function "RestartFunction" Exec "I" exec xlock-kill TogglePage "I" Refresh "I" # Exec "I" xsetroot -solid "#606070709090" EndFunction # This is the menu you get when you click on the background Popup "Root Menu" Title "Root Menu" Exec "Terminal" exec myterm & Popup "Hosts" CFHT_Hosts Popup "Applications" CFHT_Applications Popup "Utilities" CFHT_Utilities # Popup "Utilities (Sun)" CFHT_Utilities_sun Popup "Window Ops" CFHT_Window Ops2 Popup "Desktop" CFHT_Desktop m4_ifelse(m4_env(SSO_PEGASUS),`',`',` Popup "Print" CFHT_Print Popup "Session Setup" Pegasus_Setup') Popup "Exit" CFHT_Quit-Verify EndPopup # # ------------------------------ Tool Bar(s) -------------------------- # *CFHTStuff - - Swallow "asclock" asclock -led "#9090eeee9090" -exe /apps/gnu/bin/plan -12 -shape -position -1-1 & *CFHTStuff Mailbox - Swallow "xbiff" xbiff -bg "#bbbbbbbbc8c8" -geometry -1-1 & *CFHTStuff XLoad - Swallow "xload" xload -nolabel -hl "#00008b8b8b8b" -fg "#000000000000" -bg "#5e5e5e5e6464" -geometry 48x48-1-1 & *CFHTStuff Terminal Monitor.xpm Exec "myterm" myterm & *CFHTStuff Editor text.xpm Exec "Emacs" xemacs & *CFHTStuff Calculator rcalc.xpm Exec "xhpcalc" xhpcalc & *CFHTStuff Viewer xv.xpm Exec "xv" xv -ncols 64 & *CFHTStuff Netscape netscape3.xpm Exec "Netscape" netscape-gold #*CFHTStuff Refresh recycler.xpm Restart "Refresh" fvwm # You can lock the display from the menus, but if you uncomment this you will # get a button on the toolbar that lets you lock also. #*CFHTStuff Lock KeysOnChain.xpm Exec "" xlock -remote -mode blank & *CFHTStuff Exit/Lock KeysOnChain.xpm Popup "CFHT_Quit-Verify" CFHT_Quit-Verify # # add your own applications to the CFHTStuff bar here # #*CFHTStuff ps ps.xpm Exec "ghostview" ghostview & #*CFHTStuff frame word_processor.xpm Exec "FrameMaker" frame & # # or create your own button bar by adding "*GoodStuff" lines here, # and uncomment the line for GoodStuff in Module Startup below... # See the GoodStuff man page for details. # *GoodStuff Quit shutdown.xpm Quit "Quit" *GoodStuff Restart recycler.xpm Restart "Restart" fvwm *GoodStuff Skycat universe.xpm Exec "skycat" skycat & *GoodStuff Frame word_processor.xpm Exec "FrameMaker" frame & # # ---------------------------- Module Startup ------------------------- # *FvwmPagerLabel 0 Pager # Comment this out if you do not want the virtual desktop m4_ifelse(m4_env(SSO_PAGER),`0',`',` Module FvwmPager 0 0') # Do not start any toolbars if SSO_STATUSONLY is defined. m4_ifelse(m4_env(SSO_STATUSONLY),`',` # Comment this out to leave out the button column in the top right Module CFHTStuff # Comment this out to leave out the button row in the top left #Module GoodStuff ') # # ------------------------------- Misc --------------------------------- # # see man page for fvwm for descriptions; backing store options may speed # up performance on X-terminals, but it might use a lot of X-terminal # memory too... DecorateTransients #AppsBackingStore #BackingStore #SaveUnders Cursor 6 94 EdgeScroll 100 100 EdgeResistance 0 75 # Uncomment this if you like having to click on a window to switch focus to it #ClickToFocus m4_ifelse(m4_env(SSO_FOCUS),`click',`ClickToFocus # If click-to-focus is on, you should also redefine "Move-or-Raise" like this: Function "Move-or-Raise" Raise "Motion" Move "Motion" Raise "Click" EndFunction ') SloppyFocus OpaqueMove 100 NoPPosition ClickTime 150 CirculateSkipIcons OpaqueMove 100 m4_ifelse(m4_env(SSO_RAISE),`',`',`AutoRaise m4_env(SSO_RAISE)') # Uncomment this if you like windows to "auto-raise" themselves after 2 seconds #AutoRaise 2000 MWMFunctionHints #MWMHintOverride MWMDecorHints MWMMenus MWMBorders # SLS2x1 is a CFHT modification. It is not critical, but just helps deal # with the "crack" between the two monitors when they are treated as one large # display. If screen width is equal to 2560, assume that we have 2 monitors. # Currently, hookele (TCS) is the only host with this type of display hardware. m4_ifelse(m4_WIDTH,2560,` SLS2x1 *FvwmPagerGeometry +1225-1 IconBox 1360 -64 -1 -1 # Uncomment this if you prefer the toolbar on the left monitor #*CFHTStuffGeometry +1225+1 *FvwmPagerLabel 0 Pager Pager ') # # ----------------------- Mouse & Keyboard Bindings ------------------------ # # This is the final section of your .fvwmrc. It controls the keyboard # and mouse actions that the window manager will use to pop up menus or # perform other actions to your windows. The defaults here are pretty # Motif-compliant, except that Alt + mouse button anywhere on a window # will be handled as if you have just clicked on the title bar, and # Control+arrow keys moves the pager's virtual viewport around. If # these bindings are interfering with some of your applications, or if # you are used to different behavior, you can change almost anything here. # # To make changes, manually copy the file that's included below into # this file and edit the key bindings you want to change. To just # override or supplement a few keys, try adding them after the include # line. In any case, see the included file and the fvwm man pages for # help on the syntax. # # The alternate .medm version gets included if you define SSO_MEDM to # something and prevents fvwm from taking over keys that MEDM wants. m4_ifelse(m4_env(SSO_MEDM),`',` m4_include(`/apps/wm/common/system.fvwmrc.bindings')',` m4_include(`/apps/wm/common/system.fvwmrc.bindings.medm')') # End of .fvwmrc