QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2696|回复: 8

关于FVWM的透明效果

[复制链接]
发表于 2005-8-19 17:20:26 | 显示全部楼层 |阅读模式
FvwmTaskBar,FvwmPager,FvwmButtons,FvwmWharf,Menu我都想实现透明效果,我下了个最新的theres,看了下它的代码,其中有个FvwmTaskBar有透明效果(看起来是这样),可把背景一换就露馅了。
我想问下怎么实现它们的透明(真正的透明,并不是把背景做成和xsetbg或xsetroot的一样)是通过代码?还是GIMP?如果是通过GIMP做的透明背景,能不能把你们的传上来,谢谢。
发表于 2005-8-20 09:15:15 | 显示全部楼层
通过代码,实际上只是定义模块颜色
回复

使用道具 举报

 楼主| 发表于 2005-8-20 11:23:16 | 显示全部楼层

能把代码贴出来吗?
这个我实在不会了
回复

使用道具 举报

发表于 2005-8-20 20:13:42 | 显示全部楼层
看这个版快上的faq就有
回复

使用道具 举报

 楼主| 发表于 2005-8-24 14:12:30 | 显示全部楼层
谢谢楼上提醒
http://www.fvwm.org/documentation/faq/#3.23
贴下我的图吧,还有很多地方不满意,以后再慢慢弄了,先搞点正事去。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
回复

使用道具 举报

发表于 2005-8-31 17:42:40 | 显示全部楼层
挺不错的,能把fvwm2rc贡献出来吗?
回复

使用道具 举报

发表于 2005-8-31 17:53:31 | 显示全部楼层
贴个我的,好久都没有去管她了.做的比较一般

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
回复

使用道具 举报

 楼主| 发表于 2005-9-1 16:00:08 | 显示全部楼层
我在学校的win98下已经看不到我的贴图了啊,被删了吧。系统昨天出些问题,RH9都没了,正在恢复数据,可能过几天我才能把fvwm2rc传上来了。请原谅
:D
回复

使用道具 举报

 楼主| 发表于 2005-9-5 21:39:52 | 显示全部楼层
# 图标路径
ImagePath  /usr/X11R6/include/X11/pixmaps/:$HOME/xpms:$HOME/pixmaps:$HOME/bg
ImagePath +:$HOME/.fvwm/images
# Colorset
Colorset 0 RootTransparent
Colorset 1 RootTransparent, Tint black 10, bgTint black 10
Colorset 2 RootTransparent, Tint black 20, bgTint black 20
Colorset 3 RootTransparent, Tint black 30, bgTint black 30
Colorset 4 RootTransparent, Tint black 40, bgTint black 40

# 模块路径
#$FVWM_MODULEDIR:$HOME/fvwm-modules

# set XORvalue to something visible.  This sets the coloration of the
# 'rubber-band' window-borders when moving and resizing windows.
XORvalue 208

# Make our windows snap-up against other windows and make icons snap
# up against other icons
SnapAttraction 20 SameType

# 样式表
Style "*" Font "-misc-simsun-medium-r-normal--12-0-0-0-p-0-gb2312.1980-0,-microsoft-tahoma-medium-r-normal--12-0-0-0-p-0-iso8859-1"
Style "default-style" Font "StringEncoding=gbk-0ft:simsun:size=10:encoding=iso10646-1"
Style "*" NoIcon
Style "*" HilightFore #ffffff
Style "*" HilightBack #1ea819
Style "*" ForeColor #c4c4c4
Style "*" BackColor #052d6d
Style "*" StickyIcon
Style "*" BorderWidth 1, HandleWidth 1
Style "*" NoPPosition
Style "*" NakedTransient
Style "Fvwm*"        HandleWidth 0,BorderWidth 0,NoTitle,NoHandles,WindowListSkip,Sticky
Style "rxvt"        HandleWidth 0,BorderWidth 0,NoHandles
Style "XMMS" BorderWidth 0,NoTitle,NoHandles

# BorderStyle
BorderStyle Active -- NoInset HiddenHandles
BorderStyle Inactive -- NoInset HiddenHandles

