File: 4Dwm.fvwmrc

package info (click to toggle)
fvwm1 1.24r-56
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 2,060 kB
  • ctags: 2,032
  • sloc: ansic: 23,586; sh: 108; makefile: 91
file content (507 lines) | stat: -rw-r--r-- 15,799 bytes parent folder | download | duplicates (9)
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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
#############################################################################
#
# Here's rob's MWM like configuration,
# with lots of changes to make it more like the Indigo Magic desktop
# seen on Irix 5.2 machines (i.e. Indies, newer Indigo^2's) by
# tabaer@magnus.acs.ohio-state.edu.

#
# (This is actually a set of bug reports masquerading as a sample config)
#
# WARNING:  This is as much my personal preference as anything else.
# The button and menu layout is based on my experiences with SGI
# machines at Ohio State and NASA-Lewis, so your mileage may vary...
#  --tabaer@magnus
#
# This configuration file expects the following options to be compiled into
# fvwm:
#	HOTKEYS
#	MENUCOLOR
#	MODULES
#	SHAPE
#	XPM
#
# Also, the following options SHOULD NOT be enabled:
#	NO_ICONS
#	NON_VIRTUAL
#	PRUNE
#
# This config is known to work with fvwm 1.21b, and should work with later
# versions as well.
###########################################################################

###########################################################################
# Set up the major operating modes

# Colors for non-selected windows, menus, and the panner
StdForeColor 		Black
StdBackColor 		LightGray

# Colors for the selected window
HiForeColor 		Yellow
HiBackColor 		RoyalBlue

# Menu colors
MenuForeColor	Black
MenuBackColor	LightGray

# Fonts - one for menus, a second for window titles, and a third for icons
Font			-*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-*
WindowFont		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
IconFont		-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*

# Force SGI-ish Motif compliance
MWMButtons
MWMDecorHints
MWMFunctionHints
MWMMenus
BoundaryWidth	6
NoBoundaryWidth	0
ButtonStyle 1 50x22
ButtonStyle 2 50x50
ButtonStyle 4 22x22
DecorateTransients

# Set the icon box to be at the top of the screen next to the toolchest
IconBox 130 5 600 150

# Set the desk top size in units of physical screen size
# and the reduction scale used for the panner/pager
DeskTopSize 1x1
DeskTopScale 32

###########################################################################
# Set up the Modules

ModulePath /usr/X11/lib/X11/fvwm:/usr/X11/bin:/usr/local/bin

# SGI-ish button bar using GoodStuff
Module	GoodStuff
*GoodStuffGeometry +5+5
*GoodStuffColumns	1
*GoodStuffFont	-adobe-helvetica-bold-o-*-*-12-*-*-*-*-*-*-*
*GoodStuffFore	Black
*GoodStuffBack	LightGray
# A minor complaint about the GoodStuff button:  the GoodStuff window
# doesn't size itself width-wise correctly, so it chops off the last letter
# on a couple of the button labels.  I'd like to see GoodStuff with the
# button text left-justified and the icons right-justified, like in SGI's
# toolchest, but I'll have to hack that out myself when I get the time.
# Perhaps there's a way to set up GoodStuff so that button appearance
# is configurable, too.  Also, is there any way to get the popup menus to
# cascade off the buttons, rather than appearing over them? --tabaer@magnus
#
#*GoodStuff	Button	Icon	Command
*GoodStuff	Shells	/home/tabaer/popup.xbm	PopUp	"Shells"	Shells
*GoodStuff	Windows	/home/tabaer/popup.xbm	PopUp	"Windows"	Windows
*GoodStuff	Tools	/home/tabaer/popup.xbm	PopUp	"Tools"	Tools
*GoodStuff	Demos	/home/tabaer/popup.xbm	PopUp	"Demos"	Demos
*GoodStuff	R-Hosts	/home/tabaer/popup.xbm	PopUp	"R-Hosts"	R-Hosts
*GoodStuff	System	/home/tabaer/popup.xbm	PopUp	"System"	System
*GoodStuff	EMACS	/usr/include/X11/xlogo32	Exec	"EMACS"	exec /usr/appl/bin/lemacs-19.10 &

