Advertisement
Guest User

My Fvwm config

a guest
Nov 24th, 2013
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.73 KB | None | 0 0
  1. ################################
  2. ## My fvwm2rc file ##
  3. ################################
  4.  
  5. ## Fvwm's default functions are defined in /usr/share/fvwm/ConfigFvwmDefaults
  6.  
  7. DestroyFunc StartFunction
  8.  
  9. SetEnv fvwm_image $[FVWM_USERDIR]/images
  10. SetEnv fvwm_icon $[FVWM_USERDIR]/images/icons
  11. SetEnv fvwm_mini_icons $[FVWM_USERDIR]/images/mini
  12. SetEnv fvwm_wallpapers $[FVWM_USERDIR]/wallpapers
  13. ImagePath $[fvwm_icon]:$[fvwm_image]:$[fvwm_mini_icons]:$[fvwm_wallpapers]:+
  14.  
  15. SetEnv FVWM_SCRIPTS $[FVWM_USERDIR]/scripts
  16.  
  17. # Bash has my favourite shell syntax, so use it if it exists.
  18. Test (f /bin/bash) ExecUseShell /bin/bash
  19.  
  20. ## tell fvwm to ignore the Numlock key. http://www.fvwm.org/documentation/faq/#5.5
  21. IgnoreModifiers L25
  22. Emulate Fvwm
  23.  
  24. # The maximum size window with which to use opaque window movement.
  25. OpaqueMoveSize unlimited
  26.  
  27. ## define the 'usable' screen area for windows. Here a 3 pixel margin is defined on the RHS.
  28. EwmhBaseStruts 0 3 0 0
  29. ## Specifies the % of a page to scroll when the cursor hits the edge of a page. Unwanted.
  30. EdgeScroll 0 0
  31. ## Completely disables mouse edge scrolling, even when a window is dragged.
  32. EdgeThickness 0
  33. ## Defines how hard it is to change the desktop by moving the mouse over the edge of the screen.
  34. ## If -1 is given as the delay, scrolling is disabled completely.
  35. EdgeResistance -1
  36.  
  37. ## set desktops
  38. DesktopSize 1x1
  39. DesktopName 0 Desk 0
  40. DesktopName 1 Desk 1
  41. DesktopName 2 Desk 2
  42. DesktopName 3 Desk 3
  43. DesktopName 4 Desk 4
  44. DesktopName 5 Desk 5
  45. DesktopName 6 Desk 6
  46.  
  47. Style * ClickToFocus
  48. Style * FPSortWindowlistByFocus
  49.  
  50. ## SkipMapping plus a Nop EWMHActivateWindowFunc function. New windows that open on another
  51. ## desktop can never steal focus from the current desktop.
  52. Style * SkipMapping
  53.  
  54. DestroyFunc EWMHActivateWindowFunc
  55. AddToFunc EWMHActivateWindowFunc
  56. + I nop
  57.  
  58. ## mouse cursor styles
  59. CursorStyle ROOT left_ptr
  60. CursorStyle TITLE left_ptr
  61. CursorStyle DEFAULT left_ptr
  62. CursorStyle SYS left_ptr
  63. CursorStyle MENU left_ptr
  64.  
  65. Style * NoDecorHint, NoFuncHint, GNOMEIgnoreHints
  66.  
  67. ## NoUsePPosition :- instructs fvwm to ignore the program specified position (PPosition hint)
  68. ## when adding new windows. Works best for most applications (p5565).
  69. Style * NoUsePPosition
  70. Style * NoUseIconPosition
  71.  
  72. ## When a window is raised/lowered, its main window + all transients get raised/lowered too. Default.
  73. Style * RaiseTransient, LowerTransient, StackTransientParent
  74.  
  75.  
  76. # With the border options options below, only the bg value seems to define the border color
  77.  
  78. Colorset 18 fg #303344, bg #36403D
  79. Colorset 19 fg #303344, bg #566661
  80.  
  81. Style * BorderWidth 4
  82. Style * HandleWidth 4
  83. Style * BorderColorset 18, HilightBorderColorset 19
  84.  
  85. BorderStyle Active -- Flat NoInset
  86. BorderStyle InActive -- Flat NoInset
  87.  
  88. Colorset 20 fg #303344, bg #D0DDED
  89. Colorset 21 fg #303344, bg #D0DDED
  90.  
  91. Style * !Title
  92. TitleStyle LeftJustified Height 18
  93. Style * Colorset 10, HilightColorset 10
  94. # ^^^^^^^^^^^^^^^^<----------- Sets the fg color for the titlebar.
  95. # Also sets the fg color for titlebar text & 3D decors.
  96.  
  97. TitleStyle Inactive (Colorset 20 -- Flat )
  98. TitleStyle Active (Colorset 21 -- Flat )
  99. # ^^^^^^^^^^^<------- Sets the bg color for the titlebar.
  100. # Also sets the bg color for titlebar text.
  101.  
  102. Style Thunar Title, BorderColorset 18, HilightBorderColorset 19, Colorset 10, HilightColorset 10
  103. Style Thunar Colorset 10, HilightColorset 10
  104.  
  105. Style * TileCascadePlacement, WindowShadeSteps 20, ResizeOpaque
  106.  
  107. ##--------------------------------------------------------------
  108. ## Activate the Main Menu
  109.  
  110. DestroyFunc MButtonOneF
  111. AddToFunc MButtonOneF
  112. + C Menu AppMenu Nop
  113. + H Popup AppMenu
  114. + D Menu FvwmMenu Nop
  115.  
  116. Mouse 1 R A MButtonOneF
  117.  
  118. ## Control-Esc -- key-binding for Main menu TESTED/WORKS
  119. Key Escape A C Menu MainMenu Root c c
  120.  
  121. ## Activate the WindowOpts menu
  122.  
  123. ## Mouse button #3 on the window frame or sides -- WindowOpts menu TESTED/WORKS
  124. Mouse 3 F A Menu MenuFvwmWindowOps Nop
  125. Mouse 3 S A Menu MenuFvwmWindowOps Nop
  126.  
  127. ## Alt-F8 -- key-binding for the WindowOpts menu TESTED/WORKS
  128. DestroyFunc KeyMenuFvwmWindowOps
  129. AddToFunc KeyMenuFvwmWindowOps
  130. + I WarpToWindow 100 0
  131. + I Menu MenuFvwmWindowOps Nop
  132.  
  133. Key F8 W M KeyMenuFvwmWindowOps
  134. Key F8 F M KeyMenuFvwmWindowOps
  135. Key F8 S M KeyMenuFvwmWindowOps
  136.  
  137. ## Mouse button #3 in the root window -- FvwmOpts menu TESTED/WORKS
  138. Mouse 3 R A Menu MenuFvwmOpts Nop
  139.  
  140. ## Mouse button #3 on an icon - IconifiedOps menu. TESTED/WORKS
  141. Mouse 3 I A Menu MenuIconifiedOps Nop
  142.  
  143. ## SHIFT AND MOVE THE WINDOW
  144.  
  145. DestroyFunc FuncMoveWindow
  146. AddToFunc FuncMoveWindow
  147. + M Move
  148.  
  149. Mouse 1 W M FuncMoveWindow
  150.  
  151. # Define Super_L - Tab, to cycle thru the windows.
  152. DestroyFunc FocusRaiseAndStuff
  153. AddToFunc FocusRaiseAndStuff
  154. + I Iconify off
  155. + I Focus
  156. + I Raise
  157.  
  158. Key Tab A 4 Next (CurrentPage, !Sticky) FocusRaiseAndStuff
  159.  
  160. Key Tab A M WindowList (CurrentDesk, !Sticky, AcceptsFocus) Root c c \
  161. NoCurrentDeskTitle, NoGeometry, CurrentAtEnd, IconifiedAtEnd
  162.  
  163. # Needed by the builtin WindowList command, this should mostly match the manpage
  164. DestroyFunc WindowListFunc
  165. AddToFunc WindowListFunc
  166. + I ThisWindow (Iconic) Layer
  167. + I Iconify off
  168. + I FlipFocus
  169. + I Raise
  170. + I WarpToWindow 5p 5p
  171.  
  172. # Close Window. Modified to Alt-F4
  173. Key F4 A M Close
  174.  
  175. # Maximize, Vert&Horiz. Modified - Alt-F10, Alt-Up
  176.  
  177. Read $[FVWM_USERDIR]/functions/Maximize-Plus
  178. Key F10 A M Maximize-Plus
  179. Key Up A M Maximize-Plus
  180.  
  181. # Move Window with Arrows
  182.  
  183. Key Right A SM PointerWindow Move w+1 w+0 Warp
  184. Key Left A SM PointerWindow Move w-1 w+0 Warp
  185. Key Up A SM PointerWindow Move w+0 w-1 Warp
  186. Key Down A SM PointerWindow Move w+0 w+1 Warp
  187.  
  188. # Resize Window with key combo - Super Ctrl Arrows
  189. # PointerWindow means the Window under the cursor. R/L/U seem to work okay. But not Down. Why???
  190. Key Right A C4 PointerWindow Resize br w+1 w+0
  191. Key Left A C4 PointerWindow Resize br w-1 w+0
  192. Key Up A C4 PointerWindow Resize br w+0 w-1
  193. Key Down A C4 PointerWindow Resize br w+0 w+1
  194.  
  195. # Change to Desktop/Workspace N
  196. Key 0 A 4 GotoDesk 0 0
  197. Key 1 A 4 GotoDesk 0 1
  198. Key 2 A 4 GotoDesk 0 2
  199. Key 3 A 4 GotoDesk 0 3
  200. Key 4 A 4 GotoDesk 0 4
  201. Key 5 A 4 GotoDesk 0 5
  202. Key 6 A 4 GotoDesk 0 6
  203.  
  204. # Move Current Window to Desktop/Workspace N
  205. Key 0 A S4 Current MoveToDesk 0 0
  206. Key 1 A S4 Current MoveToDesk 0 1
  207. Key 2 A S4 Current MoveToDesk 0 2
  208. Key 3 A S4 Current MoveToDesk 0 3
  209. Key 4 A S4 Current MoveToDesk 0 4
  210. Key 5 A S4 Current MoveToDesk 0 5
  211. Key 6 A S4 Current MoveToDesk 0 6
  212.  
  213. # Move Left/Right to Desktop/Workspace - Using the Super key, Mouse-Wheel, and Alt key.
  214. Key Left A 4 GotoDesk -1 0 9
  215. Key Right A 4 GotoDesk 1 0 9
  216. Mouse 4 R A GotoDesk -1 0 9
  217. Mouse 5 R A GotoDesk 1 0 9
  218. Key Left A M GotoDesk -1 0 9
  219. Key Right A M GotoDesk 1 0 9
  220.  
  221. # Use Super-Shift-[0-9] to move the current window to the next/prev desktop
  222. # Only works if the window is focused after each desktop shift
  223. DestroyFunc MoveToNextWorkspace
  224. AddToFunc MoveToNextWorkspace
  225. + I Current MoveToDesk 1 0 9
  226. + I GotoDesk 1 0 9
  227.  
  228. DestroyFunc MoveToPrevWorkspace
  229. AddToFunc MoveToPrevWorkspace
  230. + I Current MoveToDesk -1 0 9
  231. + I GotoDesk -1 0 9
  232.  
  233. Key Right A S4 MoveToNextWorkspace
  234. Key Left A S4 MoveToPrevWorkspace
  235.  
  236. Read $[FVWM_USERDIR]/functions/Maximize-Plus
  237.  
  238. ## Repeated use of notify-send will create multiple notifications. But with a perl
  239. ## function, one popup notification is created, and modified whenever the volume changes.
  240.  
  241. Key XF86AudioMute A A Exec exec amixer set Master toggle -q
  242. Key XF86AudioRaiseVolume A N PerlEval notify_volume "3%+" ;
  243. Key XF86AudioLowerVolume A N PerlEval notify_volume "3%-" ;
  244.  
  245. ## FvwmEvent - To help reforcus the correct window when the desktop is switched.
  246. ## Uses states 2 and 3.
  247.  
  248. Read $[FVWM_USERDIR]/test-event.fvwm
  249. AddToFunc StartFunction I FvwmEvent Test-event
  250.  
  251. ##------------
  252.  
  253. Key G A 4 Exec gmrun
  254. Key S A 4 Exec exec $HOME/bin/toggle_dzen.sh
  255.  
  256. Style gmrun PositionPlacement Center
  257. Style Firefox StartsOnDesk 3
  258. Style tmux1 StartsOnDesk 4
  259. Style UrxvtFvwmConsole StartsOnDesk 3
  260. # Style vlc PositionPlacement center
  261.  
  262. ##-----------------------------
  263.  
  264. Style FButtonsTray Sticky, !Iconifiable, NeverFocus, WindowListSkip
  265. Style FButtonsTray BorderWidth 1, HandleWidth 1
  266. Style FButtonsTray StaysOnTop
  267.  
  268. DestroyModuleConfig FButtonsTray: *
  269. *FButtonsTray: Geometry 90x24+500+0
  270. #*FButtonsTray: BoxSize smart
  271. *FButtonsTray: Rows 1
  272. *FButtonsTray: Columns 90
  273. *FButtonsTray: Frame 0
  274. *FButtonsTray: (90x1, Padding 0 0, Swallow (NoOld, Kill, NoHints, NoRespawn) \
  275. "stalonetray" 'Exec stalonetray --geometry 4x1+500+1 ')
  276.  
  277. AddToFunc StartFunction
  278. + I Module FvwmButtons FButtonsTray
  279. + I Exec exec xfce4-clipman
  280.  
  281. Key C A 4 Exec xfce4-popup-clipman
  282.  
  283. #############################################################################
  284.  
  285. ## AUTOHIDING FUNCTIONS FOR PANELS
  286. ## Copied from question 7.17 : /usr/share/doc/fvwm/docs/FAQ.gz
  287.  
  288. DestroyFunc autohide
  289. AddToFunc autohide
  290. + I ThisWindow ($0) Deschedule $[w.id]
  291. + I TestRc (!Match) Deschedule -$[w.id]
  292. + I ThisWindow ($0) KeepRc ThisWindow (shaded) autohide_show $1 $3
  293. + I TestRc (!Match) All ($0, !shaded) autohide_hide $2 $3
  294.  
  295. DestroyFunc autohide_show
  296. AddToFunc autohide_show
  297. + I Schedule $0 -$[w.id] WindowShade $1 off
  298. + I Schedule $0 -$[w.id] Deschedule $[w.id]
  299. + I Schedule $0 -$[w.id] Deschedule -$[w.id]
  300.  
  301. DestroyFunc autohide_hide
  302. AddToFunc autohide_hide
  303. + I Schedule $0 $[w.id] WindowShade $1 on
  304. + I Schedule $0 $[w.id] Deschedule $[w.id]
  305. + I Schedule $0 $[w.id] Deschedule -$[w.id]
  306.  
  307. DestroyFunc enter_handler
  308. AddToFunc enter_handler
  309. + I autohide FButtonsTray 250 500
  310. # ^ ^ ^
  311. # | | |______ Hide delay
  312. # | |__________ Show delay
  313. # |______________________ Unique window name/resource
  314.  
  315. AddToFunc StartFunction
  316. + I Module FvwmAuto 1 -menter enter_handler
  317.  
  318. #############################################################################
  319.  
  320. ## A helper function to preprocess lines with perl.
  321.  
  322. DestroyFunc .
  323. AddToFunc . I SendToModule FvwmPerl preprocess -c -- $*
  324.  
  325. ## Start the FvwmPerl Module with extra perl modules loaded.
  326.  
  327. DestroyFunc PerlInit
  328. AddToFunc PerlInit
  329. + I KillModule FvwmPerl
  330. + I Module FvwmPerl --export PerlEval
  331. + I PerlEval use lib `fvwm-perllib dir` ; \
  332. use lib "$[FVWM_USERDIR]" ; \
  333. use MyPerl::Notify qw( notify_volume ) ;
  334.  
  335. AddToFunc StartFunction I PerlInit
  336.  
  337. ## Bigger font for the Windowlist. WHERE IS MY DEFAULT FONT SETTING ??
  338. MenuStyle WindowList Font "xft:DejaVu Sans Mono:style=Book:pixelsize=16"
  339.  
  340. #########################################
  341. # THE START-FUNCTION - MAIN DECLARATION #
  342. #########################################
  343.  
  344. Read $[FVWM_USERDIR]/colorsets
  345. Read $[FVWM_USERDIR]/main_menu
  346. Read $[FVWM_USERDIR]/fvwm_pager
  347. Read $[FVWM_USERDIR]/iconify_funcs
  348.  
  349. AddToFunc StartFunction
  350. #
  351. + I Exec fvwm-root --retain-pixmap $[fvwm_wallpapers]/graham-sydney-01--1024x600--5.png
  352. + I Module FvwmCommandS
  353. + I Module FvwmDebug -xc
  354. + I Module FvwmRearrange
  355. + I Exec exec rm $[HOME]/.fvwm/icon.tmp.* 2>/dev/null
  356. + I Exec exec sh -c " $HOME/bin/tmuxer_1.sh tmux1 && urxvt -title tmux1 -e tmux attach -t tmux1 "
  357. + I Exec exec $HOME/bin/dzen-status
  358. + I Schedule 10500 12003 Exec exec $HOME/bin/desktop_start_1.sh
  359. + I Module FvwmConsole -terminal urxvt -geometry 60x18 -name UrxvtFvwmConsole
  360. + I Module FvwmProxy
  361. + I Module FvwmAnimate
  362. + I Exec exec compton -b
  363. + I Exec exec $HOME/bin/launch-trcli
  364. + I Exec exec $HOME/bin/tmux-ncmpcpp.sh
  365. + I GotoDesk 0 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement