fvwm问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

fvwm问题

#1

帖子 gzbao9999 » 2009-10-08 11:28

出了点怪问题
所有的term :(xterm roxterm aterm)
都在最大化或全屏时,右边和下边留有缝隙
其他程序就都是好的
:em20
附件
2009-10-08-112802_1024x768_scrot.png
2009-10-08-112759_1024x768_scrot.png
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: fvwm问题

#2

帖子 leeaman » 2009-10-08 11:39

找找*term的配置看看先吧?
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: fvwm问题

#3

帖子 gzbao9999 » 2009-10-08 11:44

开始我也怀疑term的配置
我把fvwm的配置用到另一台新装的9.10系统的电脑上
也还是这种效果
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: fvwm问题

#4

帖子 leeaman » 2009-10-08 11:54

我说的是你的fvwm的配置文件里面着*term的配置看看啊
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: fvwm问题

#5

帖子 gzbao9999 » 2009-10-08 12:29

:em06 就f.menu里面
加了些Exec exec xterm之类的,就没别的了
我把配置搞上来


config
------------------------------------------------------
SetEnv fvwm $[HOME]/.fvwm/
SetEnv thumbnail $[fvwm]thumbnail/
#插入另外一个文件file的内容
Read f.menu
Read f.pager
Read f.style
Read f.function
Read f.ButtonStyle
Read f.Mouse
Read f.thumbnail

#满屏最大化
EwmhBaseStruts 0 0 0 0

#使用EdgeScroll命令禁止flipping pages(鼠标不会因为接近屏幕边缘而进入相近的桌面)
#EdgeScroll 0 0

# 用来设定桌面的大小,这里只设置了一个桌面,但是有8页
DeskTopSize 3x3

# 这里是FVWM的启动函数,加载一些模块
AddToFunc StartFunction
+ I Module FvwmPager
+ I Exec exec fvwm-root -r /home/vava/fish.png #墙纸路径
+ I Exec exec trayer --edge bottom --align right --widthtype request --height 24 --SetDockType true --transparent true --alpha 255 --expand true &
+ I Exec exec conky &
+ I Exec exec xclock -g +0-0 -bg black -fg white -update 30 -padding 1 -d -strftime '%H:%M' -face 'Digital:size=11'&
# 下面是FVWM的退出函数,你可以在这里加入一些FVWM退出时要执行的打操作
AddToFunc ExitFunction
+ I Exec exec killall trayer
+ I Exec exec killall conky
+ I Exec exec killall xclock
------------------------------------------------------------------------



f.menu
------------------------------------------------------------------------
MenuStyle * PopupOffset +0 100, PopupDelay 200
MenuStyle * Hilight3DOff, HilightBack #424164, ActiveFore white
Colorset 0 Transparent,fg white
MenuStyle * MenuColorset 0 #实现伪透明
MenuStyle * Foreground grey90 #前景色
MenuStyle * Background #1c5572 #背景色
MenuStyle * BorderWidth 1, TitleUnderlines1, SeparatorsLong, TrianglesSolid
MenuStyle * ItemFormat "%.2|%.5i%.5l%.5i%2.3>%2|"
MenuStyle * AutomaticHotKeys
MenuStyle * MenuFace VGradient 128 1 #2c80A0 1 #1c5572
ColormapFocus FollowsFocus

#主菜单上显示的程序及子菜单。
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot
+ "Aterm" Exec exec aterm
+ "Rxvt" Exec exec rxvt
+ "Roxterm" Exec exec roxterm
+ "Home" Exec exec rox
+ "Downloads" Exec exec rox ~/Downloads
+ "Xterm" Exec exec xterm
+ "Chrome" Exec exec /home/vava/chrome-linux/chrome
+ "leafpad" Exec exec leafpad
+ "pidgin" Exec exec pidgin
+ "Gimp" Exec exec gimp
+ "" Nop
+ "Net" Popup MenuInternet
+ "多媒体" Popup MenuMultimedia
+ "编程" Popup project
+ "DIY fvwm" Popup DIYMenu
+ "" Nop
+ "退出" Popup MenuQuit-Verify

#各个子菜单,显示的程序。
DestroyMenu MenuInternet
AddToMenu MenuInternet
+ "Firefox" Exec exec firefox
+ "chrome" Exec exec /home/vava/downloads/chrome-linux/chrome
+ "Chrome-flash" Exec exec /home/vava/downloads/chrome-linux/chrome --enable-plugins
+ "QQ" Exec exec qq
+ "pidgin" Exec exec pidgin