# Irix-5.2 like pager
Module FvwmPager 0 2
*FvwmPagerGeometry 135x60+5+675
*FvwmPagerFore Black
*FvwmPagerBack LightGray
*FvwmPagerHilight White
*FvwmPagerLabel 0 Global

############################################################################
# Configuration of specific windows using the new Style command
Style "*"	Icon /usr/include/X11/bitmaps/xlogo32, StartNormal, StartsAnywhere
Style "Console"	Icon /usr/include/X11/bitmaps/Term
Style "emacs*"	Icon /usr/include/X11/pixmaps/e/emacs2.xpm
Style "Fudgit"	Icon /usr/include/X11/pixmaps/g/graphp.xpm
Style "Fvwm*"	StaysOnTop, Sticky
Style "ghostview" Icon /usr/include/X11/pixmaps/g/gv.xpm
Style "Gnuplot"	Icon /usr/include/X11/pixmaps/m/math.xpm
Style "GoodStuff"	NoIcon, NoTitle, NoHandles, StaysOnTop, Sticky
Style "News"	Icon /usr/include/X11/pixmaps/mail2.xpm
Style "oclock"	NoHandles, NoTitle
Style "RLaB"	Icon /usr/include/X11/pixmaps/m/matrix1.xpm
Style "rxvt"	Icon /usr/include/X11/bitmaps/Term
Style "velvet"	Icon /home/tabaer/fem.xbm
Style "xbiff"	NoTitle
Style "xclock"	NoTitle, Sticky
Style "xosview*" NoTitle, Sticky
Style "XSpread*" 	Icon /usr/include/X11/pixmaps/s/spreadsh.2.xpm
Style "xterm"	Icon /usr/include/X11/bitmaps/Term

##############################################################################
# Now define the menus - defer bindings until later
# The first three menus are very basic and are used in several places.
# --tabaer@magnus

# This menu is invoked as a sub-menu - it allows you to quit,
# restart, or switch to another WM.
Popup "Quit-Verify"
	Title	"Really Quit Fvwm?"
	Nop	"This may log you out!"
	Nop	""
	Quit	"Yes, Really Quit"
	Restart "Restart fvwm" fvwm
	Restart "Start twm"	/usr/bin/X11/twm
	Restart	"Start olwm"	/usr/openwin/bin/olwm
	Restart "Start olvwm"	/usr/openwin/bin/olvwm
	Nop	""
	Nop	"No, Don't Quit"
EndPopup

PopUp	"WindowManagers"
	Restart "Restart fvwm" fvwm
	Restart "Start twm"	/usr/bin/X11/twm
	Restart	"Start olwm"	/usr/openwin/bin/olwm
	Restart "Start olvwm"	/usr/openwin/bin/olvwm
EndPopUp

# This menu checks to make sure you REALLY want to log out,
# assuming killing the WM will kick you out of X.
PopUp	"Logout-Verify"
	Title	"Do You REALLY want to log out?
	Nop	""
	Quit	"Yes, log me out."
	Nop	"No, cancel that."
EndPopUp

# The following menus form the bulk of the menu system I have hanging
# off the GoodStuff modules; they contain most of my commonly used
# X-based tools.  Note that I use rxvt instead of xterm for most of my
# shells due to memory constraints; if you use xterms or some variant
# thereof (aixterm, cxterm, kxterm, etc.) you'll need to change quite
# a few things.  --tabaer@magnus

# A menu of VT100 size shells
PopUp	"80x25"
	Title	"80x25 Shells"
	Nop	""
	Exec	"Black on gray"	exec rxvt -geometry 80x25 -fg Black -bg LightGray &
	Exec	"Black on white"	exec rxvt -geometry 80x25 -fg Black -bg White &
	Exec	"Gold on black"	exec rxvt -geometry 80x25 -fg gold1 -bg Black &
	Exec	"Green on black"	exec rxvt -geomtery 80x25 -fg green2 -bg Black &
	Exec	"White on black"	exec rxvt -geometry 80x25 -fg White -bg Black &
	Exec	"Yellow on blue"	exec rxvt -geometry 80x25 -fg Yellow -bg Blue &
EndPopUp

