用户工具

站点工具


software:f:fvwm

设置你自己的 FVWM2

每个人使用电脑的习惯不同,定制自己的窗口管理,能够提高工作效率,增加生活情趣,延年益寿。

有很多窗口管理器可选,为什么选 FVWM2 呢?原因很简单,它的高度可定制性充满了挑战,它的高效性节省时间。

优秀的 KDE 和 Gnome 都太大了,预设的好多应用并不适合我,它们是为初学者准备的,对初学者而言它们是最佳选择。FVWM2 是我尝试过的窗口管理器中最轻的,比 IceWM 还轻,更不必说 Xfce。 它可以空无一物,也可以绚烂多彩,它成为什么样子要看你的喜好和给出的配置。从 startx 到 FVWM2,如果不是我还顺便启动了一个 urxvt,一个 urxvt 的 daemon,conky,Opera 和 Emacs,它几乎是实时完成的。这虽然节省不了多少时间,但让人感觉很爽。

有人说 FVWM2 的配置让人抓狂,的确,凡事都有第一次嘛。一旦定制好了,剩下的幼儿园小盆友都会做,就是拷贝配置文件到 $HOME 下。窗口管理是随意的,快捷键的绑定可以特为你的六指或四指而设。而我是一指禅,点两三下键盘就能启动某个应用程序,把剩下的指力用在 Vim 或 Emacs 里,连鼠标都少用了。

好的 WM 就是可与你的使用习惯高度绑定,你来定制它而非它来塑造你。人如何能成为工具的奴隶?FVWM2 是一匹烈马,它可以为你腾云驾雾,就看你如何驾驭它了。当你“造”出适合你的 FVWM2,它将是独一无二的!当然,生命是短暂的,时间是宝贵的,认为训马太浪费精力的人们不是不可以拿来主义,因为 Xfce,甚至 KDE、Gnome,也是优秀的。

我认为 UNIX 文化是包容的。选择适合自己的工具才是聪明的,例如,你不必因为用了 Opera 而不是 Mutt 来收发邮件而感到不自在。所以,只有当 FVWM2 适合你时它才是一个 workhorse。

然而,一旦你厌倦了千篇一律的操作,尝试一下 FVWM2 也未尝不可。这里,我提供了我的 FVWM2,欢迎传播并改进,无需通知我。本设置借鉴了很多前辈和牛人的经验,如果用到了您的智慧之作,我脱帽致敬。


效果图


一点小小的说明

安装 FVWM2 的过程很简单,去 /usr/ports/x11-wm/fvwm2 里 make install clean 就搞定了。接下来的步骤也不需要高中学历。

  1. 把下面的文件存为 ~/.fvwm/.fvwm2rc
  2. 去 FVWM 的官方网站下载窗口装饰条,具体地址是 http://www.fvwm.org/screenshots/windowdecors/
  3. 解压缩后把它存放在 ~/.fvwm/windowdecors/,例如我选的风格是 brushedmetal,结果是 ~/.fvwm/windowdecors/brushedmetal。当然也可以存放在别处,那就要在 .fvwm2rc 里做相应的修改了。
  4. 菜单里的图标可以自己选配,网上能搜出好多漂亮的图标,我用了一些 KDE 的图标。在 .fvwm2rc 文件里,告诉 fvwm2 图标存放在何处。
ImagePath       /usr/X11R6/share/fvwm/KDEicons/32x32/apps:+:/usr/X11R6/share/fvwm/KDEicons/32x32/actions

操作提示

  • 按 Pause/Break 键,弹出菜单。
  • 总共有13个 pages,分别记作 ` 1 2 3 4 5 6 7 8 9 0 - =。譬如,要切换到 page 1,只需按 Ctrl + 1。
  • 我设置启动桌面系统时,自动运行 Emacs、Opera 和 Vim,分别放在 page 0、= 和 `。可以根据你的需要修改设置。

.fvwm2rc 文件

###############################################
## Purpose        : The setting of FVWM2     ##
## File           : $HOME/.fvwm/.fvwm2rc     ##
## Author         : IOU                      ##
## Date           : Jan 18, 2005             ##
## Function keys                             ##
## ctrl + 1 -> 0  : Change to different page ##
## Pause/Break    : Popup RootMenu           ##
## Alt/Tab        : alternate same page only ##
###############################################

