QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 710|回复: 0

有关fvwm.rc配置文件的问题,Fvwm高手请进来!

[复制链接]
发表于 2004-5-2 14:40:42 | 显示全部楼层 |阅读模式
我的机子显卡4M,跑gnome太慢了,想用fvwm,于是分析的一些配置文件,但是还是有一些地方不太明白,请给我指点一下!
具体的文件在:http://ikaro.homepage.dk/fvwm/files/fvwm2rc.html

SetEnv              fvwm_image_path $[HOME]/
SEtEnv              MINI_ICONS_DIR $[HOME]/.icons/fvwm
SetEnv              fvwm_wallpaper_dir /home/ikaro/.fvwm/images/wallpapers
SetEnv              fvwm_icon_size 96
这里的环境变量好象没代换呀
IgnoreModifiers     L25

CursorStyle root    top_left_arrow black red
SnapAttraction      3 SameType
EdgeScroll          0 0
EdgeThickness       1

MoveThreshold       3
OpaqueMoveSize      0
HideGeometryWindow  never
BugOpts             FlickeringMoveWorkaround Off
SnapAttraction      5 Windows Screen
SnapGrid            1 1
EwmhBaseStruts      0 0 26 0
上面的命令不明百,需要解释一下 :-)
#===============================================
# Root menu - Window decorations
#===============================================
#read "fvwmtabrc"
DestroyFunc FuncFvwmDecorBackground
AddToFunc   FuncFvwmDecorBackground


上面的DestroyFunc AddToFunc是不是矛盾?
+ I TitleStyle AllActive   TiledPixmap theme/wtitle.png
+ I TitleStyle AllInactive TiledPixmap theme/wtitle.png
+ I ButtonStyle All Simple -- UseTitleStyle
FuncFvwmDecorBackground



我知道+表示重复上面的命令,放在一起就有些不明百了

Style "*" Button 1, Button 2, Button 3, Button 5, GrabFocusOff



这里定义了5个,鼠标不是只有三个吗?
+ I FuncFvwmDecorBackground
AddButtonStyle 1 \
    ActiveUp   (Pixmap theme/focus.png   -- flat) \
    ActiveDown (Pixmap theme/close-pressed.png -- flat) \
    Inactive   (Pixmap theme/focus.png   -- flat)


这里是不是鼠标的在什么状态下的不同行为?

AddToFunc   FuncFvwmReloadDecor
+ I BorderStyle Simple -- HiddenHandles NoInset
+ I TitleStyle  -- Flat
+ I ButtonStyle All -- Flat
FuncFvwmReloadDecor

定义函数的时候是不是结尾要加上函数名?

Colorset 0 fg #000000, fgsh #c8cfd7, bg #34639c, hi #ffffff, sh #c8cfd7, Translucent #ffffff 90
Colorset 1 fg #000000, fgsh #c8cfd7, bg #ffffff, hi #ffffff, sh #ffffff
MenuStyle * Hilight3DThin, PopupOffset +0 100
MenuStyle * Font "Shadow=1 b bl r br r ft:Lucida Grande:bold:pixelsize=12:minspace=True"
MenuStyle * MenuColorset 0, HilightBack, ActiveColorset 1
MenuStyle * BorderWidth 1, TitleUnderlines2, SeparatorsLong, Animation, TrianglesSolid
MenuStyle * ItemFormat "%.2|%.5i%.5l%.5i%2.3>%2|"
MenuStyle * AutomaticHotKeys


上面定义的是不是菜单的行为,是根菜单,还是应用程序上的菜单?颜色的定义是不是16位的?


ColormapFocus FollowsFocus
style * Colorset 10, HilightColorset 9
Style * Font "Shadow=1 b bl r br r ft:Lucida Grande:bold:pixelsize=12:minspace=True"
Style * IconBox 60 250 100 -15, SloppyFocus, MouseFocusClickRaises
Style * SmartPlacement, WindowShadeSteps 20, ResizeOutLine
Style * Button 1, Button 2, Button 4, Button 6, GrabFocusOff
Style * BorderWidth 2, HandleWidth 2
Style * NoIconTitle
TitleStyle Height 20