# A menu of slightly larger shells
PopUp	"80x40"
	Title	"80x40 Shells"
	Nop	""
	Exec	"Black on gray"	exec rxvt -geometry 80x40 -fg Black -bg LightGray &
	Exec	"Black on white"	exec rxvt -geometry 80x40 -fg Black -bg White &
	Exec	"Gold on black"	exec rxvt -geometry 80x40 -fg gold1 -bg Black &
	Exec	"Green on black"	exec rxvt -geometry 80x40 -fg green2 -bg Black &
	Exec	"White on black"	exec rxvt -geometry 80x40 -fg White -bg Black &
	Exec	"Yellow on blue"	exec rxvt -geometry 80x40 -fg Yellow -bg Blue &
EndPopUp

PopUp	"Apps"
	Title	"Applications"
	Nop	""
	Exec	"X Spreadsheet"	exec xspread &
	Exec	"PostScript Previewer"	exec ghostview &
	Exec	"Pixmap Previewer"	exec xv &
EndPopUp

PopUp "AudioDemos"
	Title	"Audio Demos"
	Nop	""
EndPopUp

# All sorts of different time pieces
PopUp "Clocks"
	Title	"Clocks"
	Nop	""
	Exec	"Analog Clock"	exec xclock -analog &
	Exec	"Digital Clock"	exec xclock -digital &
	Exec	"Round Clock"	exec oclock &
EndPopUp

# A set of NASTY time killers...
PopUp "Games"
	Title	"Games"
	Nop	""
	Exec	"GnuChess"	exec xboard &
	Exec	"Lander"	exec xlander &
	Exec	"Xvier"		exec xvier &
	Exec	"Doubledeck Solitaire"	exec spider &
	Exec	"Puzzles"	exec xpuzzle &
	Exec	"Make 5"	exec xmake5 &
EndPopUp

PopUp "MiscShells"
	Title	"Misc. Shells"
	Nop	""
	Exec	"Tcl"	exec rxvt -T Tcl -n Tcl -e tclsh &
	Exec	"TclX"	exec rxvt -T TclX -n TclX -e tcl &
	Exec	"Wish (Tk)"	exec rxvt -T Tk -n Tk -e wish &
	Exec	"WishX (TkX)"	exec rxvt -T TkX -n TkX -e wishx &
EndPopUp

# A menu of various and sundry background graphics on my machine.
# --tabaer@magnus
PopUp "Pixmaps"
	Title	"Backgrounds"
	Nop	""
	Exec	"MIT Logo"	exec xsetroot -bg White -fg LightSkyBlue -bitmap /usr/include/X11/bitmaps/mensetmanus &
	Exec	"X Logo"	exec xsetroot -bg White -fg Black -bitmap /usr/include/X11/bitmaps/xlogo64 &
	Exec	"Escher Knots"	exec xsetroot -bg LightSkyBlue -fg Black -bitmap /usr/include/X11/bitmaps/escherknot &
	Exec	"Woman"		exec xsetroot -bg White -fg Black -bitmap /usr/include/X11/bitmaps/woman &
EndPopUp
	
# Several math/science/engineering related applications
PopUp	"SciEngr"
	Title	"Science/Engineering"
	Nop	""
	Exec	"RLaB"		exec rxvt -T RLaB -n RLaB -e /usr/local/bin/rlab &
	Exec	"GnuPlot"	exec rxvt -T GnuPlot -n GnuPlot -e /usr/local/bin/gnuplot &
# I need other stuff here, but that'll come later... --tabaer@magnus
EndPopUp

# Menu of silly things every X setup should have
PopUp "Toys"
	Title	"Toys"
	Nop	""
	Exec	"Eyeballs"		exec xeyes &
	Exec	"Ideal Gases"	exec xgas &
EndPopUp

# Here are the top-level menus hanging off GoodStuff.  As you'll see,
# they call other menus a lot.  --tabaer@magnus

PopUp "Shells"
	Title	"Shells"
	Nop	""
	PopUp	"80x25"	80x25
	PopUp	"80x40"	80x40
	PopUp	"Misc"	MiscShells
EndPopUp

