Advertisement
richardgv

fvwm config

Apr 9th, 2011
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.97 KB | None | 0 0
  1. # The correct order for inserting configurations is:
  2. # 1. Colors
  3. # 2. Assorted configuration paramters such as ClickToFocus, or MWMBorders
  4. # 3. Path setup (ModulePath, ImagePath)
  5. # 4. Style settings, including the default style Style "*" ...
  6. # 5. InitFunction and ResetFunction definitions.
  7. # 6. Other Functions. Functions cannot be forward referenced from
  8. # other functions, but they can be backward referenced.
  9. # 7. Menus definitions. Same caveats about forward referencing
  10. # 8. Key and Mouse Bindings.
  11. # 9. Module options.
  12.  
  13. # The order of steps 5, 6, and 7 is not critical, as long as there are
  14. # no forward references to functions or menus.
  15.  
  16. # If you get it wrong, the most common problem is that color or font settings
  17. # are ignored
  18.  
  19. Colorset 3 fg black, bg rgb:EF/D2/79, Plain, NoShape
  20. Colorset 4 fg black, bg rgb:AF/D7/75, Plain, NoShape
  21.  
  22. # FPLenient to fix the focus issue of Wine
  23. Style * SloppyFocus, FPLenient, FPOverrideGrabFocus, !FPGrabFocus, !FPGrabFocusTransient
  24. Style * TileCascadePlacement, EWMHPlacementUseWorkingArea
  25. Style * DecorateTransient
  26. Style * MwmDecor, EWMHUseStackingOrderHints
  27. # Style * BorderColorset 3, HilightBorderColorset 4
  28. Style * SnapAttraction 12
  29. Style * EdgeMoveResistance 12
  30. Style * IconSize 48 48
  31. Style * IconBox 256x480-0+220@c, IconFill t r
  32. Style tint2 StaysOnTop, NeverFocus
  33. Style Conky NeverFocus
  34.  
  35. Style * Icon Unknown.xpm
  36. Style * NoIconOverride
  37. Style * IconSize 48 48
  38. Style urxvt Icon gnome-color-xterm.xpm, MiniIcon mini/mini.display.xpm
  39. Style urxvtc Icon gnome-color-xterm.xpm, MiniIcon mini/mini.display.xpm
  40.  
  41. # SetEnv deffont -xos4-terminus-medium-*-normal--12-120-72-72-c-60-iso10646-1
  42. SetEnv deffont "xft:Terminus:pixelsize=12:encoding=iso10646-1"
  43. DefaultFont $[deffont]
  44. OpaqueMoveSize 0
  45. EdgeScroll 100 100
  46. EdgeResistance 1000
  47. EwmhBaseStruts 0 0 16 0
  48.  
  49. MenuStyle * PopupDelayed, PopupDelay 200
  50. CursorStyle ROOT top_left_arrow
  51.  
  52. # NOTES: the Modules are in /usr/local/libexec/fvwm/`fvwm2 -version`
  53. # the system-wide rc file could be in /usr/local/etc
  54. # Example module configs could be in /usr/local/share/fvwm
  55.  
  56. # Module path and paths to the icons
  57. # ModulePath is a colon-separated list, just like regular unix PATH
  58. #
  59.  
  60. SetEnv BaseDir $.
  61. ImagePath $[BaseDir]/images:$[BaseDir]/images/icons
  62.  
  63. DesktopSize 1 1
  64.  
  65. #############################################################################
  66.  
  67. # Stuff to do at start-up
  68.  
  69. DestroyFunc StartFunction
  70. AddToFunc StartFunction
  71. + I PipeRead 'feh --bg-scale wallpapers/earth.jpg 1>&2'
  72. + I Function ExecIfNoWindow tint2 tint2
  73. + I Function ExecIfNoWindow conky conky
  74.  
  75. DestroyFunc ExecIfNoWindow
  76. AddToFunc ExecIfNoWindow
  77. + I All ($0) Nop
  78. + I TestRc (NoMatch) Exec exec $1
  79.  
  80. #DestroyFunc InitFunction
  81. # AddToFunc InitFunction
  82.  
  83.  
  84. ######################## MENUS ##############################
  85. # Program menu (B1)
  86. DestroyMenu MenuFvwmRoot
  87. AddToMenu MenuFvwmRoot "$[gt.Root Menu]" Title
  88. + "&0. tmux" PipeRead "echo -n 'Exec exec urxvtc -e '; tmux has-session 2> /dev/null && echo 'tmux attach' || echo 'tmux';"
  89. + "&1. gvim" Exec exec gvim
  90. + "&2. firefox" Exec exec firefox
  91. + "&3. thunderbird" Exec exec thunderbird
  92. + "&4. urxvtc" Exec exec urxvtc
  93. + "&5. chromium" Exec exec chromium
  94. + "&6. ttsapp" Exec exec wine C:\\Program\ Files\\NeoSpeech\\Paul16\\lib\\TTSApp.exe
  95. + "&7. goldendict" Exec exec goldendict
  96. + "&8. skype" Exec exec skype
  97. + "&9. pidgin" Exec exec pidgin
  98. + "" Nop
  99. + "&f. fcitx" Exec exec fcitx
  100. + "&g. gnote" Exec exec gnote
  101. + "&u. urxvt" Exec exec urxvt
  102.  
  103. # Window ops menu (B2)
  104. # Middle button root menu
  105. AddToMenu WindowOps "Window Options" Title
  106. + "Move" Move
  107. + "Resize" Resize
  108. + "Raise" Raise
  109. + "Lower" Lower
  110. + "(De)Iconify" Iconify
  111. + "(Un)Stick" Stick
  112. + "Maximize" ResizeMove frame 100 -16p 0 16p
  113. + "Maximize Vertical" ResizeMove frame keep -16p w0 16p
  114. + "Maximize Horizonal" ResizeMove frame 100 keep 0 w0
  115. + "(Un)Grow" Maximize grow grow
  116. + "(Un)Grow Horizonally" Maximize grow 0
  117. + "(Un)Grow Vertically" Maximize 0 grow
  118. + "(Un)Stay On Top" Function OnTop
  119. + "" Nop
  120. + "Resize to 800x600" Resize 800p 600p
  121. + "Resize to 1024x768" Resize 1024p 768p
  122. + "" Nop
  123. + "Desk move" MoveToDesk 1 0 1
  124. + "List of Windows" WindowList
  125. + "" Nop
  126. + "Delete" Delete
  127. + "Destroy" Destroy
  128.  
  129. # Fvwm configuration menu (B3)
  130. AddToMenu System "Fvwm Controls" Title
  131. + "Fvwm Modules" Popup Module-Popup
  132. + "Fvwm Window Ops" Popup WindowOps
  133. + "Fvwm Simple Config Ops" Popup Misc-Ops
  134. + "List of Windows" WindowList
  135. + "" Nop
  136. + "Refresh" Refresh
  137. + "Restart" Restart
  138. + "" Nop
  139. + "Exit" Quit
  140.  
  141. AddToMenu Misc-Ops "Misc Config Opts" Title
  142. + "Sloppy Focus" ChangeDefaultFocus SloppyFocus
  143. + "Click To Focus" ChangeDefaultFocus ClickToFocus
  144. + "Focus Follows Mouse" ChangeDefaultFocus FocusFollowsMouse
  145. + "" Nop
  146. + "Colormap Follows Mouse" ColormapFocus FollowsMouse
  147. + "Colormap Follows Focus" ColormapFocus FollowsFocus
  148. + "" Nop
  149. + "Full Paging ON" EdgeScroll 100 100
  150. + "All Paging OFF" EdgeScroll 0 0
  151. + "Horizontal Paging Only" EdgeScroll 100 0
  152. + "Vertical Paging Only" EdgeScroll 0 100
  153. + "Partial Paging" EdgeScroll 50 50
  154. + "Full Paging & Edge Wrap" EdgeScroll 100000 100000
  155.  
  156. AddToMenu Module-Popup "FvwmModules" Title
  157. + "Identify" Module FvwmIdent
  158. + "WinList" Module FvwmWinList
  159. + "" Nop
  160. + "Tile Windows" Module FvwmRearrange -tile 2 3 98 98 -mn 2
  161. + "Cascade Windows" Module FvwmRearrange -cascade -resize 5 5 60 60 -incx 2 -incy 2 -noraise
  162. + "" Nop
  163. + "FvwmConsole" Module FvwmConsole -terminal urxvtc -bg #101010 -fg #f2f2f2
  164. + "FvwmConsole (urxvt)" Module FvwmConsole -terminal urxvt -bg #101010 -fg #f2f2f2
  165. + "Button-Bar" Module FvwmButtons
  166. + "Pager" Module FvwmPager 0 1
  167. + "TaskBar" Module FvwmTaskBar
  168. + "Wharf" Module FvwmWharf
  169. + "IconBox" Module FvwmIconBox
  170. + "IconMan" Module FvwmIconMan
  171. + "" Nop
  172. + "AutoRaise" Module FvwmAuto 800 Raise Nop
  173. + "Stop AutoRaise" KillModule FvwmAuto
  174. + "Audio" Module FvwmAudio
  175. + "Stop Audio" KillModule FvwmAudio
  176. + "ScrollBar" Module FvwmScroll 50 50
  177. + "" Nop
  178. + "Fvwm Backer" Module FvwmBacker
  179. + "Stop Backer" KillModule FvwmBacker
  180. + "Banner" Module FvwmBanner
  181. + "Talk" Module FvwmTalk
  182. + "" Nop
  183. + "Debug" Module FvwmDebug
  184. + "Stop Debug" KillModule FvwmDebug
  185.  
  186. ############################################################################
  187. # COMPLEX FUNCTIONS
  188.  
  189. AddToFunc Move-or-Raise I Raise
  190. + M Move
  191.  
  192. AddToFunc Move-or-Iconify M Move
  193. + C Iconify
  194.  
  195. AddToFunc Resize-or-Raise I Raise
  196. + M Resize
  197.  
  198. DestroyFunc OnTop
  199. AddToFunc OnTop
  200. + I ThisWindow (Layer 6) Layer
  201. + I TestRc (NoMatch) Layer 0 6
  202.  
  203. ############################################################################
  204. # MOUSE Setup
  205.  
  206. # Field #2 (Context)
  207. # R Root
  208. # W Application window
  209. # D Desktop application (like kdeskdtop or Nautilus desktop)
  210. # T Titlebar
  211. # S Sidebar (side, top, or bottom)
  212. # F Frame (corners)
  213. # I Icon window
  214. # A Any
  215. # M Tear-off menu
  216.  
  217. # Field #3 (Modifier)
  218. # N none
  219. # C control
  220. # S shift
  221. # M meta
  222. # L caps lock
  223. # A any
  224.  
  225. # First, the root window.
  226. Mouse 1 R A Menu MenuFvwmRoot Nop
  227. # Mouse 1 R S SendToModule FvwmGtk Gnome-applications
  228. # Mouse 1 R S Menu Gnome-applications
  229. Mouse 2 R A Menu WindowOps Nop
  230. Mouse 3 R A Menu System Nop
  231.  
  232. # Leftmost has the pulldown the menu
  233. Mouse 1 1 A Menu WindowOps Close
  234. Mouse 2 1 A Menu WindowOps
  235. Mouse 3 1 A Menu WindowOps
  236.  
  237. # Title bar buttons
  238. # 1 3 5 6 4 2
  239. # Default button decorations:
  240. # Left:
  241. # 1 MwmDecorMenu
  242. # Right:
  243. # 2 MwmDecorMax
  244. # 4 MwmDecorMin
  245. # Others
  246. # MwmDecorShade
  247. # MwmDecorLayer
  248. # MwmDecorStick
  249.  
  250. SetEnv MenuButton 1
  251. SetEnv MaxButton 2
  252. SetEnv MinButton 4
  253.  
  254. Mouse 1 $[MaxButton] A Maximize
  255. Mouse 2 $[MaxButton] A Maximize 0 100
  256. Mouse 3 $[MaxButton] A Maximize 100 0
  257. Mouse 1 $[MinButton] A Iconify
  258.  
  259. # Read the decor _before_ the button and pager configs
  260. # but after the titlebar configs
  261. #
  262. # == Menu Styles ==
  263. #
  264. #Here comes the menu style description.
  265. #fvwm tries to draw menus in '3D', which looks
  266. #ridiculous to me, so this config features flat menus,
  267. #feel free to change it if you need.
  268. #fg and bg in dolorset 7 are text and background colors
  269. #correspondingly. sh and hi are shaded and highlited
  270. #colors for '3D', setting them to same color forces
  271. #them to look flat.
  272. #
  273. #PopupDelay gives you some time before the submenu pops up.
  274. #PopupOffset is 2 pixels between menus and 100 stands
  275. #to avoid menus overlapping.
  276. #
  277. #Colorset 8 is for menu item under pointer and has only
  278. #one color.
  279.  
  280. Colorset 7 fg #5a504e, bg #a7bdba, sh #5a504e, hi #5a504e
  281. Colorset 8 fg #d58c41
  282. MenuStyle * PopupDelayed, PopupDelay 300, PopdownImmediately
  283. MenuStyle * PopupOffset 2 100
  284. MenuStyle * SeparatorsLong, TrianglesSolid
  285. MenuStyle * BorderWidth 2
  286. MenuStyle * MenuColorset 7
  287. MenuStyle * ActiveFore, Hilight3DOff
  288. MenuStyle * ActiveColorset 8
  289.  
  290. # == Window Decorations ==
  291. #
  292. #A description of simple pixmap window decoration.
  293. #
  294. #Quite a tricky thing indeed, and I hope to write
  295. #an article on it soon.
  296.  
  297. Colorset 5 fg #5a504e, bg #5a504e
  298. BorderStyle Colorset 5 -- Flat HiddenHandles NoInset
  299. TitleStyle AllActive MultiPixmap \
  300. Main TiledPixmap $[FVWM_USERDIR]/decor/title-1-active.xpm
  301. TitleStyle Inactive MultiPixmap \
  302. Main TiledPixmap $[FVWM_USERDIR]/decor/title-1-inactive.xpm
  303. ButtonStyle 1 \
  304. Active (Pixmap $[FVWM_USERDIR]/decor/close-active.xpm)\
  305. Inactive (Pixmap $[FVWM_USERDIR]/decor/close-inactive.xpm)
  306. ButtonStyle 2 \
  307. Active (Pixmap $[FVWM_USERDIR]/decor/maximize-active.xpm)\
  308. Inactive (Pixmap $[FVWM_USERDIR]/decor/maximize-inactive.xpm)
  309. ButtonStyle 4 \
  310. Active (Pixmap $[FVWM_USERDIR]/decor/hide-active.xpm)\
  311. Inactive (Pixmap $[FVWM_USERDIR]/decor/hide-inactive.xpm)
  312. TitleStyle -- Flat
  313. TitleStyle LeftJustified Height 15
  314. ButtonStyle All -- Flat
  315. HilightColor #d58c41 #DEDEDE
  316.  
  317. Style "*" BorderWidth 1
  318. Style "*" HandleWidth 1
  319. Style "*" Title, Color #a7bdba/#33322F
  320. Style "*" DecorateTransient
  321. # Style "*" NoIcon
  322.  
  323. *FvwmIconMan: NumManagers 1
  324.  
  325. # Icons
  326. Mouse 1 I A Iconify
  327. Mouse 2 I A Move
  328. Mouse 3 I A Menu WindowOps Delete
  329.  
  330. Mouse 1 FS A Resize-or-Raise
  331. Mouse 1 T A Move-or-Raise
  332. Mouse 2 T A WindowShade
  333. #Mouse 3 TFS A RaiseLower
  334.  
  335. Mouse 1 TFS C Move-or-Raise
  336. Mouse 2 TFS C WindowList
  337. Mouse 3 TFS C Resize-or-Raise
  338.  
  339. #Mouse 3 A M WindowList
  340.  
  341. ############################################################################
  342. # KEYBOARD Setup
  343.  
  344. PointerKey Super_L WTS A MoveToDesk 1 0 1
  345.  
  346. # L5 and L7 for Sun Lower and Close keys
  347. # Key L5 A A RaiseLower
  348. # Key L7 A A Iconify
  349. # Use with keycode 115 = Super_L in .Xmodmap to iconify with the Windows key
  350. # Key Super_L A A Iconify
  351. Key Super_R A A GotoDesk 1 0 1
  352.  
  353. Key Left A SC CursorMove -1 +0
  354. Key Right A SC CursorMove +1 +0
  355. Key Up A SC CursorMove +0 -1
  356. Key Down A SC CursorMove +0 +1
  357.  
  358. Key Left A SM CursorMove -10 +0
  359. Key Right A SM CursorMove +10 +0
  360. Key Up A SM CursorMove +0 -10
  361. Key Down A SM CursorMove +0 +10
  362.  
  363. ############################################################################
  364. # FvwmIdent
  365.  
  366. # *FvwmIdentBack gray
  367. # *FvwmIdentFore black
  368. # *FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
  369.  
  370. ##########################FvwmWinList##################################
  371. *FvwmWinListAction Click1 Iconify -1,Focus
  372. *FvwmWinListAction Click2 Iconify
  373. *FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
  374. *FvwmWinListUseSkipList
  375. *FvwmWinListGeometry +0-1
  376. # Active one defaults to black-on-black if we don't do this
  377. *FvwmWinListFocusBack gray50
  378. *FvwmIdent: Font $[deffont]
  379. *FvwmFormDefault: Font $[deffont]
  380. *FvwmTaskBar: StatusFont $[deffont]
  381. *FvwmForm-RootCursor: Font $[deffont]
  382.  
  383. # Urgency hint function override, to prevent Pidgin from grabbing the focus
  384. DestroyFunc UrgencyFunc
  385. AddToFunc UrgencyFunc
  386. + I Iconify off
  387. + I Raise
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement