File: .fvwm2rc.example

package info (click to toggle)
fvwmconf 0.19-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 808 kB
  • ctags: 406
  • sloc: perl: 6,191; makefile: 47; sh: 2
file content (269 lines) | stat: -rw-r--r-- 8,671 bytes parent folder | download | duplicates (3)
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
# Sample .fvwm2rc file for use with FvwmConf

# This adds the location of the modules
ModulePath USERHOME/.fvwmconf/lib:\
/usr/X11R6/lib/X11/fvwm2:/usr/local/lib/X11/fvwm2

# This adds some pixmaps
PixmapPath /usr/include/X11/pixmaps/\
:/usr/local/include/X11/pixmaps/

AddToFunc "InitFunction" 
#+		"I" Exec ~/.fvwmconf/bin/watch 1 xterm
+		"I" Exec xterm
# only use watch if you start fvwmconf on startup.

#  a menu item for FvwmConf
AddToMenu "Main" "Main" Title
+	"xterm"   Exec xterm
+	"FvwmConf"  FvwmConf
+        "Quit Fvwm" Popup "Quit-Verify"

AddToFunc ExitFunction
+	"I" KillModule FvwmConf


Read .com.fvwm

#  Everything below this line does is standard,
#  and is independent of the MyFvwmConf
#################################################################

#Style "FvwmPager"      NoTitle, Sticky, WindowListSkip
#DeskTopSize 1x6


AddToFunc "Move-or-Raise" "M" Move
+              "M" Raise
+              "C" Raise
+              "D" RaiseLower

AddToFunc "ColFunc" "I" HilightColor    #c06077 Black


# This one maximizes vertically if you click (leaving room for the GoodStuff bar at the
# bottom, or does a full maximization if you double click, or a true full vertical 
# maximization if you just hold the mouse button down.
AddToFunc "maximize_func" "M" Maximize 0 100
+              "C" Maximize 0 80
+              "D" Maximize 100 100

# 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
AddToFunc "Move-or-Lower" "M" Move
+              "M" Lower
+              "C" Lower
+              "D" RaiseLower

# This one moves or (de)iconifies:
AddToFunc "Move-or-Iconify" "M" Move
+              "D" Iconify

# 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
AddToFunc "Resize-or-Raise" "M" Resize
+              "M" Raise
+              "C" Raise
+              "D" RaiseLower



# restart, or switch to another WM.
AddToMenu "Quit-Verify" "Really Quit Fvwm?" Title
+              "Restart fvwm2" Restart fvwm2
+              "" Nop
+              "No, Don't Quit" Nop
+	       "" Nop
+              "Yes, Really Quit" Quit


# This defines the most common window operations
AddToMenu "WindowOps" "WindowOps" Title
+              "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "(De)Iconify" Iconify
+              "(Un)Stick" Stick
+              "(Un)Maximize" Function maximize_func
+              "" Nop
+              "Destroy" Destroy
+              "Delete" Delete
+              "" Nop
+              "Refresh Screen" Refresh

# A trimmed down version of "WindowOps", good for binding to decorations
AddToMenu "WindowOps2" "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "Iconify" Iconify
+              "(Un)Stick" Stick
+              "" Nop
+              "Destroy" Destroy
+              "Delete" Delete
+              "" Nop
+              "ScrollBar" Module FvwmScroll 2 2


AddToFunc "window_ops_func" "C" PopUp WindowOps2
+              "M" PopUp WindowOps2
# Motif would add
#       Delete  "DoubleClick"  


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

# First, for the mouse in the root window
# Button 1 gives the Utilities menu
# Button 2 gives the WindowOps menu
# Button 3 gives the WindowList (like TwmWindows)
# I use the AnyModifier (A) option for the modifier field, so you can hold down
# any shift-control-whatever combination you want!

#     Button	Context Modifi 	Function
Mouse 1		R   	N      Menu "Main" Nop
Mouse 2		R    	A       Menu "WindowOps" Nop
Mouse 3         R       A       WindowList
#Mouse 3		R    	A      	Module "winlist" FvwmWinList transient