# TitleStyle
TitleStyle ActiveUp Vgradient 16 #85cc6a #1a2814 -- flat
TitleStyle ActiveDown Vgradient 16 #065414 #1ea819 -- flat
TitleStyle Inactive Vgradient 16 #94b0f1 #0b074f -- flat

# Format: TitleStyle [ justification ] [ height num ]
TitleStyle LeftJustified height 16

# Button Styles
ButtonStyle All -- UseTitleStyle flat
ButtonStyle 1 6 25x25@3 50x50@3 75x75@3  25x75@2 50x50@3 75x25@3
ButtonStyle 2 5 25x25@3 25x75@3 75x75@3 75x25@3 25x25@3
ButtonStyle 4 10 40x40@3 40x75@3 75x75@3 75x40@3 40x40@3 25x25@3 25x65@3 65x65@3 65x25@3 25x25@3
ButtonStyle 6 2 30x70@3 70x70@3


# MenuStyle
MenuStyle * popupoffset 0 100
MenuStyle * Font "-misc-simsun-medium-r-normal--12-0-0-0-p-0-gb2312.1980-0,-microsoft-tahoma-medium-r-normal--12-0-0-0-p-0-iso8859-1"
MenuStyle * MenuColorset 2
# Set up some desktop options
# Desktop [Horizontal]x[vertical]  Defines the virtual desktop size,
#        1x1 = one physical screen size (no virtual desktop
DesktopSize        3x2

# EdgeResistance scrolling moving
#   Sets how hard it is to change the desktop viewport
#   scrolling is in milliseconds
#   moving is in pixels (how far a window's edge must move to move off-screen
# These values don't much matter in this configuration as our viewport
# is only as big as our screen anyway.
EdgeResistance        750 75

# EdgeScroll horizontal vertical
#   Sets the percentage of a page to scroll when the cursor is on the edge
#   of the screen.   Again, not useful in this configuration since we only
#0   havc a viewport as big as our screen.
EdgeScroll        100 100

# OpaqueMoveSize percentage
#   This option tells fvwm the maximum size window that it should move
#   with contents intact (ie, not 'rubber-banding')  You should keep this
#   low if you don't have good video hardware.
OpaqueMoveSize 50


# Function definitions
AddToFunc "Move-or-Raise" "M" Move
+              "M" Raise
+              "C" Raise
+              "D" WindowShade

AddToFunc "Move-or-Iconify" "M" Move
+              "D" Iconify
+              "C" RaiseLower

AddToFunc "Resize-or-Raise" "M" Resize
+              "M" Raise
+              "C" Raise
+              "D" RaiseLower

AddToFunc "StartFunction"
+              "Immediate" Module FvwmPager 0 3
+              "Immediate" Module FvwmButtons
+              "Immediate" Module FvwmTaskBar
+              "Immediate" Module FvwmForm
+ "I"          Exec exec fvwm-root -r /root/bg/bg.xpm
+              "Immediate" Setenv LANG=zh_CN.2312
AddToFunc "InitFunction"
+              "Immediate" Desk 0 2
+              "Immediate" Desk 0 0

AddToFunc "RestartFunction"
+              "Immediate" Exec SetEnv LANG=zh_CN


AddToFunc "Maximize_func" "M" Maximize 0 100
+              "C" Maximize 0 80
+              "D" Maximize 100 100

# Popup menus
AddToMenu "Window-Popup" "Window Ops" Title
+              "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "(De)Iconify" Iconify
+              "(Un)Stick" Stick
+              "(Un)Maximize" Function maximize_func
+              "Identify" Module FvwmIdent
+              "" Nop
+              "Destroy" Destroy
+              "Close" Close
+              "" Nop
+              "Refresh Screen" Refresh

AddToMenu "Window-ops-Popup" "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "Iconify" Iconify
+              "(Un)Stick" Stick
+              "Identify" Module FvwmIdent
+              "" Nop
+              "Destroy" Destroy
+              "Close" Close
+              "" Nop
+              "Scrollbar" Module FvwmScroll 2 2


