-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfvwm2rc
354 lines (304 loc) · 12.5 KB
/
fvwm2rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# This file is copied to a new user's FVWM_USERDIR by FvwmForm-Setup form.
# This file contains the commands fvwm reads while starting.
#
#EdgeResistance 250 10
EdgeResistance -1
EdgeScroll 100 100
ClickTime 750
DeskTopSize 2x2
MenuStyle * fvwm, Foreground white, Background cornflowerblue, Greyed grey40
MenuStyle * Font -adobe-times-bold-r-*-*-14-*-*-*-*-*-*-*
ColormapFocus FollowsMouse
# default Styles:
# make sure these fonts exist on your system:
Style * Font -adobe-times-bold-r-*-*-12-*-*-*-*-*-*-*
Style * IconFont -adobe-times-bold-r-*-*-12-*-*-*-*-*-*-*
Style * HilightFore black, HilightBack cornflowerblue
Style * BorderWidth 7, HandleWidth 7
Style * Icon unknown1.xpm, Color lightgrey/dimgrey
Style * MWMFunctions, MWMDecor, HintOverride
Style * DecorateTransient, NoPPosition
Style * IconBox 0 -10 -280 -1
Style * FocusFollowsMouse
Style * TileCascadePlacement
# Styles for various Fvwm modules:
Style Fvwm* NoTitle, Sticky, WindowListSkip
Style Fvwm* BorderWidth 2, CirculateSkipIcon, CirculateSkip
Style FvwmPager StaysOnTop
Style FvwmBanner StaysOnTop
Style FvwmButtons Icon toolbox.xpm, ClickToFocus
# Styles for your common terminal emulator programs.
# xterms and rxvts in a separate icon box:
Style XTerm Icon xterm.xpm, SloppyFocus, IconBox -70 1 -1 -140
Style rxvt Icon term.xpm, SloppyFocus, IconBox -70 1 -1 -140
Style rxvt MWMBorder, MWMButtons
# Styles for various common programs:
Style *lock NoTitle, NoHandles, Sticky, WindowListSkip, ClickToFocus
Style xbiff NoTitle, Sticky, WindowListSkip, ClickToFocus
Style xcalc Icon xcalc.xpm, NoButton 2,ClickToFocus
Style xmh Icon mail1.xpm, NoIconTitle,StickyIcon
Style xmh NoButton 2
Style xman Icon xman.xpm, ClickToFocus
Style xmag Icon mag_glass.xpm, ClickToFocus
Style xgraph Icon graphs.xpm, ClickToFocus
Style xmosaic Color Green/Yellow, ClickToFocus
# some simple default key bindings:
Key Next A SCM Next [*] Focus
Key Prior A SCM Prev [*] Focus
# some simple default mouse bindings:
# for the root window:
Mouse 3 R A Menu MenuFvwmRoot Nop
Mouse 2 R A Menu MenuFvwmWindowOps Nop
Mouse 1 R A WindowList
# for the title bar buttons:
Mouse 0 1 A Menu MenuFvwmWindowOps2 Close
Mouse 0 2 A FuncFvwmMaximize
Mouse 0 4 A Iconify
# for other parts of the window/borders/icons:
Mouse 1 F A FuncFvwmResizeOrRaise
Mouse 1 TS A FuncFvwmMoveOrRaise
Mouse 1 I A FuncFvwmMoveOrIconify
Mouse 2 I A Iconify
Mouse 2 FST A Menu MenuFvwmWindowOps2 Nop
Mouse 3 TSIF A RaiseLower
######################## Initialization Functions ############################
AddToFunc StartFunction
+ I Module FvwmAnimate
+ I Module FvwmBanner
#+ I Module FvwmButtons
AddToFunc InitFunction
+ I exec xsetroot -mod 2 2 -fg rgb:55/40/55 -bg rgb:70/50/70
# For some SM-s (like gnome-session) there is an internal background setter.
AddToFunc SessionInitFunction
+ I Nop
########## Custom functions (by TF)
#-----------------------------------------------------------------------
# GotoPage and set focus to window which is in the foreground
#-----------------------------------------------------------------------
DestroyFunc FuncGotoPage
AddToFunc FuncGotoPage
+ I GotoPage $0 $1
+ I Next (CurrentPage, !Iconic, !Sticky, !Shaded, !Focused, !Overlapped) FuncSelectWindow
#-----------------------------------------------------------------------
# Move active window to next/previous page
#-----------------------------------------------------------------------
DestroyFunc FuncMoveWindowToPage
AddToFunc FuncMoveWindowToPage
+ I MoveToPage $0 $1
+ I GotoPage $0 $1
#-----------------------------------------------------------------------
# This function selects a window, give it the focus and raise it
#-----------------------------------------------------------------------
DestroyFunc FuncSelectWindow
AddToFunc FuncSelectWindow
+ I Iconify off
+ I Focus
+ I Raise
######################## Menus ###################
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot "$[gt.Root Menu]" Title
+ "&1. XTerm" Exec exec xterm
+ "" Nop
+ "&R. $[gt.Remote Logins]" Popup MenuFvwmLogins
+ "" Nop
+ "&U. $[gt.Utilities]" Popup MenuFvwmUtilities
+ "" Nop
+ "&M. $[gt.Fvwm Modules]" Popup MenuFvwmModules
+ "&W. $[gt.Fvwm Window Ops]" Popup MenuFvwmWindowOps
+ "&S. $[gt.Fvwm Config Ops]" Popup MenuFvwmConfig
+ "" Nop
+ "&F. $[gt.Refresh Screen]" Refresh
+ "&C. $[gt.Recapture Screen]" Recapture
+ "" Nop
+ "&C. Console" Module FvwmConsole
+ "&R. $[gt.Restart]" Restart
+ "&X. $[gt.Exit Fvwm]" Popup MenuFvwmQuitVerify
DestroyMenu MenuFvwmUtilities
#PipeRead "fvwm-xdg-menu -f -m MenuFvwmUtilities /etc/xdg/menus/xfce-applications.menu"
PipeRead "fvwm-xdg-menu -f -m MenuFvwmUtilities /etc/xdg/menus/lxde-applications.menu"
#Generate the installed aplication menu
#fvwm-menu-desktop -v --insert-in-menu MenuFvwmUtilities
DestroyMenu MenuFvwmConfig
AddToMenu MenuFvwmConfig "$[gt.Fvwm Config Ops]" Title
+ "&S. $[gt.Sloppy Focus]" FuncFvwmFocusPolicyChange SloppyFocus
+ "&C. $[gt.Click To Focus]" FuncFvwmFocusPolicyChange ClickToFocus
+ "&F. $[gt.Focus Follows Mouse]" FuncFvwmFocusPolicyChange FocusFollowsMouse
+ "" Nop
+ "&1. $[gt.Colormap Follows Mouse]" ColormapFocus FollowsMouse
+ "&2. $[gt.Colormap Follows Focus]" ColormapFocus FollowsFocus
+ "" Nop
+ "&3. $[gt.Full Paging ON]" EdgeScroll 100 100
+ "&4. $[gt.All Paging OFF]" EdgeScroll 0 0
+ "&5. $[gt.Horizontal Paging Only]" EdgeScroll 100 0
+ "&6. $[gt.Vertical Paging Only]" EdgeScroll 0 100
+ "&7. $[gt.Partial Paging]" EdgeScroll 50 50
+ "&8. $[gt.Full Paging && Edge Wrap]" EdgeScroll 100000 100000
# The window Ops menus exhibit a different HotKey style.
# There are 2 versions of the WindowOps Menu, meant to be bound to different
# things. Here is the "common" part:
DestroyFunc FuncFvwmWindowCommon
AddToFunc FuncFvwmWindowCommon
+ I AddToMenu $0 "$[gt.&Move]" Move
+ I AddToMenu $0 "$[gt.&Resize]" Resize
+ I AddToMenu $0 "$[gt.R&aise]" Raise
+ I AddToMenu $0 "$[gt.&Lower]" Lower
+ I AddToMenu $0 "$[gt.(De)&Iconify]" Iconify
+ I AddToMenu $0 "$[gt.(Un)&Stick]" Stick
+ I AddToMenu $0 "$[gt.(Un)Ma&ximize]" Maximize
+ I AddToMenu $0 "" Nop
+ I AddToMenu $0 "$[gt.&Delete]" Delete
+ I AddToMenu $0 "$[gt.&Close]" Close
+ I AddToMenu $0 "$[gt.Destroy]" Destroy
+ I AddToMenu $0 "" Nop
# First windowops menu, bound to:
# mouse 2 on root
# Root menu
DestroyMenu MenuFvwmWindowOps
AddToMenu MenuFvwmWindowOps "$[gt.Window Ops]" Title
FuncFvwmWindowCommon MenuFvwmWindowOps
+ "$[gt.Re&fresh Window]" RefreshWindow
# Second windowops menu, bound to:
# any mouse on titlebar button 1
# mouse 2 on frame, side or titlebar
DestroyMenu MenuFvwmWindowOps2
AddToMenu MenuFvwmWindowOps2
FuncFvwmWindowCommon MenuFvwmWindowOps2
+ Scroll&Bar Module FvwmScroll 2 2
+ "&$[gt.Print]" FuncFvwmPrint
+ "$[gt.Print Re&verse]" FuncFvwmPrintReverse
# 3 different ways to log on, take your pick:
DestroyFunc FuncFvwmRloginXterm
AddToFunc FuncFvwmRloginXterm \
I Exec xterm -name $0 -title "$USER @ $0" -e rlogin $0
DestroyFunc FuncFvwmRloginRxvt
AddToFunc FuncFvwmRloginRxvt \
I Exec rxvt -name $0 -n $0 -title $USER@$0 -e rlogin $0
DestroyFunc FuncFvwmRloginSshRxvt
AddToFunc FuncFvwmRloginSshRxvt \
I Exec Exec ssh $0 rxvt -display $HOSTDISPLAY
# be sure to fill these in with your correct machine names:
DestroyMenu MenuFvwmLogins
AddToMenu MenuFvwmLogins
+ &dopey FuncFvwmRloginXterm dopey
+ &snoopy FuncFvwmRloginXterm snoopy
+ s&ignal Exec rxterm signal
DestroyMenu MenuFvwmModules
AddToMenu MenuFvwmModules "$[gt.Fvwm Modules]" Title
+ "&1. $[gt.Control Animation]" Popup MenuFvwmAnimate
+ "&B. Button-Bar" Module FvwmButtons
+ "&O. IconBox" FuncFvwmConfigureIconBox
+ "&F. Forms" Popup MenuFvwmForms
+ "&I. Identify" Module FvwmIdent
+ "&M. IconMan" Module FvwmIconMan
+ "&N. Banner" Module FvwmBanner
+ "&C. Console" Module FvwmConsole
+ "&P. Pager" Module FvwmPager 0 0
+ "&2. Pager (2 $[gt.desks])" Module FvwmPager 0 1
+ "&R. Backer" Module FvwmBacker
+ "&S. ScrollBar" Module FvwmScroll 50 50
+ "&T. TaskBar" Module FvwmTaskBar
+ "&U. AutoRaise" Module FvwmAuto 200 Raise Nop
+ "&W. WinList" Module FvwmWinList
+ "&X. $[gt.Stop Module Menu]" Popup MenuFvwmStopModule
DestroyMenu MenuFvwmStopModule
AddToMenu MenuFvwmStopModule "$[gt.Stop Fvwm Modules]" Title
+ "&B. $[gt.Stop] Button-Bar" KillModule FvwmButtons
+ "&O. $[gt.Stop] IconBox" KillModule FvwmIconBox
+ "&M. $[gt.Stop] IconMan" KillModule FvwmIconMan
+ "&P. $[gt.Stop] Pager" KillModule FvwmPager
+ "&R. $[gt.Stop] Backer" KillModule FvwmBacker
+ "&S. $[gt.Stop] ScrollBar" KillModule FvwmScroll
+ "&T. $[gt.Stop] TaskBar" KillModule FvwmTaskBar
+ "&U. $[gt.Stop] AutoRaise" KillModule FvwmAuto
+ "&W. $[gt.Stop] WinList" KillModule FvwmWinList
DestroyMenu MenuFvwmForms
AddToMenu MenuFvwmForms
+ "&C. Capture" Module FvwmForm FvwmForm-Capture
+ "&D. Form Defaults" Module FvwmForm FvwmForm-Form
+ "&R. Rlogin" Module FvwmForm FvwmForm-Rlogin
+ "&P. RootCursor" Module FvwmForm FvwmForm-RootCursor
+ "&S. Setup" Module FvwmForm FvwmForm-Setup
+ "&T. Talk Form" Module FvwmForm FvwmForm-Talk
+ "&Q. QuitVerify" Module FvwmForm FvwmForm-QuitVerify
# Configure and start using an iconbox on the fly
DestroyFunc FuncFvwmConfigureIconBox
AddToFunc FuncFvwmConfigureIconBox
+ I Module FvwmIconBox
+ I Style * NoIcon
DestroyMenu MenuFvwmQuitVerify
AddToMenu MenuFvwmQuitVerify "$[gt.Really Quit Fvwm?]" Title
+ "&Q. $[gt.Yes, Really Quit]" Quit
+ "" Nop
+ "&R. $[gt.Restart]" Restart
+ "" Nop
+ "&T. $[gt.Start] twm" Restart twm
+ "&C. $[gt.Start] ctwm" Restart ctwm
+ "&2. $[gt.Start] tvtwm" Restart tvtwm
+ "&V. $[gt.Start] vtwm" Restart vtwm
+ "&M. $[gt.Start] mwm" Restart mwm
+ "&O. $[gt.Start] olwm" Restart /usr/openwin/bin/olwm
+ "" Nop
+ "&X. $[gt.Just an Xterm]" Restart xterm -n '"X Console"' -T '"X Console"'
+ "" Nop
+ "&N. $[gt.No, Don't Quit]" Nop
######################## Sample Functions ##########################
DestroyFunc FuncFvwmMailXmh
AddToFunc FuncFvwmMailXmh
+ I Next [$0] Iconify false
+ I Next [$0] Focus
+ I None [$0] Exec $0 $1
DestroyFunc FuncFvwmMoveOrRaise
AddToFunc FuncFvwmMoveOrRaise
+ I Raise
+ M Move
+ D Lower
DestroyFunc FuncFvwmMaximize
AddToFunc FuncFvwmMaximize
+ M Maximize 0 100
+ H Maximize 0 100
+ C Maximize 0 80
+ D Maximize 100 100
DestroyFunc FuncFvwmMoveOrIconify
AddToFunc FuncFvwmMoveOrIconify
+ I Raise
+ M Move
+ D Iconify
DestroyFunc FuncFvwmResizeOrRaise
AddToFunc FuncFvwmResizeOrRaise
+ I Raise
+ M Resize
+ D Lower
DestroyFunc FuncFvwmPrint
AddToFunc FuncFvwmPrint
+ I Raise
+ I Exec xdpr -id $w
DestroyFunc FuncFvwmPrintReverse
AddToFunc FuncFvwmPrintReverse
+ I Raise
+ I Exec xdpr 1/2 -h -rv -id $w
DestroyFunc FuncFvwmFocusPolicyChange
AddToFunc FuncFvwmFocusPolicyChange
+ I Style * $0
+ I Recapture
#Custom modules load on startup
Module FvwmPager
Module FvwmConsole
#Read config files for modules:
read ConfigFvwmBacker
read ConfigFvwmButtons
read ConfigFvwmIconBox
read ConfigFvwmIconMan
read ConfigFvwmIdent
read ConfigFvwmPager
read ConfigFvwmScroll
read ConfigFvwmTaskBar
read ConfigFvwmWinList
#My key bindings
Key Left A SC FuncMoveWindowToPage -1p +0p
Key Right A SC FuncMoveWindowToPage +1p +0p
Key Up A SC FuncMoveWindowToPage +0p -1p
Key Down A SC FuncMoveWindowToPage +0p +1p
Key Left A C1 FuncGotoPage -1p +0p
Key Right A C1 FuncGotoPage +1p +0p
Key Up A C1 FuncGotoPage +0p -1p
Key Down A C1 FuncGotoPage +0p +1p