DestroyMenu MenuMultimedia
AddToMenu MenuMultimedia
+ "smplayer" Exec exec smplayer
+ "music" Exec exec music
+ "audacious" Exec exec audacious
+ "" nop
+ "迅雷" Exec exec wine /home/vava/.wine/drive_c/Program\ Files/Thunder/Thunder.exe
+ "" nop
+ "Gimp" Exec exec gimp

DestroyMenu project
AddToMenu project
+ "eclipse" Exec exec /home/vava/goto/project/eclipse
+ "mysql" Exec exec mysql /home/vava/goto/project/mysql
+ "tomcat-start" Exec exec /home/vava/goto/project/tomcat-start
+ "tomcat-stop" Exec exec /home/vava/goto/project/tomcat-stop

DestroyMenu DIYMenu
AddToMenu DIYMenu
+ "config" Exec exec leafpad ~/.fvwm/config
+ "f.menu" Exec exec leafpad ~/.fvwm/f.menu
+ "f.style" Exec exec leafpad ~/.fvwm/f.style
+ "f.Mouse" Exec exec leafpad ~/.fvwm/f.Mouse
+ "f.ButtonStyle" Exec exec leafpad ~/.fvwm/f.ButtonStyle
+ "f.function" Exec exec leafpad ~/.fvwm/f.function

DestroyMenu MenuQuit-Verify
AddToMenu MenuQuit-Verify
+ "Restart FVWM ..." Restart
+ "Exit FVWM Now... " Quit
+ "Power Off" Exec exec sys_shutdown
+ "Reboot" Exec exec sys_reboot

#+ "Power Off" Exec exec /sbin/halt -p
#+ "Reset" Exec exec /sbin/reboot
#+ "&Lock Screen" Exec exec #xscreensaver-command -lock

DestroyMenu MenuFvwmConfig
AddToMenu MenuFvwmConfig
+ "FvwmConsole" Module FvwmConsole -terminal rxvt
+ "Colour Browser" Exec exec gcolor
+ "Edit fvwm2rc" Exec exec gvim -geom 115x46 ~/.fvwm/.fvwm2rc
+ "R&efresh" Refresh
+ "&Xkill" Pick Destroy
+ "Configure Screensaver..." Exec exec xscreensaver

DestroyMenu MenuFvwmWindowOps
AddToMenu MenuFvwmWindowOps
+ "Layer++" Pick Layer 1
+ "Layer--" Pick Layer -1
+ "Layer" Pick Layer
+ "" Nop
+ "Lower" Pick Lower
+ "Resize" Pick Resize
+ "Shade" Pick WindowShade Toggle
+ "" Nop
+ "Stick" Pick Stick
+ "Scroll" Pick Module FvwmScroll
+ "Refresh" Pick RefreshWindow
+ "" Nop
+ "Identify" Pick Module FvwmIdent
+ "Zoom" Pick Exec exec xmag -source $[w.width]x$[w.height]+$[w.x]+$[w.y] -mag 2
+ "" Nop
+ "Close" Close
+ "Destroy" Destroy
------------------------------------------------------------------------



f.pager
------------------------------------------------------------------------
PipeRead "echo *FvwmPager: Geometry 150x80-1-24"

FvwmPager: Hilight3DOff, HilightBack #424164, ActiveFore white
Colorset 0 Transparent
*FvwmPager: MiniIcons
*FvwmPager: Font none
*FvwmPager: WindowBorderWidth 0
*FvwmPager: Window3DBorders
*FvwmPager: ShowTips
*FvwmPager: FocusFore cornsilk
*FvwmPager: UseSkipList

*FvwmPager: Colorset * 41 #前景色
*FvwmPager: HilightColorset * 42 #背景色


*FvwmPager: WindowColorsets $[cs-panel-wininactive] $[cs-panel-winactive]

Style FvwmPager NoTitle, !Handles, !Borders, Sticky, WindowListSkip, \
CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable

DesktopSize 3x3

Style "MyDock" !Title, !Handles, Sticky, WindowListSkip, \
CirculateSkip, BorderWidth 0, HandleWidth 0
DestroyModuleConfig MyDock: *
*MyDock: ButtonGeometry 64x64-1+0
*MyDock: Columns 1
*MyDock: Frame 0
*MyDock: (Frame 0 ,Swallow "wmcalclock" 'Exec wmcalclock -24 -b 100')
------------------------------------------------------------------------



f.style
------------------------------------------------------------------------