OpaqueMoveSize  unlimited	
EdgeResistance  -1
Style "*"       EdgeMoveDelay 250
Style "*"       EdgeMoveResistance 20	
EdgeScroll      0	0       # Never scroll at edge of screen
XORValue        1234        # Color to use for move xors.
DeskTopSize     1x1         # Desk size is screen size * 12
Style "*"       MinOverlapPlacement, ReCaptureHonorsStartsOnPage
DefaultFont     "-misc-fixed-medium-r-normal-*-16-*-*-*-*-*-iso8859-1,
                 -wenquanyi-*-medium-r-normal-*-16-*-*-*-*-*-*-*"
Style "*"       SnapAttraction	20  All Screen
ImagePath       /usr/X11R6/share/fvwm/KDEicons/32x32/apps:+:/usr/X11R6/share/fvwm/KDEicons/32x32/actions
DestroyDecor    Default
AddToDecor      Default

########################
### Setting of color ###
########################
CleanupColorsets

###################
### BottomPanel ###
###################
Colorset 0 fg white, bg gray, fgsh #444444, sh #000066, hi blue

############
### Menu ###
############
Colorset 1 fg white, bg gray, fgsh black, sh #666666, hi #bbbbff, Transparent buffer, tint #bbbbff 50

#######################
### Active menuitem ###
#######################
Colorset 2 fg yellow, bg gray, fgsh #444444, sh #666666, hi #bbbbff, Transparent buffer, tint #bbbbff 50

###########################
### PanelBar, Icontitle ###
###########################
Colorset 3 RootTransparent, fg white, fgsh black, bg gray, fgsh #444444, sh #000066 , hi blue

######################################
### Title bar + buttons - inactive ###
######################################
Colorset 4 NoShape, RootTransparent Buffer, Tint #f6f6f6 20, bg #909090

##########################
### Title bar - active ###
##########################
Colorset 5 NoShape, RootTransparent Buffer, Tint #bbbbff 50, bg #909090

###########################
### Some default styles ###
###########################
+ Style "*"     FvwmButtons
+ Style "*"     SloppyFocus, DecorateTransient
+ Style "*"     BorderWidth 1, HandleWidth 3
+ Style "*"     NoPPosition
+ Style "*"     WindowShadeShrinks, WindowShadeSteps 20
+ Style "*"     ResizeOpaque
+ Style "*"     Font "-misc-fixed-medium-r-*-*-12-*-*-*-*-*-iso8859-1,
                      -wenquanyi-*-medium-r-*-*-12-*-*-*-*-*-*-*"

#################################
### The setting of menu style ###
#################################
+ MenuStyle *   !HilightBack, ActiveFore, MenuColorset 1, ActiveColorset 2
+ MenuStyle *   PopupImmediately, PopdownImmediately
+ MenuStyle *   Hilight3DThickness -2, BorderWidth 2
+ MenuStyle *   Animation
+ MenuStyle *   Font "Shadow=1 0 SE:-b&h-lucidabright-demibold-r-normal--13-*-*-*-*-*-iso8859-1,
                                    -wenquanyi-*-medium-r-*-*-13-*-*-*-*-*-*-*"
+ MenuStyle *   PopupOffset -3 100, !TitleWarp
+ MenuStyle *   TitleUnderlines2, SeparatorsLong, TrianglesRelief
+ MenuStyle *   !AutomaticHotkeys, DoubleClickTime 800
+ MenuStyle *   PopupAsSubmenu, HoldSubmenus, SubmenusRight
+ MenuStyle *   ItemFormat "%.4s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|"
+ BusyCursor    DynamicMenu True

####################
### Sticky stuff ###
####################
+ Style	"Fvwm*"     !Title, !Handles, Sticky, WindowListSkip
+ Style "FvwmPager" !Borders, StaysOnBottom, FixedPosition, FixedSize
+ Style "urxvt*"    !Title, !Handles, BorderWidth 0, StaysOnBottom
+ Style "panel"     !Title, !Handles, Sticky, WindowListSkip
+ Style "xlock"     !Handles, Sticky, StaysOnTop, WindowListSkip

############################################
### Things which start on specific desks ###
############################################
+ Style "xdvi*"		 StartsOnPage 1, !Title, SkipMapping
+ Style "xfig"	     StartsOnPage 2
+ Style "djview*"	 StartsOnPage 3
+ Style "MPlayer*"	 StartsOnPage 4, !Title, !Handles, WindowListSkip
+ Style "beep-media-player"	StartsOnPage 9, !Title, !Handles
+ Style "gimp"		 StartsOnPage 5
+ Style "qgo"		 StartsOnPage 6
+ Style "xboard"	 StartsOnPage 7
+ Style "maxima"	 StartsOnPage 8
+ Style "Opera*"	 StartsOnPage 10, SkipMapping
+ Style "gv"		 StartsOnPage 11
+ Style "Emacs*"	 StartsOnPage 12, !Title, !Handles, BorderWidth 0

###############################
### Stuff to do at start-up ###
###############################
DestroyFunc     "InitFunction"
AddToFunc       "InitFunction"
+ I Module      FvwmAuto 100
+ I Module      FvwmPager 0 12
+ I Exec exec	fvwm-root --dither --retain-pixmap /usr/local/share/images/wallpapers/reaction.xpm
+ I Exec exec   /usr/local/bin/remind -gaa /backup/.reminders > /tmp/.VoiceRemind
#+ I Exec exec   /usr/local/bin/nasd -local -b
+ I Exec exec	xscreensaver -no-splash
+ I Exec exec	xset b off
+ I Exec exec	conky -d
+ I Exec exec	tpb -d
+ I Exec exec	urxvc
+ I Exec exec	opera
#+ I Exec exec	emacs
+ I Exec exec	flite /tmp/.VoiceRemind

DestroyFunc     "RestartFunction"
AddToFunc       "RestartFunction"
+ I Module      FvwmAuto 100
+ I Module      FvwmPager 0 12
+ I Exec exec   fvwm-root --dither --retain-pixmap /usr/local/share/images/wallpapers/Shade.xpm

#####################################################
### This menu start up some very common utilities ###
#####################################################
DestroyMenu                     RootMenu
AddToMenu                       RootMenu@/usr/local/share/images/menu/ergo.xpm@
+ %konsole.png%"u&rxvt/MinMax"   Exec exec urxvtc
+ ""                            Nop
+ %Math.png%"Ma&thematics"      Popup "Math"
+ %Image.png%"&Image Viewer"    Popup "Image"
+ %Network.png%"&Network"       Popup "Network"
+ %Audio.png%"&Multimedia"      Popup "Multimedia"
+ %utilites.png%"&Affixture"    Popup "Affixture"
+ %Xfigure.png%"&Xtools"        Popup "Xtools"
+ ""                            Nop
+ %shutdown.png%"Exit &Fvwm"    Popup "Quit-Verify"

AddtoMenu                       "Math"
+ %emacs.png%"&Emacs"           Exec exec emacs
+ %edit.png%"&Idle"             Exec exec idle
+ %Xmaxima.png%"&Maxima"        Exec exec xmaxima

AddtoMenu                       "Image"
+ %ksirtet.png%"&DjView"        Exec exec djview
+ %gimp.png%"&Gimp"             Exec exec gimp -s
+ %gv.png%"G&v"                 Exec exec gv

AddtoMenu                       "Network"
+ %gnuchess.png%"&Chess"        Exec exec xboard
#+ %kfouleggs.png%"&Emesene"     Exec exec emesene
+ %Qgo.png%"&Go"                Exec exec qgo
+ %Opera.png%"&Opera"           Exec exec opera

AddtoMenu                       "Multimedia"
#+ %Beast.png%"&Ardour"          Exec exec ardour2
+ %BMP.png%"&BMP"               Exec exec beep-media-player
+ %xine.png%"M&player"          Exec exec gmplayer
#+ %kword.png%"&Reciteword"    Exec exec reciteword

AddtoMenu                       "Affixture"
+ %viewmag+.png%"&Magnifier"    Exec exec xmag -source 450x300 -mag 2
#+ %StarDict.png%"&StarDict"     Exec exec stardict
+ %demo.png%"&WindowList"       WindowList

AddtoMenu                       "Xtools"
+ %kformula.png%"X&dvi"         Exec exec xdvi -expertmode 0 -s 5
+ %Xfig.png%"X&fig"             Exec exec xfig -geometry 1018x705+0+0
+ %xpdf.png%"X&pdf"             Exec exec xpdf

#####################################################
### This menu allows you to quit, restart the WM. ###
#####################################################
DestroyMenu                     "Quit-Verify"
AddToMenu                       "Quit-Verify"
+ %reload.png%"&Restart"        Restart fvwm2
+ %ok.png%"&Yes"                Quit