# 键盘绑定
Key F3 W M Iconify
Key F3 I M Iconify
Key F4 W M Close
Key F11 A C Exec exec xlock -mode swarm &
Key F9 A M Desk 0 0
Key F10 A M Desk 0 1
Key F11 A M Desk 0 2
Key F12 A M Desk 0 3

Key Right A 4 Direction East (AcceptsFocus CurrentDesk !Iconic) Focus
Key Left A 4 Direction West (AcceptsFocus CurrentDesk !Iconic) Focus
Key Up A 4 Direction North (AcceptsFocus CurrentDesk !Iconic) Focus
Key Down A 4 Direction South (AcceptsFocus CurrentDesk !Iconic) Focus

Key Tab A M Next (AcceptsFocus CurrentDesk !Iconic) Focus
Key Tab A SM Prev (AcceptsFocus CurrentDesk !Iconic) Focus

Key F12 A C Exec java -jar /setup/DGuitar/dist/DGuitar.jar
Key F11 A C Exec xmms&
Key F10 A C Exec dillo&
Key F9 A C Exec mozilla&

Key F8 A C Exec gimp&
Key F7 A C Exec gqview&
Key F6 A C Exec xpdf&
Key F5 A C Exec stardict&

Key F4 A C Exec
Key F3 A C Exec
Key F2 A C Exec
Key F1 A C Exec
############################################################
Key x A C All (rxvt) MoveToDesk 1
Key d A 4 All Iconify *
Key c A 4 Module FvwmConsole -terminal rxvt -geometry 34x4-10-22 -tr +sb -fg \#82f77e
[code:1]
Key r A 4 Module FvwmForm FvwmForm-Run
[/code:1]

############################################################


# 鼠标绑定
#  left
Mouse 1 R N Menu "r00to" Nop
Mouse 1 1 N Delete
Mouse 1 2 N Maximize
Mouse 1 4 N Maximize 91 96
Mouse 1 6 N Iconify
Mouse 1 T N Function "Move-or-Raise"
Mouse 1 SF N Function "Resize-or-Raise"
Mouse 1 I N Function "Move-or-Iconify"
#  middle
Mouse 2 R N Menu "Window-Popup" Nop
Mouse 2 TSFI N Menu "Window-ops-Popup" Nop
#  right
Mouse 3 2 N Function "Resize-or-Raise"
Mouse 3 T N RaiseLower
Mouse 3 I N Function "Move-or-Iconify"
Mouse 3 S N Function "Move-or-Iconify"

# 菜单设置
AddToMenu "Applications-Popup"    " Xpdf" Exec xpdf
+              " Xman" Exec xman
+              " Stardict " Exec stardict
+              "" nop
+               " Mozilla " Exec mozilla
+              " Lumaqq "
+              " amule "
+              " bt"
+              "" nop
+              " Dgutar"

AddToMenu "Graphics-Popup" "The GIMP" Exec gimp
+              "GQview" Exec gqview
+              "Image Magick" Exec display

AddToMenu "music-Popup" " xmms " Exec xmms
+               "Gmplyaer" Exec gmplayer

AddToMenu "r00to" "r00to's menu" Title
+              "  文 件 管 理" Exec rox
+              "  中 文 终 端" Exec rxvt +sb -bg \#030328
+              "" Nop
+              "  常 用 程 序" Popup Applications-Popup
+              "  图 形 制 作" Popup Graphics-Popup
+              "  音 乐/电 影" Popup Music-Popup
+              "" Nop
+              "  配 置 Fvwm" Exec rxvt +sb -bg \#030328 -e vi /root/.fvwm/.fvwm2rc
+              "  重 启 Fvwm" Restart
+              ""  Nop
+              "  刷 新" Refresh
+              "  退 出" Popup Quit-Verify

AddToMenu "Quit-Verify" "退出FVWM" Quit
+              "" Nop
+              "重启计算机" Exec init 6
+              "关闭计算机" Exec init 0