# 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
# Any button in the rightmost title-bar button maximizes
# Note the use of "Mouse 0" for AnyButton.

#     Button	Context Modifi 	Function
Mouse 0		1    	A      	Function "window_ops_func"
Mouse 0		2    	A     	Function "maximize_func"
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		F	A	Function "Resize-or-Raise"
# Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise
Mouse 1		TS	A	Function "Move-or-Raise"

# Button 1 in an icons gives move for a drag, de-iconify for a double-click,
# nothing for a single click
# Button 2 in an icon, w/ any modifiers, gives de-iconify

Mouse 1		I	A	Function "Move-or-Iconify"
Mouse 2		I	A	Iconify

# Button 2 in the corners, sides, or title-bar gives the window ops menu
Mouse 2		FST	A	Function "window_ops_func"
# Button 3 anywhere in the decoration (except the title-bar buttons)
# does a raise-lower
Mouse 3		TSIF	A	RaiseLower

# Button 3 in the window, with the Modifier-1 key (usually alt or diamond)
# gives Raise-Lower. Used to use control here, but that interferes with xterm
Mouse 3         W       M       RaiseLower

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

# Arrow Keys
# press arrow + control anywhere, and scroll by 1 page
Key Left	A	C	Scroll -100 0
Key Right	A	C	Scroll +100 +0
Key Up		A	C	Scroll +0   -100
Key Down	A	C	Scroll +0   +100

# press arrow + meta key, and scroll by 1/10 of a page
Key Left	A	M	Scroll -10 +0
Key Right	A	M	Scroll +10 +0
Key Up		A	M	Scroll +0   -10
Key Down	A	M	Scroll +0   +10

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

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

# Keyboard accelerators
Key F1		A	M	Popup "Common"
Key F2		A	M	Popup "WindowOps"
Key F3		A	M	Module "WindowList" FvwmWinList 
Key F4		A	M	Iconify
Key F5		A	M	Move
Key F6		A	M	Resize
Key F7		A	M	CirculateUp
Key F8		A	M	CirculateDown

#Page Up/Dapge Down keys are used to scroll by one desktop page
# in any context, press page up/down + control
# in root context, just pressing page up/down is OK
# 
# I prefer the non-wrapping scroll. These are for example purposes only
#Key Next	A       C       Scroll 100000 0
#Key Next	R       N       Scroll 100000 0  
#Key Prior	A       C       Scroll -100000 0
#Key Prior	R       N       Scroll -100000 0


############################################################################
############################################################################
#Definitions used by the modules

###################### GoodStuff button-bar ################################
# Colors
*FvwmButtonsFore Black
*FvwmButtonsBack #908090


*FvwmButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
# Geometry - really likes to pick its own size, but giving a position is OK
*FvwmButtonsGeometry -1-90

# Layout: specify rows or columns, not both
*FvwmButtonsColumns 1

# Define the buttons to use.....
*FvwmButtons Kill    rbomb.xpm    Destroy

########################## Window-Identifier ###############################
# Just choose colors and a fonts
*FvwmIdentBack MidnightBlue
*FvwmIdentFore Yellow
*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*


##########################FvwmWinList##################################
*FvwmWinListBack #908090
*FvwmWinListFore Black
*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmWinListAction Click1 Iconify -1,Focus
*FvwmWinListAction Click2 Iconify
*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
*FvwmWinListUseSkipList
*FvwmWinListGeometry +0-1
                                      

#Set the foreground, background and stipple color and font for menus
MenuStyle   Black LightBlue3 SlateGrey -adobe-helvetica-bold-r-*-*-17-*-*-*-*-*-*-* fvwm
#! FvwmPager config to emulate builtin pager
*FvwmPagerBack #5c54c0
*FvwmPagerFore LightBlue3
*FvwmPagerFont none
*FvwmPagerHilight orchid
*FvwmPagerGeometry 60x250+0+0
*FvwmPagerSmallFont -*-times-medium-r-*-*-*-80-*-*-*-*-*-*
*FvwmPagerDeskTopScale 10
#! Now start pager
Module FvwmPager 0 0