style * SloppyFocus
style * NoPPosition
style * Colorset 42, HilightColorset 41 # to use fg and bg #前景色和后景色
MenuStyle * Font "xft:WenQuanYi Micro Hei:size=11"
style * Font "xft:WenQuanYi Micro Hei Light:size=11"
Style * Button 1, Button 2, Button 4, Button 6, Button 8, GrabFocusOff #标题栏上显示的按钮
Style * BorderWidth 0, HandleWidth 2
Style * NoIcon
Style * IndexedIconName
Style * MinOverlapPercentPlacement
Style * MinOverlapPercentPlacementPenalties 2 5 1 2 0.5 50
Style * ResizeOutLine
Style * MouseFocusClickRaises
Style * TileCascadePlacement #窗口出现的时候,先试图找一个可以放下它而不挡住其它窗口的地方,如果不行再采用层叠放置的方式
Style * DecorateTransient


Style "Fvwm*" NoTitle, Sticky, WindowListSkip

Style "Fvwm*" BorderWidth 0, CirculateSkipIcon, CirculateSkip


Style trayer NoTitle,!Handles
Style xclock NoTitle,!Handles,StaysOnTop,Sticky,WindowListSkip

#下面是定义了窗口使用的色彩。(其中41和42号是透明)其他文件里的色彩设定,我都用下面的号码表记。
Colorset 0 fg #ffffff, fgsh #000000, bg #f6f6f6, sh #6e90b3, hi #91b6db, Translucent #283e5e 80
Colorset 1 fg #000000, fgsh #b5b7b8, bg #ffffff, hi #ffffff, sh #9a9a9a, Translucent #dce0e7 70
Colorset 3 fg #9aafbf, bg #000000, fgsh #000000, NoShape, RootTransparent, Tint #283e5e 70
Colorset 4 fg #ffffff, bg #000000, fgsh #000000, Noshape, RootTransparent, Tint #101f36 70

#41得bg决定了title button的背景色 fg决定了title bar的颜色(窗口focus时)
#42得bg决定了title button的背景色 fg决定了title bar的颜色(窗口lose focus时)
Colorset 41 RootTransparent buffer, fg white, bg black, Tint cyan 15, bgTint cyan 15 # tint is optional
Colorset 42 RootTransparent buffer, fg black, bg #969696, Tint blut 15, bgTint blut 15 # tint is optional

#下面的才是透明的设定,如不使用透明,把下面的注销。
#BorderStyle Inactive Colorset 42 -- flat
#BorderStyle Active Colorset 41 -- flat
#TitleStyle AllInactive Colorset 42 -- flat
#TitleStyle AllActive Colorset 41 -- flat
------------------------------------------------------------------------



f.function
------------------------------------------------------------------------
DestroyFunc FuncFvwmFocusPolicyChange
AddToFunc FuncFvwmFocusPolicyChange
+ I Style * $0
+ I Recapture

DestroyFunc DestroyOnHold
AddToFunc DestroyOnHold I Raise
+ C Schedule 50 Close
+ H Destroy


AddToFunc Move-or-Raise I Raise
+ M Move
+ D Maximize 100 100
#+ D WindowShade Toggle

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


AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow

*FvwmEvent-NewWindow: add_window FuncFocusWindow
DestroyFunc FuncFocusWindow
AddToFunc FuncFocusWindow
+ I Focus
+ I WarpToWindow 50 50


DestroyFunc FuncFullScreen
AddtoFunc FuncFullScreen
+ I Current (Maximizable, HasHandles,!FixedSize) FuncDoFullScreen Break
+ I Current (FixedSize, Maximized) FuncUnFullScreen

DestroyFunc FuncDoFullScreen
AddtoFunc FuncDoFullScreen
+ I WindowStyle NoTitle,HandleWidth 0,FixedSize,FixedPosition
+ I Current (!Maximized) Maximize
+ I Layer 7 ontop
+ I ResizeMaximize 100 100

DestroyFunc FuncUnFullScreen
AddtoFunc FuncUnFullScreen
+ I DestroyWindowStyle
+ I Layer default
+ I Maximize
------------------------------------------------------------------------



f.ButtonStyle
------------------------------------------------------------------------
TitleStyle Height 20 -- Flat

ButtonStyle All Simple -- UseTitleStyle
ButtonStyle All -- Flat

AddButtonStyle 1 \
ActiveUp (Pixmap menu.png -- flat) \
ActiveDown (Pixmap menu.png -- flat) \
Inactive (Pixmap menu.png -- flat)