###############################################
### A trimmed down version of "Window Ops", ###
### good for binding to decorations         ###
###############################################
DestroyFunc		 "MoveToDeskWith"
AddToFunc		 "MoveToDeskWith"
+ I	MoveToDesk	 $0 $1
+ I	Desk		 $0 $1

#################################################################
### Would be nice to use the function keys for this, but      ###
### it would seem one needs to unbind them temporarily        ###
### for this to work, and that's a hassle I can't be bothered ###
### with for the time being. (i.e. not got round to it.)      ###
#################################################################
DestroyMenu      "move_with_window_to_desk"
AddToMenu        "move_with_window_to_desk"
+ "Desk &1" 	 MoveToDeskWith 0 1
+ "Desk &2"   	 MoveToDeskWith 0 2
+ "Desk &3"   	 MoveToDeskWith 0 3
+ "Desk &4"   	 MoveToDeskWith 0 4
+ "Desk &5"   	 MoveToDeskWith 0 5
+ "Desk &6"   	 MoveToDeskWith 0 6
+ "Desk &7"   	 MoveToDeskWith 0 7
+ "Desk &8"   	 MoveToDeskWith 0 8
+ "Desk &9"   	 MoveToDeskWith 0 9
+ "Desk &0"  	 MoveToDeskWith 0 10

DestroyMenu 	 "send_window_to_desk"
AddToMenu        "send_window_to_desk"
+ "Desk &1"      MoveToDesk 0 1
+ "Desk &2"   	 MoveToDesk 0 2
+ "Desk &3"   	 MoveToDesk 0 3
+ "Desk &4"   	 MoveToDesk 0 4
+ "Desk &5"   	 MoveToDesk 0 5
+ "Desk &6"   	 MoveToDesk 0 6
+ "Desk &7"   	 MoveToDesk 0 7
+ "Desk &8"   	 MoveToDesk 0 8
+ "Desk &9"   	 MoveToDesk 0 9
+ "Desk &0"  	 MoveToDesk 0 10

#     Button	Context Modifi 	Function
Mouse 1		R   	A       Menu "RootMenu" Nop
Mouse 2		RFST   	A       Menu "Window" Nop
Mouse 3		R    	A      	WindowList

#     Button	Context Modifi 	Function
Mouse 0		1    	A      	Menu "Window"
Mouse 0		2    	A     	Maximize 100 grow
Mouse 0		4    	A     	Iconify

##################################################
### Resize windows if you grab'em by the edges ###
##################################################
Mouse 1		FS	A	Resize

#####################################################
### Button 2 in the title bar rolls the window up ###
#####################################################
Mouse 2		T	A	WindowShade

#############################
### Keyboard accelerators ###
#############################
Key Tab		A   C   RaiseLower
Key grave 	A   C   Desk 0 0
Key 1		A   C   Desk 0 1
Key 2		A   C   Desk 0 2
Key 3		A   C   Desk 0 3
Key 4		A   C   Desk 0 4
Key 5		A   C   Desk 0 5
Key 6		A   C   Desk 0 6
Key 7		A   C   Desk 0 7
Key 8		A   C   Desk 0 8
Key 9		A   C   Desk 0 9
Key 0		A   C   Desk 0 10
Key minus	A   C   Desk 0 11
Key equal	A   C   Desk 0 12
Key Escape  A   C   Close "Window"
Key Pause   A   N   PopUp "RootMenu"

############################
### Fvwm pagers settings ###
############################
*FvwmEventCmd       Echo
*FvwmEvent          focus_change "focus change"
*FvwmEvent          raise_window "raise window"
*FvwmPagerBack      black
*FvwmPagerWindowColors	gray30 black white #004680
#*FvwmPagerWindowColors	#5070a8 #003264 black #004680
*FvwmPagerFore      gray30
*FvwmPagerBalloons
*FvwmPagerMiniIcons
*FvwmPagerHilight   #004680
*FvwmPagerFont      "-adobe-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1,
                     -wenquanyi-*-medium-r-normal-*-12-*-*-*-*-*-*-*"

##########################
### Fvwm page geometry ###
##########################
*FvwmPagerGeometry	1025x45+5-0
*FvwmPagerLabel 0	"`: Vim"
*FvwmPagerLabel 1	"1: Xdvi"
*FvwmPagerLabel 2	"2: Xfig"
*FvwmPagerLabel 3	"3: Djview"
*FvwmPagerLabel 4	"4: Mplayer"
*FvwmPagerLabel 5	"5: Gimp"
*FvwmPagerLabel 6	"6: GO"
*FvwmPagerLabel 7	"7: Chess"
*FvwmPagerLabel 8	"8: Maxima"
*FvwmPagerLabel 9	"9: Music"
*FvwmPagerLabel 10	"0: Opera"
*FvwmPagerLabel 11	"-: Gv"
*FvwmPagerLabel 12	"=: Emacs"
*FvwmPagerSmallFont	"-adobe-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-1,
                         -wenquanyi-*-medium-r-normal-*-14-*-*-*-*-*-*-*"


##################################
### All about the windowlister ###
##################################
*FvwmWinListLeftJustify
*FvwmWinListUseSkipList
*FvwmWinListUseIconNames

*FvwmWinListMinWidth  700
*FvwmWinListMaxWidth  770
*FvwmWinListGeometry  +0-0
*FvwmWinListBack	  black
*FvwmWinListFore	  #004680
*FvwmWinListFocusFore #004680
*FvwmWinListFocusBack #004680
*FvwmWinListFont	  "-misc-fixed-medium-r-*-*-12-*-*-*-*-*-iso8859-1,
                           -wenquanyi-*-medium-r-normal-*-12-*-*-*-*-*-*-*"

*FvwmWinListAction	  Click1 Iconify -1, Focus
*FvwmWinListAction	  Click2 Iconify
*FvwmWinListAction	  Click3 Module "FvwmIdent" FvwmIdent
*FvwmScrollFore	      Azure4
*FvwmScrollBack       MidnightBlue

##########################
### Animation Settings ###
##########################
*FvwmAnimateEffect	 Random
*FvwmAnimateWidth	 0
*FvwmAnimateColor	 dodgerblue

#####################
### Window decors ###
#####################
Read $[HOME]/.fvwm/windowdecors/brushedmetal/config

###################
### End of file ###
###################

config 的设置

#########################################################
## Purpose : fvwm window decoration description        ##
## File    : ~/.fvwm/windowdecors/brushedmetal/config  ##
## Author  : IOU                                       ##
## Date    : Sep-24-2006                               ##
#########################################################

SetEnv COLOR      rgb:80/80/80
SetEnv FG_COLOR   rgb:d0/d0/d0
SetEnv FG_HICOLOR black
SetEnv HICOLOR	  gray
SetEnv MaxDeskNumber 1
SetEnv XPMPath $[HOME]/.fvwm/windowdecors/brushedmetal/images

###########################
### Brushed Metal Decor ###
###########################
DestroyDecor BrushedMetalDecor
AddToDecor	 BrushedMetalDecor
+ TitleStyle Centered Height 15
+ TitleStyle ActiveUp          TiledPixmap $[XPMPath]/title-activeup.xpm -- Flat 
+ TitleStyle ActiveDown        TiledPixmap $[XPMPath]/title-activedown.xpm -- Flat
+ TitleStyle Inactive          TiledPixmap $[XPMPath]/title-inactive.xpm -- Flat
+ TitleStyle ToggledActiveUp   TiledPixmap $[XPMPath]/title-activeup.xpm -- Flat
+ TitleStyle ToggledActiveDown TiledPixmap $[XPMPath]/title-activedown.xpm -- Flat
+ TitleStyle ToggledInactive   TiledPixmap $[XPMPath]/title-inactive.xpm -- Flat

+ ButtonStyle 1 ActiveUp   Pixmap $[XPMPath]/options-activeup.xpm -- Flat
+ ButtonStyle 1 ActiveDown Pixmap $[XPMPath]/options-activedown.xpm -- Flat
+ ButtonStyle 1 Inactive   Pixmap $[XPMPath]/options-inactive.xpm -- Flat

+ ButtonStyle 2 ActiveUp   Pixmap $[XPMPath]/close-activeup.xpm -- Flat
+ ButtonStyle 2 ActiveDown Pixmap $[XPMPath]/close-activedown.xpm -- Flat
+ ButtonStyle 2 Inactive   Pixmap $[XPMPath]/close-inactive.xpm -- Flat