PopUp	"Windows"
	Title	"Windows"
	Nop	""
	PopUp	"Set Background"	Pixmaps
	Nop	"Set Screen Saver"
	PopUp	"Window Managers"	WindowManagers
	Nop	""
	CirculateUp	"Shuffle Up"
	CirculateDown	"Shuffle Down"
	Nop	"Tidy Icons (?)"
	Nop	""
	Nop	"Restore All (?)"
	Nop	"Minimize All (?)"
	Refresh	"Refresh All"
EndPopUp

PopUp	"Tools"
	Title	"Tools"
	Nop	""
	Exec	"Online Help"	exec /usr/local/tkinfo-0.6/tkinfo &
	Exec	"Online Manual"	exec xman &
	PopUp	"Clocks"	Clocks
	Exec	"Calculator"	exec xcalc &
	Exec	"Calendar"	exec ical &	
	Exec	"Clipboard"	exec xclipboard &
	PopUp	"Engineering Apps."	SciEngr
	Exec	"Memory Usage"	exec xmem &
	PopUp	"Misc. Apps."	Apps
	Exec	"Seyon"	exec seyon -modems /dev/cua1 &
	Exec	"System Load"	exec xosview -l &
EndPopUp

PopUp	"Demos"
	Title	"Demos"
	Nop	""
	PopUp	"Audio Demos"	AudioDemos
	PopUp	"X Demos and Toys"	Toys
	PopUp	"X Games"	Games
EndPopUp

PopUp	"R-Hosts"
	Title "Remote Hosts"
	Nop	""
	Exec	"Archie"	exec xarchie &
	Exec	"World-Wide Web"	exec /usr/local/bin/chimera &
	Exec	"News"	exec rxvt -T News -i News -e /usr/local/bin/trn &
EndPopUp

PopUp	"System"
	Title "System
	Nop	""
	Exec	"Lock Terminal"	exec xlock -mode random &
	Nop	""
	PopUp	"Log Out"	Logout-Verify
EndPopUp

# The next few menus are mostly used in the root window.  They control
# basic things like window placement, iconification, and logging out.
# --tabaer@magnus
	
# This defines the most common window operations
# As with the key bindings (see below), these were appropriated from
# a stock SGI .4Dwmrc file
Popup "Window Ops"
# I'm not 100% sure what the "Restore" option is supposed to do in stock
# mwm/4Dwm, or if there's an equivalent in fvwm.  Right now I just have
# Restore defined the same as (De)Iconify.  --tabaer@magnus
	Iconify	"Restore  (Alt-F5)"
	Move	"Move     (Alt-F7)"
	Resize	"Resize   (Alt-F8)"
	Iconify	"Minimize (Alt-F9)"
	Maximize	"Maximize (Alt-F10)"
	Raise	"Raise    (Alt-F1)"
	Lower	"Lower    (Alt-F3)"
	WindowList	"WinList  (Alt-F6)"
	Nop	""
	Destroy	"Close    (Alt-F4)"
	Delete	"Quit     (Alt-F2)"
EndPopup

# 4dwm-ish root window menu
PopUp "RootMenu"
	Title	"FVWM"
	Nop	""
	Exec	"Lock Terminal"	exec xlock -mode random &
	PopUp	"Log Out"	Logout-Verify
EndPopUp

#4dwm-ish long root window
PopUp "LongRootMenu"
	Title	"FVWM"
	Nop	""
	Exec	"New Window"	exec rxvt &
	CirculateUp	"Shuffle Up"
	CirculateDown	"Shuffle Down"
	Nop	"Tidy Icons (?)"
	Nop	"Restore All (?)"
	Refresh	"Refresh All"
	Nop	""
	Restart	"Restart fvwm"	fvwm
	PopUp	"Quit fvwm"	Quit-Verify
	Nop	""
	Exec	"Lock Terminal"	exec xlock -mode random &
	PopUp	"Log Out"	Logout-Verify
EndPopUp

############################################################################
# Now define some handy complex functions

# This one moves the window if you drag the mouse, raises the window if you
# click,  or does a RaiseLower if you double-click
Function "Move-or-Raise"
	Move 		"Motion"
#	Raise		"Motion"
	Raise		"Click"
	RaiseLower	"DoubleClick" 
EndFunction