AddButtonStyle 2 \
ActiveUp (Pixmap close.png -- flat) \
ActiveDown (Pixmap close.png -- flat) \
Inactive (Pixmap close.png -- flat)
AddButtonStyle 4 \
ActiveUp (Pixmap max.png -- flat) \
ActiveDown (Pixmap max.png -- flat) \
Inactive (Pixmap max.png -- flat)
AddButtonStyle 6 \
ActiveUp (Pixmap min.png -- flat) \
ActiveDown (Pixmap min.png -- flat) \
Inactive (Pixmap min.png -- flat)
AddButtonStyle 8 \
ActiveUp (Pixmap min.png -- flat) \
ActiveDown (Pixmap min.png -- flat) \
Inactive (Pixmap min.png -- flat)

#按钮的样式
ButtonStyle 2 Inactive Vector 4 30x30@3 60x60@3 60x30@4 30x60@3 -- Flat
ButtonStyle 4 Inactive Vector 7 30x30@3 30x60@3 60x60@3 60x30@3 30x30@3 30x35@3 60x35@3 -- Flat
ButtonStyle 6 Inactive Vector 5 30x60@3 60x60@3 60x50@3 30x50@3 30x60@3 -- Flat
ButtonStyle 8 Inactive Vector 5 50x30@3 50x70@3 40x50@3 50x70@4 60x50@3 -- Flat
ButtonStyle 1 Inactive Vector 4 50x30@3 50x70@3 30x50@4 70x50@3 -- Flat

ButtonStyle 2 active Vector 4 30x30@3 60x60@3 60x30@4 30x60@3 -- Flat
ButtonStyle 4 active Vector 7 30x30@3 30x60@3 60x60@3 60x30@3 30x30@3 30x35@3 60x35@3 -- Flat
ButtonStyle 6 active Vector 5 30x60@3 60x60@3 60x50@3 30x50@3 30x60@3 -- Flat
ButtonStyle 8 active Vector 5 50x30@3 50x70@3 40x50@3 50x70@4 60x50@3 -- Flat
ButtonStyle 1 active Vector 4 50x30@3 50x70@3 30x50@4 70x50@3 -- Flat
------------------------------------------------------------------------



f.Mouse
------------------------------------------------------------------------
#简单的鼠标和键盘设置。
Mouse 1 R A Nop

#鼠标右键单击弹出菜单WindowList
Mouse 3 R A WindowList

#鼠标左键按钮1弹出菜单
Mouse 1 1 A Menu MenuFvwmWindowOps Nop

#鼠标左键按钮2关闭窗口
Mouse 1 8 A Lower

#鼠标左键按钮2关闭窗口
Mouse 1 2 A Close

#鼠标左键按钮6最小化
#Mouse 1 6 A Iconify

Mouse 1 6 A Thumbnail
Mouse 1 I A DeThumbnail

#title上单击右键卷起
Mouse 3 T A WindowShade

Mouse 1 4 A Maximize
Mouse 1 R A Menu MenuFvwmRoot
Mouse 1 T A Move-or-Raise
#Mouse 1 I A Move-or-Iconify
Mouse 1 W M Move-or-Raise

#Alt+F10窗口最大化
Key F10 W M Maximize
Key F10 F M Maximize
Key F10 S M Maximize
Key F10 T M Maximize

#Alt+F9窗口最小化
Key F9 W M Thumbnail
Key F9 F M Thumbnail
Key F9 S M Thumbnail
Key F9 T M Thumbnail

#Key F9 W M Iconify
#Key F9 F M Iconify
#Key F9 S M Iconify
#Key F9 T M Iconify


#Alt+F11窗口全屏
Key F11 W M FuncFullScreen
Key F11 F M FuncFullScreen
Key F11 S M FuncFullScreen
Key F11 T M FuncFullScreen

#Alt+F8窗口移动
Key F8 W M Move
Key F8 F M Move
Key F8 S M Move
Key F8 T M Move

#音量
#alsamixer执行看下声道有那些。看粗体部分执行。
Key Up A M Exec exec amixer set PCM 2%+
Key Down A M Exec exec amixer set PCM 2%-

#右win键弹出窗口列表
Key Super_R A N WindowList
#左win键弹出根菜单
Key Super_L A N Menu MenuFvwmRoot
#PrintScreen截图
Key Print A N Exec exec scrot


#Ctrl+方向键(上,下,左,右):切换到当前page的上,下,左,右方向的page去。
#Shift+Alt+方向键(上,下,左,右):将当前窗口移动到当前page的上,下,左,右方向的page去。
Key Right A C Scroll 100 0
Key Left A C Scroll -100 0
Key Down A C Scroll 0 100
Key Up A C Scroll 0 -100

key F2 A 4 Menu MenuFvwmRoot
key Super_L A 4 Pop MenuFvwmRoot

Key Win_R R A WindowList Root c c NoDeskSort
Key F4 A M Pick Close
Key X A 4 Pick Destroy