+ ButtonStyle 3 ActiveUp   Pixmap $[XPMPath]/titleleft-activeup.xpm -- Flat
+ ButtonStyle 3 ActiveDown Pixmap $[XPMPath]/titleleft-activedown.xpm -- Flat
+ ButtonStyle 3 Inactive   Pixmap $[XPMPath]/titleleft-inactive.xpm -- Flat

+ ButtonStyle 4 ActiveUp   Pixmap $[XPMPath]/maximize-activeup.xpm -- Flat
+ ButtonStyle 4 ActiveDown Pixmap $[XPMPath]/maximize-activedown.xpm -- Flat
+ ButtonStyle 4 ToggledActiveUp Pixmap $[XPMPath]/maximize-activedown.xpm -- Flat
+ ButtonStyle 4 ToggledActiveDown Pixmap $[XPMPath]/maximize-activedown.xpm -- Flat
+ ButtonStyle 4 Inactive   Pixmap $[XPMPath]/maximize-inactive.xpm -- Flat

+ ButtonStyle 6 ActiveUp   Pixmap $[XPMPath]/iconify-activeup.xpm -- Flat
+ ButtonStyle 6 ToggledActiveUp Pixmap $[XPMPath]/iconify-activedown.xpm -- Flat
+ ButtonStyle 6 ActiveDown Pixmap $[XPMPath]/iconify-activedown.xpm -- Flat
+ ButtonStyle 6 Inactive   Pixmap $[XPMPath]/iconify-inactive.xpm -- Flat

+ ButtonStyle 8 ActiveUp   Pixmap $[XPMPath]/titleright-activeup.xpm -- Flat
+ ButtonStyle 8 ActiveDown Pixmap $[XPMPath]/titleright-activedown.xpm -- Flat
+ ButtonStyle 8 Inactive   Pixmap $[XPMPath]/titleright-inactive.xpm -- Flat

+ ButtonStyle All - Clear
+ ButtonStyle 1 - MWMDecorMenu
+ ButtonStyle 4 - MWMDecorMax
+ ButtonStyle 6 - MWMDecorMin

+ BorderStyle Active   Colorset 
+ BorderStyle Inactive Solid $[HICOLOR] -- HiddenHandles NoInset Raised
+ BorderStyle Active   Solid $[COLOR]   -- HiddenHandles NoInset Raised

Style BrushedMetalStyle \
    UseDecor BrushedMetalDecor, \
    Colorset, BorderColorset, \
    HilightColorset, HilightBorderColorset, \
    ForeColor $[FG_COLOR], BackColor $[COLOR], \
    HilightFore $[FG_HICOLOR], HilightBack $[HICOLOR], \
    Button 1, Button 2, Button 3, Button 4, Button 6, Button 8

#############
### Menus ###
#############
DestroyMenu		MoveWindowToPageMenu
AddToMenu		MoveWindowToPageMenu "Move window to another page" Title
+ "Desk left"	MoveToDesk  0 -1 0 $[MaxDeskNumber]
+ "Desk right"	MoveToDesk  0 +1 0 $[MaxDeskNumber]
+ ""			Nop
+ "Page up"		MoveToPage +0p -1p
+ "Page left"	MoveToPage -1p  0p
+ "Page right"	MoveToPage +1p  0p
+ "Page down"	MoveToPage +0p +1p

DestroyMenu		MaximizeMenu
AddToMenu		MaximizeMenu "Maximize" Title
+ "Maximize"	Maximize 100 100
+ "Maximize vertical"	Maximize 0 100
+ "Maximize horizontal"	Maximize 100 0
+ ""			Nop
+ "Grow"		Maximize True grow grow
+ "Grow vertical"	Maximize True 0 grow
+ "Grow horizontal"	Maximize True grow 0
+ ""			Nop
+ "Iconify"		Iconify

DestroyMenu		IconifyMenu
AddToMenu		IconifyMenu "Iconify" Title
+ "Iconify"		Iconify
+ ""			Nop
+ "Stick all icons"	All (Currentpage, Iconic, CirculateHit) Stick on
+ "Stick all windows"	All (Currentpage, !Iconic, CirculateHit) Stick on
+ ""			Nop
+ "Unstick all icons"	All (Currentpage, Iconic, CirculateHit) Stick off
+ "Unstick all windows"	All (Currentpage, !Iconic, CirculateHit) Stick off

