luo
发表于 2004-11-9 06:10:00
Hi, leros_H. Fvwm透明菜单需要一个补丁,本贴第一页第一贴的第一个提到的补丁,就是它了。fvwm-2.5.9-translucent-menus.diff.gz。(不过现在fvwm已经到了2.5.12版)。你需要重新编译你的fvwm,具体做法也许可以参考:
http://ha.prosou.nu/pukiwiki/index.php?fvwm-2.5.12
Good luck!
leros_H
发表于 2004-11-11 12:24:42
今天回来了,菜单透明要补丁吗!
我装的是,2.5.12版!
不知道它有没有集成楼上所说的补丁了。
我是用一句话实现了菜单透明!
Colorset 15 fg white, Transparent
然后把菜单的colorset改成15就成了!
我桌面下面的工具栏也是这样给我改成透明的,
不过问题是那个工具栏不能自动刷新!
如果有窗体路过就会留下痕迹!
不知有没有解决的方法,是否又要一个补丁了呢?
leros_H
发表于 2004-11-11 16:35:15
更正!
以上我提到的方法并不是真正的透明!
而只是重画了桌面来做菜单的背景!
要做到真正的透明的确是要打补丁了!
俺真是目光短浅啊!见谅!以上补丁好像只能使
菜单透明!
以上我提到的刷新问题也忆解决!
是在fvwmbutton的style上加上ParentalRelativity
参数!
不过又有个新问题!半透明又是怎样实现的呢?
还有,Boutton上的图标怎样实现按下去有反应什么的,并不是鼠标经过提示!
就是按钮效果!
另外,有没有知道KDE的日历那个小程序叫什么名字,我想调他出来 !
我知道有很多桌面小东西要依赖gdesklets!那个我装不了啊!还是自己一样样来好眯!
大家继续努力啊!我们的桌面越来越漂亮了!
fog_proxy
发表于 2004-11-12 01:26:08
请教一个问题,Style设定的Font只能用在窗口的标题栏吗?有没有办法让程序里面的字体全部用设定的字体?
比如说我想firefox用fzyuanti,其他程序则用simsun和tahoma,应该怎么设置firefox的Style?或者说fvwm根本不能实现.如果用.Xresource呢?我试了好象都不成功.
fog_proxy
发表于 2004-11-12 18:06:55
我现在全部用的yuanti,感觉小字体还是不够清晰,如果能各个程序各个定制就好了.
leros_H
发表于 2004-11-12 18:17:57
楼上兄弟,能否提供你的配置文件来参考一下啊!
不胜感激! :lol:
fog_proxy
发表于 2004-11-12 19:08:23
这里是我的配置文件,图标什么的由于太大没办法上传.自己换成喜欢的把.
# ----------------------------------------------------------------------
# Set the directories to look in for Image files.
# ----------------------------------------------------------------------
ImagePath ${HOME}/.fvwm/images:/usr/share/images:/usr/share/icons:+
SetEnv fvwm_image_path $[HOME]/
# Directoire des wallpapers selection d'un wallpaper par defaut
SetEnv fvwm_root "fvwm-root --retain-pixmap"
SetEnv fvwm_wallpaper_dir $[HOME]/.fvwm/images/wallpaper/
SetEnv fvwm_wallpaper $[fvwm_wallpaper_dir]3.png
# Path des scripts
SetEnv fvwm_script_path $[FVWM_USERDIR]/scripts/
SetEnv en_fonts -microsoft-tahoma-medium-r-normal-*-*-115-*-*-p-*-iso8859-1
SetEnv zh_fonts -misc-simsun-medium-r-normal-*-*-115-*-*-*-*-iso10646-1
# ----------------------------------------------------------------------
# You can automatically move the viewport into adjacent pages when the
# pointer hits the screen edge, but I dont like this.
#
# EdgeThickness disables edge scrolling and EdgeCommand, which I never
# use. set this to 1 or 2 to enable them.
# ----------------------------------------------------------------------
EdgeResistance 15 100
EdgeThickness 0
# ----------------------------------------------------------------------
# http://www.fvwm.org/documentation/faq/#5.5
# ----------------------------------------------------------------------
IgnoreModifiers L2
# ----------------------------------------------------------------------
# Use 9 pages per desktop, arranged in a square, like this:
#
# +-----+-----+-----+
# | | | |
# +-----+-----+-----+
# | | | |
# +-----+-----+-----+
# | | | |
# +-----+-----+-----+
# ----------------------------------------------------------------------
DeskTopSize 2x1
# ----------------------------------------------------------------------
# Use an arrow rather than the `X` cursor on the root window.
# ----------------------------------------------------------------------
CursorStyle root top_left_arrow
CursorStyle stroke hand2
# ----------------------------------------------------------------------
# Default window Styles.
#
# I like single pixel borders, which look cleaner and simpler that the
# default 3d borders.
#
# It can be a little tricky to grab the handles, but I usually use a
# Key Binding for that anyway, you can always make the handles stick
# out a bit more if you use them more than I do.
#
# SloppyFocus is the one true Focus policy :) (focus follows mouse,
# except on root)
#
# If I click in a window, I like it to be raised
# (MouseFocusClickRaises)
#
# GrabFocus is terrible, windows are always stealing focus and
# keystrokes end up in the wron windows and you lose your train of
# thought, etc. So turn it off here, and back on for windows that play
# nice with it.
#
# Set up an IconBox (an area that Windows jump to by default when
# Iconified) along the left.You can set more than one of these, as
# one gets filled the next one is used. You might also be interested
# in this FAQ: http://www.fvwm.org/documentation/faq/#3.15
#
# Syntax Reminder:
#
# IconBox [screen scr-spec] l t r b
#
# Fvwm offers several placement policies, which decide where new
# windows should appear, I've found that TileCascadePlacement makes a
# decent guess at where the windows should be, but there are plenty
# more to choose from.
#
# If you find that a window is being placed in some awkward location,
# it may be setting it's own geometry, you can ask fvwm to ignore this
# with either NoPPosition or NoUSPosition, for example:
#
# Style wmtimer NoUSPosition
#
# you might also find the ExplainWindowPlacement BugOpt useful (search
# the man page).
#
# IconAlpha looks great, but requires a lot of redrawing while being
# moved...so I have disabled it (by setting to 100) for Hilighted
# Icons, this also creates a cool MouseOver effect :)
#
# If you want to stop Thumbnails getting too big, you can use the
# IconSize option.
#
# ----------------------------------------------------------------------
# Menu Colorset
Colorset 0 fg #000000, fgsh #9A9A9A, bg #80809c, hi #ffffff, sh #c8cfd7, Translucent #ffffff 65
Colorset 1 fg #000000, fgsh #9A9A9A, bg #ffffff, hi #ffffff, sh #ffffff
# Pager Colorset
Colorset 60 fg gray, bg gray, RootTransparent, Tint #000000 15
Colorset 61 fg white, bg gray, Noshape, RootTransparent, Tint #000000 35
Colorset 62 fg white, bg gray, RootTransparent, Tint #7a7a7a 40
Colorset 63 fg white, bg gray, Noshape, RootTransparent, Tint #ffffff 50
# Global Style Setting
Style * Button 1, Button 2, Button 4, Button 6, GrabFocusOff
Style * SloppyFocus, ClickToFocusPassesClick, ClickToFocusRaises, MouseFocusClickRaises
ColormapFocus FollowsMouse
Style * ClickToFocus
Style * GrabFocus
Style * NoIconTitle
# To get borders and handles on transient windows:
Style "*" DecorateTransient
#Style * Font "-microsoft-tahoma-medium-r-normal-*-12-*-*-*-p-*-iso10646-1,-misc-simsun-medium-r-normal-*-12-*-*-*-*-*-*-*",BorderWidth 1, HandleWidth 1
Style * Font "$[en_fonts],$[zh_fonts]",BorderWidth 1, HandleWidth 1
# Menu Style
MenuStyle * Hilight3DThin, PopupOffset +0 100, PopupDelay 200
MenuStyle * Font "Shadow=0 b bl r br r :xft:Vera Sans YuanTi:pixelsize=10:minspace=True"
MenuStyle * MenuColorset 0, HilightBack, ActiveColorset 1
MenuStyle * BorderWidth 0, TitleUnderlines1, SeparatorsLong, TrianglesSolid, Animation
MenuStyle * ItemFormat "%.2|%.5i%.5l%.5i%2.3>%2|"
MenuStyle * AutomaticHotKeys
# Pager Style
Style FvwmPager NoTitle,Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip
Style FvwmPager StaysOnBottom, NoHandles, BorderWidth 0
# Applications Styles
Style *fox Font "Shadow=0 b bl r br r :xft:Vera Sans YuanTi:pixelsize=12:minspace=True",EWMHMiniIconOverride, MiniIcon icons/firefox.png
Style geditEWMHMiniIconOverride, MiniIcon icons/gvim.png
Style mltermEWMHMiniIconOverride, MiniIcon icons/gnome-term.png
Style xchatEWMHMiniIconOverride, MiniIcon icons/xchat.png
Style gimp EWMHMiniIconOverride, MiniIcon icons/gimp.png
Style gaim EWMHMiniIconOverride, MiniIcon icons/gaim.png
Style rox EWMHMiniIconOverride, MiniIcon icons/gnome-home.png
Style gFTP EWMHMiniIconOverride, MiniIcon icons/gnome-fs-network.png
Style Gdesklets NoTitle, NoHandles, Borderwidth 0
Style Gdeskcalc NoTitle, NoHandles, Borderwidth 0
Style MPlayer WindowListSkip
Style xmms NoTitle,WindowListSkip
#Style UntitledNoTitle
# ----------------------------------------------------------------------
# Titlebar Decoration
# ----------------------------------------------------------------------
DestroyFunc FuncFvwmDecorBackground
AddToFunc FuncFvwmDecorBackground
+ I TitleStyle AllActive TiledPixmap decor/title-active.xpm
+ I TitleStyle AllInactive TiledPixmap decor/title-inactive.xpm
+ I ButtonStyle All Simple -- UseTitleStyle
FuncFvwmDecorBackground
#Style "*" Button 1, Button 2, Button 4, Button 6, GrabFocusOff
#Style "*" FvwmButtons
+ I FuncFvwmDecorBackground
AddButtonStyle 1 \
ActiveUp (Pixmap decor/options-activeup.xpm -- flat) \
ActiveDown (Pixmap decor/options-activedown.xpm -- flat) \
Inactive (Pixmap decor/options-activeup.xpm -- flat)
AddButtonStyle 6 \
ActiveUp (Pixmap decor/maximize-activeup.xpm -- flat) \
ActiveDown (Pixmap decor/maximize-activedown.xpm -- flat) \
Inactive (Pixmap decor/inactive.xpm -- flat)
AddButtonStyle 4 \
ActiveUp (Pixmap decor/iconify-activeup.xpm -- flat) \
ActiveDown (Pixmap decor/iconify-activedown.xpm -- flat) \
Inactive (Pixmap decor/inactive.xpm -- flat)
AddButtonStyle 2 \
ActiveUp (Pixmap decor/close-activeup.xpm -- flat) \
ActiveDown (Pixmap decor/close-activedown.xpm -- flat) \
Inactive (Pixmap decor/inactive.xpm -- flat)
AddToFunc FuncFvwmReloadDecor
+ I BorderStyle Simple -- HiddenHandles NoInset
+ I TitleStyle-- Flat
+ I ButtonStyle All -- Flat
FuncFvwmReloadDecor
# ----------------------------------------------------------------------
# Mouse Binding
# ----------------------------------------------------------------------
Mouse 1 R A -
Mouse 3 R A Menu MenuFvwmRoot
Mouse 2 R A WindowList NoCurrentDeskTitle
# Titlebar Buttons
Mouse 1 1 A Menu MenuFvwmWindowOps
Mouse 3 1 A Menu MenuFvwmwindowOps
Mouse 1 6 A Thumbnail
Mouse 1 4 A Maximize
Mouse 1 2 A Close
# Window, Frame, Side, Others
Mouse 1 FS A ResizeFunc
Mouse 2 W C ResizeFunc
Mouse 1 W M MoveFunc
Mouse 3 W M ResizeFunc
Mouse 3 TSIF A RaiseLower
Mouse 3 T A Menu MenuFvwmWindowOps
AddToFunc ResizeFunc "M" Resize
AddToFunc MoveFunc "M" Move
# Icons Binding
Mouse 1 I A Iconify
Mouse 2 I A Move
# Wheel Toggle Shade
Mouse 4 T N WindowShade True
Mouse 5 T N WindowShade False
Mouse 4 TW M WindowShade True
Mouse 5 TW M WindowShade False
# Mouse Gesture Binding
Mouse 1 R A StrokeFunc
Mouse 1 W CMStrokeFunc
#Mouse 3 R A StrokeFunc DrawMotion FeedBack StrokeWidth 1
Key F1 A M GotoPage 0 0
Key F2 A M GotoPage 1 0
Key F8 A M Exec exec /usr/local/bin/mlterm -e halt -p
# ----------------------------------------------------------------------
# Menu Settings
# ----------------------------------------------------------------------
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot
+ "&Terminal"%icons/gnome-terminal.png% Exec exec mlterm
+ "" Nop
+ "System"%icons/system11.png% Popup MenuSystem
+ "" Nop
+ "Office"%icons/office.png% Popup MenuOffice
+ "Internet"%icons/internet.png% Popup MenuInternet
+ "Perences"%icons/prefs.png% Popup MenuFvwmConfig
+ "" Nop
+ "Quitter"%icons/quit.png% Popup MenuQuit-Verify
DestroyMenu MenuInternet
AddToMenu MenuInternet
+ "Opera"%icons/firefox.png% Exec exec opera
+ "Mozilla"%icons/firefox.png% Exec exec mozilla
DestroyMenu MenuSystem
AddToMenu MenuSystem
+ "Emacs"%icons/ooo.png% Exec exec /home/fog/soft/emacs/emacs/src/emacs
+ "Anjuta"%icons/ooo.png% Exec exec anjuta
+ "Snavigator"%icons/ooo.png% Exec exec snav
+ "Srecite"%icons/ooo.png% Exec exec srecite
DestroyMenu MenuQuit-Verify
AddToMenu MenuQuit-Verify
+ "Quitter"%icons/quit2.png% Quit
+ "Restart"%icons/quit2.png% Restart
DestroyMenu MenuOffice
AddToMenu MenuOffice
+ "Commander"%icons/ooo.png% Exec exec gnome-commander
+ "GanttProject"%icons/ooo.png% Exec exec /home/fog/soft/plan/ganttproject-1.9.11/ganttproject.sh
+ "Planner"%icons/ooo.png% Exec exec planner
+ "Gnumeric"%icons/oocalc.png% Exec exec gnumeric
DestroyMenu MenuFvwmConfig
AddToMenu MenuFvwmConfig
+ "FvwmConsole"%icons/gnome-terminal.png% Module FvwmConsole -terminal mlterm
+ "Editer fvwm2rc"%icons/gvim.png% Exec exec emacs ~/.fvwm/.fvwm2rc
+ MissingSubmenuFunction WallpaperBrowser
+ "" Nop
+ "Wallpapers"%icons/prefs.png% Popup $[fvwm_wallpaper_dir]
+ "" Nop
+ "Refresh"%icons/quit2.png% Refresh
+ "Kill"%icons/quit2.png% Pick Destroy
## Referenced in System-Ops
DestroyMenu MenuFvwmWindowOps
AddToMenu MenuFvwmWindowOps
+"" Nop
+"Identify" Module FvwmIdent
+"Scroll Bar" Module FvwmScroll 2 2
+"" Nop
+"Refresh Screen" Refresh
+"" Nop
+"Move" Function Move-or-Raise
+"Resize" Function Resize-or-Raise
+"Raise" Raise
+"Lower" Lower
+"" Nop
+"(De)Iconify" Iconify
+"(Un)Maximize" Function Maximize-Function
+"(Un)Stick" Stick
+"" Nop
+"Destroy" Destroy
+"Close" Close
# ----------------------------------------------------------------------
# Functions
# ----------------------------------------------------------------------
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Exec exec $[fvwm_root] $[fvwm_wallpaper]
+ I Test (Restart) All (Iconic) Test (f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png
+ I Module FvwmButtons
+ I Module FvwmAnimate
+ I Module FvwmPager
#+ I Exec exec fvwm-themes-images --sky --sky-colors black,rgb:62/85/b7,rgb:70/95/c2,rgb:48/6c/aa,rgb:21/44/91 --setroot --pattern-type altern:1,5,4
+ I Exec exec gdesklets
DestroyFunc InitFunction
AddToFunc InitFunction
+ I Exec exec /usr/libexec/gnome-settings-daemon
#+ I Module FvwmBanner
#+ I Exec exec xscreensaver -no-splash
DestroyFunc ExitFunction
AddToFunc ExitFunction
#+ I Test (!ToRestart) Exec exec rm -f $[HOME]/.fvwm/icon.tmp.*
+ I Test (!ToRestart) DeThumbnail
+ I All (gdesklets) Close
# Screenshoot Applications to icon
SetEnv fvwm_icon_size 100
DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise
+ I SetEnv Icon-$[w.id] $[w.iconfile]
+ I ThisWindow (!Shaded Iconifiable !Iconic) PipeRead \
"xwd -silent -id $[w.id] | convert -scale $[fvwm_icon_size] -frame 1x1 \
-mattecolor black -quality 0 xwd:- png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png \
&& echo WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
|| echo Nop"
+ I TestRc (Match) Test (f $[HOME]/icons/$[w.miniiconfile]) PipeRead "composite -geometry +2+4 \
$[HOME]/icons/$[w.miniiconfile] $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
$[FVWM_USERDIR]/icon.tmp.$[w.id].png && echo Nop \
|| echo Beep"
+ I Iconify
DestroyFunc DeThumbnail
AddToFunc DeThumbnail
+ I PipeRead "echo WindowStyle Icon \\$\\[Icon-$[w.id]\\]"
+ I UnsetEnv Icon-$[w.id]
+ I Exec exec rm -f $[FVWM_USERDIR]/icon.tmp.$[w.id].png
# Browse Wallpapers Directory
DestroyFunc WallpaperBrowser
AddToFunc WallpaperBrowser
+ I PipeRead 'test ! -d "$0/.thumbs" && mkdir "$0/.thumbs"; \
for i in "$0/"*; do \
test -f "$0/.thumbs/${i##*/}" \
-a "${i}" -ot "$0/.thumbs/${i##*/}" || { \
convert -quality 0 -scale 24 "${i}" "png:$0/.thumbs/${i##*/}" 2>/dev/null \
|| continue; \
}; \
done; \
fvwm-menu-directory --icon-title icons/browse.png --icon-file __PIXMAP__ \
--icon-dir icons/browse.png --dir $0 --exec-file "^fvwm-root --retain-pixmap" \
--exec-t="^eog *" | sed -e "s#FuncFvwmMenuDirectory#WallpaperBrowser#g" \
-e "s#__PIXMAP__\\(.*\\)\\"\\(.*/\\)\\(.*\\)\\"#\\2.thumbs/\\3\\1\\2\\3#g"'
# ----------------------------------------------------------------------
# Splash Screen style
# ----------------------------------------------------------------------
#*FvwmBanner: NoDecor
#*FvwmBanner: Pixmap splash/gentoo.png
#*FvwmBanner: Timeout 3
# ----------------------------------------------------------------------
# Pager
# ----------------------------------------------------------------------
DestroyModuleConfig FvwmPager: *
*FvwmPager: Geometry 200x50-0-0
*FvwmPager: MiniIcons
*FvwmPager: Colorset * 60
*FvwmPager: HilightColorset * 61
*FvwmPager: WindowColorsets 63 62
*FvwmPager: BalloonColorset * 63
*FvwmPager: Font none
*FvwmPager: SmallFont none
*FvwmPager: Balloons All
*FvwmPager: BalloonFont "Shadow=1 1 SE:xft:Aquafont:bold:pixelsize=10:minspace=True"
*FvwmPager: BalloonYOffset +2
*FvwmPager: BalloonBorderWidth 1
*FvwmPager: UseSkipList
*FvwmPager: MoveThreshold 0
*FvwmPager: SolidSeparators
*FvwmPager: WindowBorderWidth 1
# ----------------------------------------------------------------------
# Animatio
# ----------------------------------------------------------------------
DestroyModuleConfig FvwmAnimate: *
*FvwmAnimate: Effect Flip
*FvwmAnimate: Delay 1
*FvwmAnimate: Iterations 10
*FvwmAnimate: Width 2
Heisenberg
发表于 2004-11-17 14:44:16
我装了gdesklets,但是starterbar就是调用不了,总是出现错误
各位有什么建议嘛?
luo
发表于 2004-11-17 14:55:07
好像我记得很早的时候我装的gdesklets,有的已经启动的东西到了下次启动出不来。
gdesklets好像还是有不少bug,但是现在我这里总是能够出来,启动是比较慢的。是否先看看其他的gdesklets东西例如calendar、weather等是否能够出来。如果都出不来,那可能是编译安装的问题了吧。
luo
发表于 2004-11-17 14:57:17
Style设定的Font只能用在窗口的标题栏吗?有没有办法让程序里面的字体全部用设定的字体?
比如说我想firefox用fzyuanti,其他程序则用simsun和tahoma,应该怎么设置firefox的Style?或者说fvwm根本不能实现.如果用.Xresource呢?我试了好象都不成功.
其他程序的字体是gtk,fontconfig,qt控制的嘛。所以只能这样了。.Xresource可以控制term的字体。
luo
发表于 2004-11-17 23:01:45
还有,Boutton上的图标怎样实现按下去有反应什么的,并不是鼠标经过提示!
就是按钮效果!
AFAIK,目前只有fvwm-2.5.10-fvwmbuttonshover.diff.gz这个补丁,可以在鼠标经过的时候显示另外一个图片。可参考法国人的那个config。
atfa
发表于 2004-11-18 12:20:34
luo兄,看了你的关于fvwm一些帖子
突然有个想法
不知道你能不能把现在自己编译一个比较完美的fvwm所需的各种src和patch搜集一下,做成一个包让大家下载呢?
因为论坛的聊天模式导致信息太分散,如果能整理一下会不会更好呢?谢谢
leros_H
发表于 2004-11-18 12:39:02
lou你好!
上面我只说了是在鼠标按下时图标的反应!并不是鼠标经过时的反应!
这是我的较低要求!而现在我已实现,鼠标按下时变换一个图标!
就是用pressIcon,ActionIcon实现的!我就贴一个例子吧!
*FvwmDock: (1x1, PressIcon dock/kids/qq.png, ActionIcon dock/kids/qq2.png,Icon dock/kids/qq2.png, Action(ActionOnPress,Mouse 1) `Exec exec /usr/local/LumaQQ/lumaqq`
平时显示为qq2,png ,当鼠标按下时就显示qq.png!
因为gdesklets我装不上,也实在不会用!那只有用以上方法了!
注意,我用的是fvwm 2.5.12!就打了菜单透明的那个补丁!不知其它版本如何了!
祝大家愉快了!
lalawu
发表于 2004-11-19 18:17:01
楼主的帖子真是太及时了
正打算配置Fvwm
而又找不到什么中文资料
blackwhite
发表于 2004-11-24 05:36:15
解压出来的font名字怎么有下划线?
LCD2B___.TTFLCD2L___.TTFLCD2N___.TTFLCD2U___.TTF