Key L A 4 Exec exec xscreensaver-command --lock
Key I A 4 All (AcceptsFocus CurrentPage !Iconic !Shaded) Thumbnail
Key X A CM Exec exec xmag
Key F4 A CM Quit
Key R A CM Restart
------------------------------------------------------------------------



f.thumbnail
------------------------------------------------------------------------
#Style * IconBox 20x700+20+50, IconGrid 0 0, IconFill left top
Style * IconBox 260x700+20+50, IconGrid 20 20, IconFill top left
SetEnv fvwm_icon_size 100
DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise

+ I WindowStyle NoActiveIconOverride
+ I Exec exec echo id=$[w.id] > ${thumbnail}/w.info
+ I Exec exec echo name=$[w.name] >> ${thumbnail}/w.info
+ I Exec exec echo iconname=$[w.iconname] >> ${thumbnail}/w.info
+ I Exec exec echo miniiconfile=$[w.miniiconfile] >> ${thumbnail}/w.info
+ I Exec exec echo class=$[w.class] >> ${thumbnail}/w.info
+ I Exec exec echo resource=$[w.resource] >> ${thumbnail}/w.info

+ I ThisWindow (!Shaded Iconifiable !Iconic) PipeRead "${fvwm}/creat-thumb-with-icon.bash $[w.id] $[w.class] && echo WindowStyle IconOverride, Icon ${thumbnail}/thumbnail.$[w.id].png"
+ I Iconify
+ I Exec mpg321 ${fvwm}/mp3/ballon.mp3

#窗口返回到通常状态时,可以使用模块FvwmEvent删除Thumbnail产生的图标。
DestroyFunc DeThumbnail
AddToFunc DeThumbnail
+ I Exec exec rm -f ${thumbnail}/thumbnail.$[w.id].png
+ I Raise
+ I WarpToWindow 50 50
+ I Iconify off
+ I Exec exec mpg321 ${fvwm}/mp3/chimes.mp3

Style * !IconTitle, IconTitleRelief 0, IndexedIconName, IconBackgroundPadding 0, IconBackgroundRelief 0
------------------------------------------------------------------------
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: fvwm问题

#6

帖子 leeaman » 2009-10-08 12:37

找ee~~~
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
HuntXu
帖子: 5776
注册时间: 2007-09-29 3:09

Re: fvwm问题

#7

帖子 HuntXu » 2009-10-08 14:11

很正常的...为了保证宽度和高度刚好你使用的字体的宽度和高度的整倍数就会这样...
不然...变成这些term的右面或下边多了些空隙或者半个字看起来不是更怪?
HUNT Unfortunately No Talent...
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: fvwm问题

#8

帖子 gzbao9999 » 2009-10-08 18:25

HuntXu 写了:很正常的...为了保证宽度和高度刚好你使用的字体的宽度和高度的整倍数就会这样...
不然...变成这些term的右面或下边多了些空隙或者半个字看起来不是更怪?
就是有条缝吗!
以roxterm为例
程序自带的全屏F10就可以满屏黑
fvwm设置的全屏,用到term上就会右边下边有缝

ee快来阿。。 :em28
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
tregedie
帖子: 578
注册时间: 2008-11-29 22:56
来自: Guangdong Pharmaceutical University
联系:

Re: fvwm问题

#9

帖子 tregedie » 2009-10-08 18:28

leeaman 写了:找ee~~~
:em04
猪圈里的猪想着去解放全世界
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: fvwm问题

#10

帖子 eexpress » 2009-10-08 18:34

没仔细看。你把那些自定义的最大化函数去掉。直接maxium嘛。在切换decor,改变windowstyle之间,可能导致尺寸问题的啊。
● 鸣学
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: fvwm问题

#11

帖子 gzbao9999 » 2009-10-08 19:40

eexpress 写了:没仔细看。你把那些自定义的最大化函数去掉。直接maxium嘛。在切换decor,改变windowstyle之间,可能导致尺寸问题的啊。
maxium 有这个函数吗?
我把配置文件只留config f.menu f.Mouse (这几个文件里没自定义函数:也不对就config里有StartFunction和ExitFunction函数)
用Mouse 1 4 A Maximize
*term最大化下面右边就是有缝,其他的程序就好好的,感觉有点诡异

maxium试了下,不知道怎么用
附件
2009-10-08-194559_1024x768_scrot.png
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: fvwm问题

#12

帖子 eexpress » 2009-10-08 20:09

就是说的Maximize。

如果这样,就想不出了。你可以去freenode.net的#fvwm房间问。
● 鸣学
回复