DestroyMenu		WindowOptionsMenu
AddToMenu		WindowOptionsMenu
+ "Move"		Move
+ "Resize"		Resize
+ "&Shade"		WindowShade
+ "&Iconify"		Iconify
+ "(Un)Stick"		Stick
+ "&Maximize"		Maximize 100 grow
+ "Se&nd to desk"	Popup send_window_to_desk
+ "Mo&ve to desk"	Popup move_with_window_to_desk
+ ""				Nop
+ "&Destroy"		Destroy
+ "&Close"			Close

DestroyMenu DeleteMenu
AddToMenu	DeleteMenu
+ "Delete"	Delete
+ ""		Nop
+ "Kill"	Destroy

#################
### Functions ###
#################
DestroyFunc ResizeOrRaiseOrLowerFunc
AddToFunc	ResizeOrRaiseOrLowerFunc C Raise
+ M Resize
+ D Lower

DestroyFunc MoveOrRaiseOrLowerFunc
AddToFunc	MoveOrRaiseOrLowerFunc
+ I Raise
# + I Current (!Raised) Raise
# + C TestRc (NoMatch) Lower
+ M Move
+ D Maximize 100 100

SetEnv APP_NAME XTerm
SetEnv APP_NAME *
Style $[APP_NAME] UseStyle BrushedMetalStyle

#########################
### mouse definitions ###
#########################
Mouse ($[APP_NAME]) 1 F A Function ResizeOrRaiseOrLowerFunc
Mouse ($[APP_NAME]) 2 F A Menu WindowOptionsMenu Nop
Mouse ($[APP_NAME]) 3 F A RaiseLower

Mouse ($[APP_NAME]) 1 S A Function ResizeOrRaiseOrLowerFunc
Mouse ($[APP_NAME]) 2 S A Menu WindowOptionsMenu Nop
Mouse ($[APP_NAME]) 3 S A RaiseLower

########################################
### title bar + 2 decoration buttons ###
########################################
Mouse ($[APP_NAME]) 1 T38 A Function MoveOrRaiseOrLowerFunc
Mouse ($[APP_NAME]) 2 T38 A WindowShade
Mouse ($[APP_NAME]) 3 T38 A RaiseLower

############################
### Window title buttons ###
############################
Mouse ($[APP_NAME]) 1 1 A Menu WindowOptionsMenu Delete
Mouse ($[APP_NAME]) 2 1 A Stick
Mouse ($[APP_NAME]) 3 1 A Menu MoveWindowToPageMenu

Mouse ($[APP_NAME]) 1 6 A Iconify on
Mouse ($[APP_NAME]) 2 6 A All (CurrentPage,!Fvwm*B*) Iconify on
Mouse ($[APP_NAME]) 3 6 A Menu IconifyMenu Iconify

Mouse ($[APP_NAME]) 1 4 A Maximize 100 100
Mouse ($[APP_NAME]) 2 4 A Maximize True grow grow
Mouse ($[APP_NAME]) 3 4 A Menu MaximizeMenu

Mouse ($[APP_NAME]) 1 2 A Delete
Mouse ($[APP_NAME]) 2 2 A Nop
Mouse ($[APP_NAME]) 3 2 A Menu DeleteMenu

###################
### End of file ###
###################

.xinitrc 文件

将此文件存放于 $HOME/.xinitrc

########################################                                                                         
## Purpose : Configuration for startx ## 
## File    : $HOME/.xinitrc           ##
## Date    : Sep-01-2006              ##
## Author  : IOU                      ##
########################################

export LANG=zh_CN.UTF-8
export LC_CTYPE=zh_CN.UTF-8
export XMODIFIERS=@im=fcitx
urxvtd -q -f -o
emacs --daemon
exec fcitx &
exec fvwm2

##############################
## Kill processes by name   ## 
## before quitting X-window ##
##############################
killall conky
killall fcitx
killall remind
killall tpb 
killall opera
killall xinit
killall emacs
killall fvwm2

看看最后的效果

startx 启动 FVWM2,开了 urxvt 和 emacs 的 daemon。再开 urxvt 时用 urxvtc(客户端),再开 emacs 时用 emacsclient。下例,开了三个 urxvtc,一个 emacsclient,一个 opera,一个 gimp,内存使用情况如下。

占内存较多的应用依次是:opera,xorg,gimp,fcitx,emacs,conky,urxvtd,……,多数都小于 50M。

/data/vhosts/wiki-data/pages/software/f/fvwm.txt · 最后更改: 2012/01/27 06:42 由 IOU