LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: conwood

fvwm: 从入门到提高

[复制链接]
发表于 2005-10-6 13:49:25 | 显示全部楼层
Post by quchen
郁闷!!!预览时还好好的.
其实以前也有贴过的,找不到那个链接我就再贴一次算了.
现在菜单的背景都变成灰色了!

你的窗口缩略图是怎么做成半透明的?
能不能共享一下你的设置方法
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-6 15:33:16 | 显示全部楼层
看最早一贴,中文FAQ里有提到
Post by Yei
你的窗口缩略图是怎么做成半透明的?
能不能共享一下你的设置方法
回复 支持 反对

使用道具 举报

发表于 2005-10-7 12:16:11 | 显示全部楼层
Post by conwood
看最早一贴,中文FAQ里有提到

又看了一遍,似乎只讲了如何设置透明的模块、菜单、窗口装饰,也介绍了Thumbnail。
但我仍然不知道怎么让一个Thumbnail产生的图标成半透明的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-7 22:26:35 | 显示全部楼层
我的fvwm2rc
我也不知道哪部分是管这个事情的,发上来大家各取所需吧。

  1. #Style "Qterm*" Icon /usr/share/qterm/pic/qterm_48x48.png, IconOverride
  2. #Style "SWT*" IconOverride,Icon /usr/share/pixmaps/QQ.png

  3. ClickTime 750

  4. DeskTopSize 2x1
  5. #设置桌面大小

  6. EdgeScroll 0 0
  7. #鼠标在桌面边上移动时不跳到其它桌面

  8. OpaqueMoveSize -1
  9. ## 移动窗口时显示窗口内容

  10. IgnoreModifiers L25
  11. ## 忽略 CapsLock, NumLock, ScrollLuck 以避免快捷键失效

  12. ########################menu color###############################
  13. Colorset 110 fg #000000, fgsh #000000, bg #9aa6ab, sh #6e90b3, hi #91b6db, Translucent, Tint #ffffff 60
  14. Colorset 111 fg #000000, fgsh #b5b7b8, bg #ffffff, hi #b3b3b2, sh #9a9a9a, Translucent, Tint #dce0e7 50
  15. #################################################################

  16. MenuStyle * win
  17. MenuStyle * PopupDelayed, PopupDelay 200, Animation, TitleWarp
  18. #MenuStyle * Font "-*-bitstream vera sans-medium-r-normal-*-14-0-0-0-p-0-iso8859-1,  -*-ar pl new sung-medium-r-normal-*-14-*-*-*-c-*-iso10646-1"
  19. MenuStyle * Font "StringEncoding=gbk-0:xft:WenQuanYi Bitmap Song:pixelsize=15:encoding=iso10646-1"
  20. #MenuStyle * Font     "-wqy-*-medium-r-normal-*-16-*-*-*-*-*-iso10646-1"
  21. MenuStyle * Hilight3DThin, PopupOffset +0 100
  22. MenuStyle * MenuColorset 110, HilightBack, ActiveColorset 111
  23. MenuStyle * BorderWidth 2, TitleUnderlines1, SeparatorsLong, TrianglesSolid

  24. MenuStyle "WindowList" VerticalItemSpacing 5 5
  25. MenuStyle "WindowList" MenuColorset 110, HilightBack, ActiveColorset 111
  26. #MenuStyle "WindowList" Font "-*-bitstream vera sans-medium-r-normal-*-14-0-0-0-p-0-iso8859-1,  -*-ar pl new sung-medium-r-normal-*-14-*-*-*-c-*-iso10646-1"
  27. MenyStyle "WindowList" Font "StringEncoding=gbk-0:xft:WenQuanYi Bitmap Song:pixelsize=15:encoding=iso10646-1"
  28. #MenuStyle "WindowList" VerticalTitleSpacing 10 10
  29. #DestroyMenuStyle WindowList
  30. DesktopName 0 Windows List

  31. ImagePath /home/liangzi/.fvwm/icons/default/32x32/apps:+
  32. ImagePath /home/liangzi/.fvwm/decors/images:+
  33. ImagePath /usr/share/icons/wm-icons/16x16-general:+
  34. ImagePath /home/liangzi/.fvwm/icons/default/32x32/actions:+

  35. #ColormapFocus FollowsMouse

  36. #--------------------------------------------
  37. #-----------Add by liangzi-------------------
  38. CursorStyle ROOT left_ptr
  39. CursorStyle RIGHT_EDGE right_ptr black white
  40. CursorStyle MENU left_ptr black white
  41. CursorStyle TITLE left_ptr black white
  42. CursorStyle DEFAULT left_ptr black white
  43. CursorStyle SYS left_ptr black white
  44. CursorStyle WAIT watch black white
  45. CursorStyle RESIZE sizing black "#5477A0"
  46. CursorStyle MOVE fleur yellow black
  47. CursorStyle SELECT left_ptr black white
  48. CursorStyle POSITION left_ptr black white
  49. CursorStyle TOP top_side red black
  50. CursorStyle RIGHT right_side red black
  51. CursorStyle BOTTOM bottom_side red black
  52. CursorStyle LEFT left_side red black
  53. CursorStyle TOP_LEFT top_left_corner red black
  54. CursorStyle TOP_RIGHT top_right_corner red black
  55. CursorStyle BOTTOM_LEFT bottom_left_corner red black
  56. CursorStyle BOTTOM_RIGHT bottom_right_corner red black
  57. #---------------end of added by liangzi---------------


  58. #Style * StippledTitle
  59. #--------------------呵呵,看标题栏

  60. Style * IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png
  61. #Style * Font "-*-bitstream vera sans-medium-r-*-*-14-*,-misc-ar pl new sung-medium-r-normal-*-14-*-*-*-*-*-iso10646-1"
  62. #Style * IconFont "-*-bitstream vera sans-medium-r-*-*-14-*,-misc-ar pl new sung-medium-r-normal-*-14-*-*-*-*-*-iso10646-1"

  63. Style * Font "StringEncoding=gbk-0:xft:WenQuanYi Bitmap Song:pixelsize=15:bold:encoding=iso10646-1"
  64. Style * IconFont "StringEncoding=gbk-0:xft:WenQuanYi Bitmap Song:pixelsize=15:encoding=iso10646-1"
  65. Style * HilightFore black, HilightBack white
  66. Style * BorderWidth 2, HandleWidth 2
  67. Style * Icon unknown1.xpm, Color black/black
  68. Style * MWMFunctions, MWMDecor, HintOverride
  69. Style * DecorateTransient, NoPPosition
  70. Style * IconBox 0 -10 -280 -1
  71. Style * FocusFollowsMouse
  72. Style * CascadePlacement
  73. #Style *                  NoIcon, NoIconTitle
  74. #最小化不显示图标和图标下面的字

  75. #Style "XMMS_Playlist" WindowListSkip
  76. #Style "Torsmo*"         WindowListSkip, StaysOnBottom, NeverFocus
  77. Style "Gdeskcal" WindowListSkip, StaysOnbottom
  78. Style "fbpanel*" StaysOnTop

  79. # some simple default key bindings:
  80. Key F1 A M GotoPage 0 0
  81. Key F2 A M GotoPage 1 0
  82. #Key F3 A M GotoPage 0 1
  83. #Key F4 A M GotoPage 1 1

  84. Key F12 A A  Module FvwmConsole
  85. Key L A 4 Exec exec xscreensaver-command -lock
  86. Key D A 4 All (AcceptsFocus CurrentPage !Iconic !Shaded, !"gDesklets*", !"Gdeskcal*") Thumbnail
  87. Key C A 4 Exec exec mrxvt
  88. Key R A 4 Exec exec grun
  89. Key Q A 4 Exec exec qterm

  90. Key Tab A M WindowList Root c c CurrentDesk, NoGeometry, NoCurrentDeskTitle, CurrentAtEnd, IconifiedAtEnd
  91. Key Space A M Menu Window-Ops2 rectangle $[w.x]x$[w.y]+10+10 +100 +100
  92. Key     equal   A       M       Exec exec amixer set PCM 2%+
  93. Key     minus   A       M       Exec exec amixer set PCM 2%-
  94. Key Z A 4 All ("15092486*", !Focused) showqq

  95. # some simple default mouse bindings:
  96. #   for the root window:
  97. Mouse 3        R           A       Menu RootMenu Nop
  98. Mouse 1        R            A       -

  99. #   for the title bar buttons:
  100. Mouse 0        1            A              Menu Window-Ops2 Close
  101. Mouse 1        2        A        Close
  102. Mouse 1        6        A        Thumbnail
  103. Mouse 1        4            A             Maximize

  104. #   for other parts of the window/borders/icons:
  105. Mouse 1        F        A        Resize-or-Raise
  106. Mouse 1        S        A        Resize-or-Raise
  107. Mouse 1 T        A        Move-or-Raise
  108. Mouse 1        I        A        Move-or-Iconify
  109. Mouse 2        I        A        Thumbnail
  110. Mouse 2        FST        A        Menu Window-Ops2 Nop
  111. Mouse 3        TSIF        A        RaiseLower

  112. Stroke N5456 0 A C Exec exec xkill
  113. Stroke N65456 0 A C Exec exec xkill



  114. ## 读入窗口样式
  115. #Read ./decorations/Clear/Violet.theme
  116. #Read ./decorations/Clear/Red.theme
  117. #Read ./decorations/Clear/Orange.theme
  118. #Read ./decorations/Clear/Navy.theme
  119. #Read ./decorations/Clear/Mono.theme
  120. #Read ./decorations/Clear/Green.theme
  121. #Read ./decorations/Clear/Blue.theme
  122. #Read ./decorations/Crystal/WhiteDesktop.theme
  123. #Read ./decorations/Crystal/RedDesktop.theme
  124. #Read ./decorations/Crystal/Red - Cyan.theme
  125. #Read ./decorations/Crystal/IrishDesktop.theme
  126. #Read ./decorations/Crystal/DarkGreen.theme
  127. #Read ./decorations/Crystal/DarkDesktop.theme
  128. #Read ./decorations/Crystal/CrystalZono.theme
  129. #Read ./decorations/Crystal/CIOS.theme
  130. #Read ./decorations/Crystal-Aqua/Default.theme
  131. #Read ./decorations/Dawn of a Terminal/Red.theme
  132. #Read ./decorations/Dawn of a Terminal/Purple.theme
  133. #Read ./decorations/Dawn\ of\ a\ Terminal/Green.theme
  134. #Read ./decorations/Dawn of a Terminal/Blue.theme
  135. #Read ./decorations/Elberg/Elberg.theme
  136. #Read ./decorations/Fear/Original.theme
  137. Read ./decorations/Fear/Original\ (crystalized).theme
  138. #Read ./decorations/Gentoo/Gentoo.theme
  139. #Read ./decorations/Gentoo/Gentoo Gray.theme
  140. #Read ./decorations/Gentoo/Gentoo Alternative.theme
  141. #Read ./decorations/Industrial/Industrial\ (Metacity\ version).theme
  142. #Read ./decorations/Industrial/Industrial (Crystal version).theme
  143. #Read ./decorations/Metabox/Metabox (Metacity version).theme
  144. #Read ./decorations/Metabox/Metabox (Crystal version).theme
  145. #Read ./decorations/Winter/Winter.theme
  146. #Read ./decorations/Winter/Winter (no icon).theme


  147. ## 用快捷键叫 qq 时要做的事情
  148. AddtoFunc showqq
  149. + I MoveToPage
  150. + I Iconify off
  151. + I Raise
  152. + I Focus
  153. + I WarpToWindow 50 2

  154. ## 以下三个函数是控制 fbpanel 自动隐藏的
  155. AddtoFunc autohide
  156. + I ThisWindow ($0) Deschedule $[w.id]
  157. + I ThisWindow ($0) KeepRc ThisWindow (shaded) WindowShade off
  158. + I TestRc (!Match) All ($0, !shaded) autohide_hide $1 $2

  159. AddtoFunc autohide_hide
  160. + I Schedule $0 $[w.id] WindowShade $1
  161. + I Schedule $0 $[w.id] Deschedule $[w.id]

  162. AddToFunc enter_handler
  163. + I autohide fbpanel 100 N

  164. ## 启动fvwm时要做的事情
  165. AddToFunc StartFunction
  166. + I Exec exec habak ~/pics/puma.jpg
  167. + I Exec exec fbpanel
  168. + I Module FvwmAuto FvwmAutohide -menter enter_handler
  169. + I Exec exec env LC_ALL=C torsmo
  170. + I Test (Restart) All (Iconic) Test (f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png

  171. AddToFunc InitFunction
  172. + I Nop

  173. AddToFunc SessionInitFunction
  174. + I Nop

  175. ## 退出 fvwm 时要做的事情
  176. AddToFunc ExitFunction
  177.   + I Exec killall fbpanel
  178.   + I Exec killall gdeskcal
  179.   + I Exec killall python
  180.   + I Exec killall torsmo
  181.   + I Test (!ToRestart) Exec rm -f $[FVWM_USERDIR]/icon.tmp.*
  182. #WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png

  183. ## 通过 alt-tab 使窗口得到焦点时,鼠标的位置 50%x, 2%y
  184. AddToFunc WindowListFunc I WarpToWindow 50 2

  185. ## menu 包在维护这个菜单,详见 man menu
  186. Read /home/liangzi/.fvwm/menudefs.hook

  187. ##  根菜单
  188. DestroyMenu RootMenu
  189. AddToMenu RootMenu
  190. +                        "Debian%deb.png%"        Popup "/Debian"
  191. +                        ""                        Nop
  192. +                        "rxvt%terminal.png%"        Exec exec mrxvt
  193. +                        "Firefox%firefox.png%"        Exec exec /home/liangzi/tmp/firefox/firefox
  194. +                        "QQ%QQ.png%"                Exec exec lumaqq
  195. +                        "QTerm%x.png%"                Exec exec qterm
  196. +                        ""                        Nop
  197. +                       "Restart Fvwm%reload.png%"      Restart
  198. +                              "Yes, Really Quit%error.png%"  Quit

  199. ##  窗口菜单
  200. AddToMenu Window-Ops2        "Move (&M)%window-move.xpm%"                Move
  201. #+                        "&Resize%window-resize.xpm%"        Resize
  202. #+                        "R&aise%window-raise.xpm%"        Raise
  203. #+                        "&Lower%window-lower.xpm%"        Lower
  204. +                        "Minimize (&I)%window-iconify.xpm%"        Thumbnail
  205. #+                        "(Un)&Stick%window-stick.xpm%"        Stick
  206. +                       "Maxmize (&X)%window-maximize.xpm%" Maximize
  207. +                        ""                Nop
  208. +                        "&Delete%window-delete.xpm%"        Delete
  209. +                       "Destroy%window-destroy.xpm%"   Destroy
  210. +                        "&Close%window-close.xpm%"        Close
  211. +                        ""                Nop
  212. +                        "Refresh Window" RefreshWindow

  213. ##  一些窗口操作的函数
  214. AddToFunc Move-or-Raise                I Raise
  215. +                                M Move
  216. +                                  D Maximize

  217. AddToFunc Move-or-Iconify        I Raise
  218. +                                M Move
  219. +                                D Thumbnail

  220. AddToFunc Resize-or-Raise        I Raise
  221. +                                M Resize
  222. +                                D Lower



  223. DestroyFunc Thumbnail
  224. AddToFunc Thumbnail
  225. + I Raise
  226. + I SetEnv Icon-$[w.id] $[w.iconfile]
  227. + I ThisWindow (!Shaded Iconifiable !Iconic) PipeRead \
  228.     "xwd -silent -id $[w.id] | convert -scale 64 -frame 1x1 \
  229.     -mattecolor black -quality 0 xwd:- \
  230.     png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png \
  231.     && echo WindowStyle IconOverride, \
  232.     Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
  233.     || echo Nop"
  234. + I Iconify

  235. #DeThumbnail函数用来恢复存的图标:
  236. DestroyFunc DeThumbnail
  237. AddToFunc DeThumbnail
  238. + I PipeRead "echo WindowStyle Icon \\$\\[Icon-$[w.id]\\]"
  239. + I UnsetEnv Icon-$[w.id]
  240. + I Exec rm -f $[FVWM_USERDIR]/icon.tmp.$[w.id].png

  241. #要想在重启fvwm后还能使用这些缩略图标,可以在StartFunction里加入下面的几行
  242. #AddToFunc StartFunction I Test (Restart) All (Iconic) \
  243. #Test (f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png

  244. #你也可以检查一下忘了删除的缩略图,并在ExitFunction函数里删除它们。

  245. #AddToFunc ExitFunction I Test (!ToRestart) \
  246. #Exec rm -f $[FVWM_USERDIR]/icon.tmp.*
复制代码

Post by Yei
又看了一遍,似乎只讲了如何设置透明的模块、菜单、窗口装饰,也介绍了Thumbnail。
但我仍然不知道怎么让一个Thumbnail产生的图标成半透明的。
回复 支持 反对

使用道具 举报

发表于 2005-10-8 09:44:58 | 显示全部楼层
Post by Yei
你的窗口缩略图是怎么做成半透明的?
能不能共享一下你的设置方法

我的方法:
先设置colorset:
### General Colorset
Colorset 3 fg #777777, bg #ffffff, fgsh #bbbbbb, RootTransparent, Tint #283e5e 70, IconAlpha 60
Colorset 4 fg #000000, bg #ffffff, fgsh #bbbbbb, RootTransparent, Tint #101f36 70, IconAlpha 100
其中IconAlpha 60就是不透明度.
然后就是应用颜色设置:Style * Colorset 3, HilightColorset 4
这样,我的图标就能实现半透明效果了,鼠标移上去又变为不透明
我不知道怎样才能只让Icon应用这个颜色设置,所以就用了"*",如果谁知道告诉我,我也还有很多不懂的地方,请大家指教!!
回复 支持 反对

使用道具 举报

发表于 2005-10-30 18:18:01 | 显示全部楼层
怎样解决FVWM下gnome-terminal字体恶心的问题?
回复 支持 反对

使用道具 举报

发表于 2005-10-30 20:53:57 | 显示全部楼层
Post by terrylai
怎样解决FVWM下gnome-terminal字体恶心的问题?

这个好像就不关FVWM的事了,gnome-terminal本身就可以设置字体的,具体在哪个菜单下我就不记得了(我现在不是用我的机子),你自己找找看吧
回复 支持 反对

使用道具 举报

发表于 2005-10-30 22:15:32 | 显示全部楼层
谢谢,可是我在Gnome里gnome-terminal的字体还好好的啊!换成FVWM后也没改什么字体配置啊
回复 支持 反对

使用道具 举报

发表于 2005-10-31 09:48:08 | 显示全部楼层
这样的好贴下一定要留名。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-4 01:39:40 | 显示全部楼层
至少要把对比的抓图贴上来看看吧
另外,fvwm 下可以用 mrxvt/mlterm 等
没必要抱着 gnome-terminal 不放
Post by terrylai
怎样解决FVWM下gnome-terminal字体恶心的问题?
回复 支持 反对

使用道具 举报

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

本版积分规则

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