LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 799|回复: 1

fvwm下xorg的cpu使用率持续30%左右。

[复制链接]
发表于 2006-7-12 18:19:20 | 显示全部楼层 |阅读模式
RT
下面是我网上找的一个配置文件,是不是开了什么功能才会这样,现在机子很卡,随便拖动个窗口都会lag。
  1. # set imagepath to directorys we wish to use
  2. ImagePath $[HOME]/.fvwm/icons

  3. # environmental variables
  4. SetEnv fvwm_icon_size 96

  5. ## colormaps
  6. Colorset 0 fg #ffffff, bg #4584b5, hi gray, sh gray, RootTransparent buffer, Tint #4584b5 0
  7. Colorset 1 fg #ffffff, bg #4584b5, hi gray, sh gray, RootTransparent buffer, Tint #4584b5 0, IconAlpha 80
  8. Colorset 2 fg #ffffff, bg #7f7f7f, hi gray, sh gray, RootTransparent buffer, Tint #4584b5 0
  9. Colorset 3 fg #bfbfbf, bg #bfbfbf, hi #bfbfbf, sh #bfbfbf, RootTransparent buffer, Tint #4584b5 0
  10. Colorset 4 fg #bfbfbf, bg #bfbfbf, hi #bfbfbf, sh #bfbfbf, RootTransparent buffer, Tint #4584b5 0
  11. Colorset 5 fg #ffffff, bg gray60, hi gray, sh gray, RootTransparent buffer, Tint #4584b5 0
  12. Colorset 6 fg #ffffff, bg #4584b5, hi gray, sh gray, RootTransparent buffer, Tint #4584b5 50
  13. Colorset 7 fg #ffffff, bg gray, hi gray, sh gray, RootTransparent buffer, Tint #4584b5 0
  14. Colorset 8 fg #f0f0f0, bg #4584b5, hi #ffffff, sh #ffffff, RootTransparent buffer, Tint #4584b5 0


  15. # disable egde scrolling and EdgeCommand
  16. EdgeResistance 100 5
  17. EdgeThickness  0
  18. EdgeScroll 0 0
  19. BugOpts RaiseOverUnmanaged on

  20. # define the difference between click and hold
  21. ClickTime 200

  22. # use 8 viewports
  23. DeskTopSize 8x1

  24. # StaysOnBottom is supposed to put stuff in the very bottom layer, not on layer
  25. 2
  26. DefaultLayers 0 4 6

  27. # cursos styles - use an arrow instead of 'X' in root window
  28. CursorStyle ROOT    left_ptr
  29. CursorStyle TITLE   left_ptr
  30. CursorStyle SYS     left_ptr
  31. CursorStyle DEFAULT left_ptr
  32. CursorStyle MENU    left_ptr

  33. # window behavior
  34. OpaqueMoveSize -1
  35. SnapAttraction 3
  36. SnapGrid 1 1
  37. ColorMapFocus  FollowsFocus

  38. # default window styles
  39. #DefaultFont "xft:AR PL New Sung:size=10:encoding=iso10646-1"
  40. DefaultFont "xft:SimSun:size=12:encoding=iso10646-1"
  41. DefaultColorset 0

  42. Style * Colorset 1, HilightColorset 2
  43. Style * BorderWidth 0, HandleWidth 1
  44. Style * BorderColorset 4, HilightBorderColorset 5
  45. Style * MWMFunctions, MWMDecor
  46. Style * HintOverride, DecorateTransient, NoPPosition
  47. Style * MouseFocusClickRaises, SloppyFocus, GrabFocusOff
  48. Style * SmartPlacement
  49. Style * WindowShadeSteps 20
  50. Style * Button 1, Button 2, Button 4, Button 6
  51. Style * UseDecor DefaultDecor

  52. DestroyDecor DefaultDecor
  53. AddToDecor   DefaultDecor
  54. + TitleStyle LeftJustified Height 18
  55. + TitleStyle Active   ( Colorset 0 -- Flat ) InActive ( Colorset 2 -- Flat )
  56. + ButtonStyle All Active   ( Colorset 0 -- Flat )
  57. + ButtonStyle All InActive ( Colorset 2 -- Flat )
  58. + AddButtonStyle 1 Inactive   Vector 5 40x40@3 40x60@3 60x60@3 60x40@3 40x40@3 -- Flat
  59. + AddButtonStyle 1 ActiveUp   Vector 5 40x40@3 40x60@3 60x60@3 60x40@3 40x40@3 -- Flat
  60. + AddButtonStyle 1 ActiveDown Vector 4 49x49@3 49x50@3 50x50@3 49x49@3 -- Flat
  61. + AddButtonStyle 6 Inactive   Vector 5 30x60@3 60x60@3 60x50@3 30x50@3 30x60@3 -- Flat
  62. + AddButtonStyle 6 ActiveUp   Vector 5 30x60@3 60x60@3 60x50@3 30x50@3 30x60@3 -- Flat
  63. + AddButtonStyle 6 ActiveDown Vector 5 35x65@3 65x65@3 65x60@3 35x60@3 35x65@3 -- Flat
  64. + AddButtonStyle 4 Inactive   Vector 7 30x30@3 30x60@3 60x60@3 60x30@3 30x30@3 30x35@3 60x35@3 -- Flat
  65. + AddButtonStyle 4 ActiveUp   Vector 7 30x30@3 30x60@3 60x60@3 60x30@3 30x30@3 30x35@3 60x35@3 -- Flat
  66. + AddButtonStyle 4 ActiveDown Vector 7 35x35@3 35x65@3 65x65@3 65x35@3 35x35@3 35x40@3 65x40@3 -- Flat
  67. + AddButtonStyle 2 Inactive   Vector 4 30x30@3 60x60@3 60x30@4 30x60@3 -- Flat
  68. + AddButtonStyle 2 ActiveUp   Vector 4 30x30@3 60x60@3 60x30@4 30x60@3 -- Flat
  69. + AddButtonStyle 2 ActiveDown Vector 4 35x35@3 65x65@3 65x35@4 35x65@3 -- Flat
  70. + ButtonStyle 1 - MwmDecorMenu
  71. + ButtonStyle 6 - MwmDecorMin
  72. + ButtonStyle 4 - MwmDecorMax

  73. BorderStyle Active   Solid #0f0f0f -- NoInset HiddenHandles
  74. BorderStyle Inactive Solid #ffffff -- NoInset HiddenHandles

  75. # icons  - should go to top left
  76. Style * IconBox 30 100 100 -15, IconFill top left
  77. Style * IconTitle, IndexedIconName
  78. Style * IconTitleColorset 3, HilightIconTitleColorset 3
  79. Style * IconTitleRelief 0

  80. # program specific styles
  81. Style FvwmPager  NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip, BorderWidth 1, BorderColorset 5, NoHandles, NeverFocus, StaysOnTop
  82. #Style torsmo     NoTitle, Sticky, WindowListSkip, NoHandles, NeverFocus, StaysOnBottom
  83. Style FvwmDocker NoTitle, Sticky, Handlewidth 0, Borderwidth 0, WindowListSkip,
  84. StaysOnTop

  85. #==============================================================================
  86. #第2部分:
  87. # 1)
  88. #==============================================================================
  89. Colorset 20 fg #ffffff, bg #4584b5, hi gray, sh gray, RootTransparent buffer, IconAlpha 80, Tint #4584b5 0
  90. Colorset 21 fg #ff0000, bg #4584b5, hi gray, sh gray, RootTransparent buffer, IconAlpha 100, Tint #4584b5 0
  91. MenuStyle * MenuColorset 20, ActiveColorset 21
  92. MenuStyle * Hilight3DOff, HilightBack
  93. MenuStyle * PopupOffset 0 100, PopupDelay 300
  94. MenuStyle * BorderWidth 0
  95. MenuStyle * TitleUnderlines1
  96. MenuStyle * TrianglesSolid
  97. MenuStyle * SeparatorsShort
  98. MenuStyle * Animation
  99. MenuStyle * ItemFormat "%.2|%.5i%.5l%.5i%2.3>%2|"
  100. MenuStyle * VerticalItemSpacing 0 0

  101. # 应用程序替换图标
  102. Style "rox" Icon 48x48/drivemount-applet.png, IconOverride
  103. Style "gedit" Icon 48x48/gedit-icon.png, IconOverride
  104. Style "firefox" Icon 48x48/netscape.png, IconOverride
  105. Style "gimp" Icon 48x48/gimp.png, IconOverride
  106. Style "lumaqq" Icon 48x48/QQ.png, IconOverride
  107. Style "terminal" Icon 48x48/gnome-xterm.png, IconOverride, WindowShadeShrinks, Notitle, NoHandles

  108. ###############################################################################
  109. ## 菜单定义
  110. ###############################################################################
  111. DestroyMenu MenuFvwmRoot
  112. AddToMenu MenuFvwmRoot
  113. + %24x24/gnome-main-menu.png%"显示桌面背景" All (AcceptsFocus CurrentPage !Iconic !Shaded) Thumbnail
  114. + "" Nop
  115. # 我的常用软件
  116. + %24x24/drivemount-applet.png%"家目录" Exec exec rox
  117. + %24x24/gimp.png%"gimp" Exec exec gimp
  118. + %24x24/gnome-xterm.png%"gnome-terminal" Exec exec gnome-terminal
  119. + %24x24/gnome-applications.png%"编辑器" Exec exec gedit
  120. #+ %24x24/gedit-icon.png%"gvim编辑工具" Exec exec gvim
  121. + %24x24/netscape.png%"网页浏览" Exec exec firefox
  122. + %24x24/aim.png%"聊天工具" Exec exec lumaqq
  123. #+ %24x24/l33t_WIN_msn.png%"QQ聊天工具" Exec exec /opt/LumaQQ/lumaqq
  124. + "" Nop
  125. + %24x24/java.png%"退出Fvwm2管理" Quit
  126. + %24x24/up2date.png%"重新加载Fvwm2" Restart
  127. + "" Nop
  128. + %24x24/gnome-note.png%"配置fvwm式样" Exec exec gvim ~/.fvwm/.fvwm2rc


  129. DestroyMenu MenuWindowOptions
  130. AddToMenu   MenuWindowOptions
  131. + "move"      Move
  132. + "resize"    Resize
  133. + "raise"     Raise
  134. + "lower"     Lower
  135. + "iconify"   Thumbnail
  136. + "(un)stick" Stick
  137. + "maximize"  Maximize
  138. + ""          Nop
  139. + "close"     Close
  140. + "delete"    Delete
  141. + "destroy"   Destroy

  142. # bindings
  143. # use IgnoreModifiers to fix the NumLock bug(?)
  144. IgnoreModifiers L25

  145. # root window
  146. Key Tab A M WindowList NoGeometry
  147. Key F2  A M Resize
  148. Key F4  A M Close

  149. Mouse 1 R A Menu MenuFvwmRoot Nop
  150. Mouse 3 R A WindowList NoGeometry

  151. # titlebar buttons
  152. Mouse 0 1 A Menu MenuWindowOptions Close
  153. Mouse 0 6 A Thumbnail
  154. Mouse 0 4 A Maximize
  155. Mouse 0 2 A FuncDestroyOnHold

  156. # window/border/icon
  157. Mouse 1 I A DeThumbnail
  158. Mouse 1 T A FuncMoveOrMaximize

  159. # initfunctions
  160. DestroyFunc StartFunction
  161. AddToFunc   StartFunction
  162. + I Exec exec fvwm-root --dither --retain-pixmap $[HOME]/.fvwm/wallpaper/wallpaper.png
  163. + I Module FvwmButtons -g 500x50+262-0 FvwmDocker
  164. + I Module FvwmPager
  165. + I Module FvwmAnimate
  166. + I Module FvwmAuto FvwmAutoHide -menter FvwmDockerAutoEnter
  167. + I Function StartDocker
  168. + I Test (Restart) All (Iconic) WindowStyle IconOverride

  169. DestroyFunc ExitFunction
  170. AddToFunc   ExitFunction
  171. + I KillModule FvwmPager
  172. + I KillModule FvwmDocker
  173. + I KillModule FvwmAnimate
  174. + I KillModule FvwmAuto
  175. + I Exec exec sync

  176. # functions

  177. # make windowlists etc. warp pointer to the middle of
  178. # the window instead of top left
  179. AddToFunc WindowListFunc
  180. + I WarpToWindow 50 50


  181. #----------------------------------------------------------------------#
  182. # Name:     Thumbnail
  183. # Purpose:  Iconify a window with a reduced screenshot of the application
  184. #           Window, looks really cool.
  185. #
  186. #           Uses FvwmEvent to remove the Icon when deiconified, you will want
  187. #           to remove this if you use WindowStyle elsewhere.
  188. #
  189. #           Thumbnailing example: http://dev.gentoo.org/~taviso/step2.png
  190. #
  191. #----------------------------------------------------------------------#
  192. DestroyFunc Thumbnail
  193. AddToFunc   Thumbnail
  194. + I Raise
  195. + I PipeRead "xwd -silent -id $[w.id] | convert -scale $[fvwm_icon_size] -frame
  196. 1x1 \
  197.               -mattecolor black -quality 0 xwd:- png:$[HOME]/.fvwm/icon.tmp.$[w.id].png \
  198.               && echo WindowStyle IconOverride, Icon $[HOME]/.fvwm/icon.tmp.$[w.id].png, StaysOnBottom \
  199.               || echo Nop"
  200. + I Iconify

  201. DestroyFunc DeThumbnail
  202. AddToFunc   DeThumbnail
  203. + I Iconify off
  204. + I DestroyWindowStyle
  205. + I Exec exec rm -f $[HOME]/.fvwm/icon.tmp.$[w.id].png

  206. DestroyFunc FuncMoveOrMaximize
  207. AddToFunc   FuncMoveOrMaximize
  208. + I Raise
  209. + M Move
  210. + D Maximize 100 100

  211. DestroyFunc FuncDestroyOnHold
  212. AddToFunc   FuncDestroyOnHold
  213. + C Schedule 100 Close
  214. + H Destroy
  215. + H Beep

  216. DestroyFunc StartDocker
  217. AddToFunc   StartDocker
  218. #+ I Wait FvwmDocker
  219. + I AutoHide FvwmDocker 0 0 S

  220. DestroyFunc FvwmDockerAutoEnter
  221. AddToFunc   FvwmDockerAutoEnter
  222. + I AutoHide FvwmDocker 100 3600 S

  223. #----------------------------------------------------------------------#
  224. # These functions modified from the functions provided in the fvwm FAQ.
  225. # http://www.fvwm.org/documentation/faq/#7.17
  226. #----------------------------------------------------------------------#
  227. DestroyFunc AutoHide
  228. AddToFunc   AutoHide
  229. + I ThisWindow ($0) Deschedule $[w.id]
  230. + I TestRc (!Match) Deschedule -$[w.id]
  231. + I ThisWindow ($0) ThisWindow (shaded) AutohideShow $1 $3
  232. + I TestRc (!Match) All ($0, !shaded) AutohideHide $2 $3

  233. DestroyFunc AutohideShow
  234. AddToFunc   AutohideShow
  235. + I Schedule $0 -$[w.id] WindowShade $1 off
  236. + I Schedule $0 -$[w.id] Raise
  237. + I Schedule $0 -$[w.id] Deschedule $[w.id]
  238. + I Schedule $0 -$[w.id] Deschedule -$[w.id]

  239. DestroyFunc AutohideHide
  240. AddToFunc   AutohideHide
  241. + I Schedule $0 $[w.id] WindowShade $1 on
  242. + I Schedule $0 $[w.id] Deschedule $[w.id]
  243. + I Schedule $0 $[w.id] Deschedule -$[w.id]

  244. # this one originates from ikaros configs iirc
  245. DestroyFunc FuncDockLaunch
  246. AddToFunc   FuncDockLaunch
  247. + C Any ($1) Next ($1) WindowListFunc
  248. + C TestRc (NoMatch) Exec $0
  249. + H Any ($1) WindowList ($1) Rectangle +$2+$3 0 -100m CurrentAtEnd UseListSkip SortByClass NoCurrentDeskTitle
  250. + D Exec $0

  251. # module configs

  252. DestroyModuleConfig FvwmAnimate: *
  253. *FvwmAnimate: Effect Flip


  254. Colorset 40 fg #ffffff, bg #ffffff, hi #ffffff, sh #ffffff, RootTransparent buffer, Tint #4584b5 0
  255. Colorset 41 fg #ffffff, bg #ffffff, hi #ffffff, sh #ffffff, RootTransparent buffer, Tint #4584b5 0
  256. DestroyModuleConfig FvwmPager: *
  257. *FvwmPager: Colorset        * 40
  258. *FvwmPager: HilightColorset * 41
  259. *FvwmPager: Borderwidth     0
  260. *FvwmPager: Font            None
  261. *FvwmPager: DesktopScale    22
  262. *FvwmPager: Geometry        400x17-130+0
  263. *FvwmPager: MoveThreshold   0
  264. *FvwmPager: SloppyFocus
  265. *FvwmPager: UseSkipList
  266. *FvwmPager: SmallFont None
  267. *FvwmPager: WindowColorsets   2 0
  268. *FvwmPager: WindowBorderWidth 1

  269. *FvwmPager: Balloons           All
  270. *FvwmPager: BalloonColorset    * 0
  271. #*FvwmPager: BalloonFont "xft:AR PL New Sung:size=10:encoding=iso10646-1"
  272. *FvwmPager: BalloonFont "xft:SimSun:size=12:encoding=iso10646-1"
  273. *FvwmPager: BalloonYOffset     +2
  274. *FvwmPager: BalloonBorderWidth 1


  275. #==============================================================================
  276. #第5部分:
  277. # 1) 修改色彩配置.用IconAlpha实现被选择图标自动加亮. [yonsan/20050826]
  278. #==============================================================================
  279. Colorset 50 fg #ffffff, bg #4584b5, hi gray, sh gray, RootTransparent buffer, IconAlpha 75, Tint #4584b5 0
  280. Colorset 51 fg #ffffff, bg #7f7f7f, hi gray, sh gray, RootTransparent buffer, IconAlpha 100, Tint #4584b5 0
  281. DestroyModuleConfig FvwmDocker: *
  282. *FvwmDocker: Colorset 50
  283. *FvwmDocker: ActiveColorset 51
  284. *FvwmDocker: Rows    1
  285. *FvwmDocker: Columns 9
  286. *FvwmDocker: Frame   0
  287. *FvwmDocker: Padding 1 1
  288. *FvwmDocker: (1x1, Icon 48x48/gnome-main-menu.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch  synaptic synaptic* $left $top`, `Next (synaptic*) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  289. *FvwmDocker: (1x1, Icon 48x48/gnome-xterm.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch gnome-terminal gnome-terminal* $left $top`, `Next (gnome-terminal*) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  290. *FvwmDocker: (1x1, Icon 48x48/mozilla.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch firefox *Firefox $left $top`, `Next (*Firefox) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  291. *FvwmDocker: (1x1, Icon 48x48/gedit-icon.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch gedit *gedit $left $top`, `Next (*gedit) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  292. #*FvwmDocker: (1x1, Icon 48x48/gnome-applications.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch abiword abiword* $left $top`,`Next (abiword*) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  293. *FvwmDocker: (1x1, Icon 48x48/QQ.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch lumaqq lumaqq* $left $top`, `Next (lumaqq*) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  294. *FvwmDocker: (1x1, Icon 48x48/drivemount-applet.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch rox ROX-Filer* $left $top`, `Next (ROX-Filer*) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  295. *FvwmDocker: (1x1, Icon 48x48/gimp.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch gimp *GIMP $left $top`, `Next (*GIMP) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
  296. *FvwmDocker: (1x1, Icon 48x48/lumiere.png, ActionOnPress, Action(Mouse 1) `FuncDockLaunch beep-media-player beep-media-player* $left $top`, `Next (beep-media-player*) Popup MenuWindowOptions Rectangle +$left +$top 0 -100m`)
复制代码
发表于 2006-7-12 23:41:39 | 显示全部楼层
  1. IgnoreModifiers L25
  2.               Important Note: This command creates  a  lot  of  extra  network
  3.               traffic,  depending  on your CPU, network connection, the number
  4.               of Key or Mouse commands in your configuration file and the num-
  5.               ber  of  modifiers  you  want  to  ignore.  If you do not have a
  6.               lightning fast machine or  very  few  bindings  you  should  not
  7.               ignore  more  than two modifiers. I.e. do not ignore scroll-lock
  8.               if you have no problem with it.  In the FAQ you can find a  bet-
  9.               ter solution of this problem.
复制代码
除了这, 没看出有什么问题,试
IgnoreModifiers L5
回复 支持 反对

使用道具 举报

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

本版积分规则

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