Colorset 9 fg #000000, bg #ffffff, fgsh #c8cfd7, hi #ffffff, sh #c8cfd7, RootTransparent, Tint #ffffff 60
Colorset 10 fg #c6c6c6, bg #ffffff, fgsh #c8cfd7, hi #ffffff, sh #718794, RootTransparent, Tint #ffffff 60
Colorset 11 fg #627283, bg #ffffff, fgsh #c8cfd7, hi #ffffff, sh #c8cfd7, RootTransparent, Tint #ffffff 82, IconAlpha 70


上面的这些东西又是定义那些地方的?



#the rest
Style *             DecorateTransient
Style *             ResizeOutLine
Style FvwmScript-Quit MiniIcon exit.png
Style *             NoIcon

上面应该是应用程序的一些行为把?


#=================================================
# Modules configuration
#=================================================

DestroyModuleConfig FvwmEvent: *
DestroyModuleConfig FvwmProxy: *

这里的Destroy,和Addfuc的用法还是比较糊涂的


*FvwmProxy: Font "xft:snap"
*FvwmProxy: ProxyMove true

# Frame, Lines, Flip, Turn, Twist, Random
DestroyModuleConfig FvwmAnimate: *
*FvwmAnimate: Effect Flip
*FvwmAnimate: Delay 3
*FvwmAnimate: Iterations 50
*FvwmAnimate: Width 2

#TogleDecor
DestroyFunc ToggleDecor
AddToFunc ToggleDecor
+ I State 1 toggle
+ I Current (State 1) WindowStyle !Borders, NoTitle
+ I TestRc (NoMatch) WindowStyle Borders, Title

DestroyFunc my_dbltab2
AddToFunc   my_dbltab2
+ I WindowListFunc
DestroyFunc my_dbltab_prev
AddToFunc   my_dbltab_prev
+ I Prev my_dbltab2

DestroyFunc  WindowListFunc
AddToFunc    WindowListFunc
+  I Function deiconify-func Raise
+  I FlipFocus
+  I WarpToWindow 50 50

DestroyFunc  deiconify-func
AddToFunc    deiconify-func
+  I Iconify false
+  I WindowShade false
+  I $0



# AltTab
Key Tab A M WindowList Root c c CurrentAtEnd, IconifiedAtEnd, NoGeometry, NoDeskSort, SelectOnRelease Alt_L my_dbltab_prev
Key Tab A CM    WindowList Root c c CurrentAtEnd, IconifiedAtEnd, NoGeometry, OnlyListSkip, SelectOnRelease




DestroyFunc JefklakScroll
AddToFunc JefklakScroll I PipeRead 'case $0 in \
      up) test $[page.ny] -eq $$(($[desk.pagesy]-1)) -a $[page.nx] -lt $$(($[desk.pagesx]-1)) \
         && echo GotoPage +1p 0 \
         || echo GotoPage 0p +1p;; \
      down) test $[page.ny] -eq 0 -a $[page.nx] -gt 0 \
         && echo GotoPage -1p $$(($[desk.pagesy]-1)) \
         || echo GotoPage 0p -1p;; \
   esac'

上面定义的这个函数是干什么用的?,还象是bash脚本?



DestroyModuleConfig FvwmIdent: *
*FvwmIdent: Back Black
*FvwmIdent: Fore #f1f1f1
*FvwmIdent: Font "xft:snap;-artwiz-snap-*-r-*-*-*-*-*-*-*-*-iso8859-1"

DestroyFunc FuncFvwmMenuDirectory
AddToFunc FuncFvwmMenuDirectory I PipeRead 'fvwm-menu-directory --dir "$0" --exec-file ^"emacs" --xterm=" xterm -e" --icon-dir=folder.png --icon-title=folder.png --icon-file=folder.png