# FvwmPager模块
*FvwmPager: Colorset * 0
*FvwmPager: Font "-misc-simsun-medium-r-normal--13-0-0-0-p-0-gb2312.1980-0,-microsoft-tahoma-medium-r-normal--13-0-0-0-p-0-iso8859-1"
*FvwmPager: HilightColorset * 0
*FvwmPager: DeskTopScale 2
*FvwmPager: Geometry 65x270-5+5
*FvwmPager: Label 0 Pager
*FvwmPager: SmallFont 5x8
*FvwmPager: Columns 1
*FvwmPager: Label 0 "1--综合"
*FvwmPager: Label 1 "2--学习"
*FvwmPager: Label 2 "3--娱乐"
*FvwmPager: Label 3 "4--网络"
*FvwmPager: Balloons Pager
*FvwmPager: BalloonColorset * 0

# FvwmTaskBar模块
Style FvwmTaskBar HandleWidth 0 , BorderWidth 0
*FvwmTaskBar: Geometry 10x78-0-0
*FvwmTaskBar: Font -misc-simsun-medium-r-normal--14-0-0-0-p-0-gb2312.1980-0,-microsoft-tahoma-medium-r-normal--14-0-0-0-p-0-iso8859-1
*FvwmTaskBar: StatusFont -misc-simsun-medium-r-normal--14-0-0-0-p-0-gb2312.1980-0,-microsoft-tahoma-medium-r-normal--14-0-0-0-p-0-iso8859-1
*FvwmTaskBar: UseSkipList
*FvwmTaskBar: AutoStick
*FvwmTaskBar: Action Click1 Iconify
*FvwmTaskBar: Action Click2 Iconify On
*FvwmTaskBar: Action Click3 Lower
*FvwmTaskBar: MailCommand Exec exec rxvt -bg \#030328 +sb -e mutt
*FvwmTaskBar: 3DFvwm
*FvwmTaskBar: StartName Start
*FvwmTaskBar: StartCommand Popup "r00to"
*FvwmTaskBar: StartButtonRightMargin 10
*FvwmTaskBar: WindowButtonsRightMargin 5
*FvwmTaskBar: WindowButtonsLeftMargin 35
*FvwmTaskBar: NoIconAction SendToModule FvwmAnimate animate
*FvwmTaskBar: ClockFormat %A %T
*FvwmTaskBar: MailCheck 10
*FvwmTaskBar: Colorset 3
*FvwmTaskBar: FocusColorset 3
*FvwmTaskBar: IconColorset 3
*FvwmTaskBar: HighlightFocus 3

[code:1]DestroyModuleConfig FvwmForm-Run: *
*FvwmFrom-Run: Back #030328
*FvwmFrom-Run: Fore \#030328
*FvwmForm-Run: WarpPointer
*FvwmForm-Run: Title "运行 ..."
*FvwmForm-Run: Line left
*FvwmForm-Run: Font "-misc-simsun-medium-r-normal--13-0-0-0-p-0-gb2312.1980-0,-microsoft-tahoma-medium-r-normal--13-0-0-0-p-0-iso8859-1"
*FvwmForm-Run: ButtonFont "-misc-simsun-medium-r-normal--13-0-0-0-p-0-gb2312.1980-0,-microsoft-tahoma-medium-r-normal--13-0-0-0-p-0-iso8859-1"
*FvwmForm-Run: Text "           "
*FvwmForm-Run: Line left
*FvwmForm-Run: Text "命令:"
*FvwmForm-Run: Input CMD 25 ""
*FvwmForm-Run: Line left
*FvwmForm-Run: Text "  "
*FvwmForm-Run: Line expand
*FvwmForm-Run: Text ""
*FvwmForm-Run: Button quit " 运行 " ^M
*FvwmForm-Run: Command Exec exec $(CMD) &
*FvwmForm-Run: Text ""
*FvwmForm-Run: Text ""
*FvwmForm-Run: Button quit " 取消 "
*FvwmForm-Run: Command Nop
[/code:1]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-25 13:24 , Processed in 0.076676 second(s), 17 queries .

© 2021 Powered by Discuz! X3.5.

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