# This one moves and then lowers the window if you drag the mouse,
# only lowers the window if you click,  or does a RaiseLower if you double 
# click
Function "Move-or-Lower"
	Move 		"Motion"
	Lower		"Motion"
	Lower		"Click"
	RaiseLower	"DoubleClick"
EndFunction

# This one resizes and then raises the window if you drag the mouse,
# only raises the window if you click,  or does a RaiseLower if you double 
# click
Function "Resize-or-Raise"
	Resize 		"Motion"
	Raise		"Motion"
	Raise		"Click"
	RaiseLower	"DoubleClick"
EndFunction

Function "Move-or-Iconify"
	Move 		"Motion"
	PopUp		"Click" Window Ops
	Iconify		"DoubleClick"
EndFunction

# This does the Motif thing of killing the window when you
# double-click the top left button.  --tabaer@magnus
Function "Die-on-DoubleClick"
	Destroy		"DoubleClick"
	PopUp		"Click"	Window Ops
EndFunction

##############################################################################
# This defines the mouse bindings

# First, for the mouse in the root window
# I use the AnyModifier option for the modifier field, so you can hold down
# any shift-control-whatever combination you want!

#     Button	Context Modifi 	Function
Mouse 1		R   	A       PopUp "LongRootMenu"
# Mouse button 2 calls up the Tools menu in case GoodStuff doesn't work
Mouse 2		R    	A      	PopUp "Tools"
Mouse 3		R    	A      	PopUp "RootMenu"

# Now the title bar buttons
# Any button in the left title-bar button gives the window ops menu
# Any button in the right title-bar button Iconifies the window
# Note the use of "Mouse 0" for AnyButton.

#     Button	Context Modifi 	Function
Mouse 0		1    	A      	Function "Die-on-DoubleClick"
Mouse 0		2    	A     	Maximize
Mouse 0		4    	A     	Iconify

# Now the rest of the frame
# Here I invoke my complex functions for Move-or-lower, Move-or-raise,
# and Resize-or-Raise. 
# Button 1 in the corner pieces, with any modifiers, gives resize or raise
Mouse 1		FS	A	Function "Resize-or-Raise"
Mouse 2		FS	A	Function "Resize-or-Raise"
Mouse 1         T	A	Function "Move-or-Raise"
Mouse 2         T	A	Function "Move-or-Raise"
Mouse 1		I	A	Function "Move-or-Iconify"
Mouse 2		I	A	Function "Move-or-Iconify"

############################################################################
# Now some keyboard shortcuts.

# press arrow in the root window, and move the pointer by 1% of a page
Key Left	R	N	CursorMove -1 0
Key Right	R	N	CursorMove +1 +0
Key Up		R	N	CursorMove +0 -1
Key Down	R	N	CursorMove +0 +1

# press shift arrow anywhere, and move the pointer by 5% of a page
Key Left	A	S	CursorMove -5 0
Key Right	A	S	CursorMove +5 +0
Key Up		A	S	CursorMove +0 -5
Key Down	A	S	CursorMove +0 +5

# press shift arrow + control key, and move the pointer by 10% of a page
Key Left	A	SC	CursorMove -10 +0
Key Right	A	SC	CursorMove +10 +0
Key Up		A	SC	CursorMove +0   -10
Key Down	A	SC	CursorMove +0   +10

# press shift arrow + meta key, and move the pointer by 20% of a page
Key Left	A	SM	CursorMove -20 +0
Key Right	A	SM	CursorMove +20 +0
Key Up		A	SM	CursorMove +0   -20
Key Down	A	SM	CursorMove +0   +20

# Keyboard accelerators
# These are "borrowed" from the .4Dwmrc file on an SGI I use,
# except for AltF2 and AltF6 which I added for completeness.
# I think the other are standard Motif.  --tabaer@magnus
Key F1		WFST	M	Raise
Key F2		WFST	M	Delete
Key F3		WFST	M	Lower
Key F4		WFST	M	Destroy
Key F5		WFST	M	Raise
Key F6		A	M	WindowList
Key F7		WFST	M	Move
Key F8		WFST	M	Resize
Key F9		WFST	M	Iconify
Key F10		WFST	M	Maximize