DestroyMenu MenuFvwmRoot

在起动rootmenu,的时候为什么还要用DestroyMenu?




#================================
# Extra menus
#================================

DestroyMenu Local-Dirs
AddToMenu Local-Dirs
AddToMenu Local-Dirs MissingSubmenuFunction FuncFvwmMenuDirectory
+ %root.png%"Root dir"     Popup /
+ %home.png%"Home dir"        Popup ~
+ %mplayer.png%"Movies"     Popup /home/ftp/movies
+ %Music.png%"Music"        Popup /home/ftp/mp3
+ "" nop

这些额外的菜单是干什么的,显示的时候是在那离显示?




AddToFunc Maximize-Func M Maximize 0 100
+ C Maximize       0 80
+ D Maximize       100 100

AddToFunc Move-or-Iconify I Raise
+ M Move
+ D Iconify

AddToFunc Resize-or-Raise I Raise
+ M Resize
+ D Lower

上面这些函数是做什么的,具体的行为是什么?


DestroyFunc Maximize-Func
AddToFunc Maximize-Func M   Maximize 0 98
+ C Maximize 0 100
+ D Maximize 100 98

Colorset 2 fg #ffffff, bg #5c6d82, hi #ffffff, sh #5c6d82
Colorset 6 fg #77b3d5, bg #ffffff, RootTransparent, Tint #77b3d5 20
Colorset 3 fg #000000, bg #d2cdb4, fgsh #ffffff, Transparent, Tint #77b3d5 70

AddToFunc StartFunction I UpdateCalendar
Style FvwmCalendar BorderWidth 0, Handlewidth 0, NoTitle, Layer 0, WindowListSkip, CirculateSkip, Sticky
Colorset 32 fg #a6a6a6, bg #000000, fgsh #000000, RootTransparent
DestroyModuleConfig FvwmCalendar: *
*FvwmCalendar: Columns 62
*FvwmCalendar: Colorset 32
*FvwmCalendar: Rows 3
*FvwmCalendar: Frame 0
#*FvwmCalendar: Font "Shadow=1 b bl r br r ft:Bitstream Vera Sans Mono:size=7"

下面的定义日历显示怎么这么多啊,我都高浑了。


*FvwmCalendar: Font "Shadow=0 b bl r br r ft:Lucida Grande:bold:pixelsize=12:minspace=True"
*FvwmCalendar: (62x1, Action(Mouse 0) Menu MenuFvwmRoot, Id month, Title(Left) "Fvwm Calendar")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d1, Title "1")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d2, Title "2")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d3, Title "3")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d4, Title "4")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d5, Title "5")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d6, Title "6")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d7, Title "7")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d8, Title "8")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d9, Title "9")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d10, Title "10")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d11, Title "11")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d12, Title "12")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d13, Title "13")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d14, Title "14")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d15, Title "15")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d16, Title "16")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d17, Title "17")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d18, Title "18")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d19, Title "19")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d20, Title "20")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d21, Title "21")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d22, Title "22")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d23, Title "23")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d24, Title "24")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d25, Title "25")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d26, Title "26")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d27, Title "27")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d28, Title "28")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d29, Title "29")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d30, Title "30")
*FvwmCalendar: (2x1, Action(Mouse 0) Menu MenuFvwmRoot, Id d31, Title "31")

DestroyFunc UpdateCalendar
AddToFunc UpdateCalendar
+ I PipeRead 'echo SendToModule FvwmCalendar ChangeButton month Title `date +\'\"%B, %Y\"\'`
+ I PipeRead 'echo SendToModule FvwmCalendar ChangeButton d`date +%e` Title \"*`date +%e`\"'
+ I PipeRead 'for ((i=29;i<=31;i++)); do test $$(date --date "$$(date +%B) $i" +"%e") -eq $i || echo SendToModule FvwmCalendar ChangeButton d$i Title .; done'
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-28 06:56 , Processed in 0.094349 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表