summaryrefslogtreecommitdiff
path: root/examples/system.fvwm2rc
blob: ce60e782d63934f6b3f92a585590361509648921 (plain)
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
#
# Configuration file for fvwm2
# by Lars Wirzenius
# "@(#):$Id: system.fvwm2rc,v 1.1 2003-04-07 17:04:19 ballombe Exp $"
#
# This file can be used both as the system.fvwmrc and the per-user ~/.fvwm2rc.
# It uses certain `hooks' (files stored in /etc/X11/fvwm2 or ~/.fvwm2) to allow 
# the system administrator and user to modify menus, colors, and so on without 
# having to change this file.
#
# The defaults that this file sets up follow my own taste.  They attempt to set
# up a nice, easy, comfortable environment for the "ordinary" user.  However, 
# using the hooks, it should be possible to change anything.
#
# Please read /usr/doc/fvwm2/README.sysrc for more information.
#
# Hopefully, you will never have to modify this file.
#

#
# Section: pre.hook
#
# Use pre.hook for things that need to be done before anything else.
# For example, a PixmapPath might be defined here.
#
Style "Fvwm Pager"  StaysOnTop
Style "FvwmPager"   StaysOnTop
Style "Fvwm*"       NoTitle, NoHandles, Sticky, WindowListSkip,
Style "Fvwm*"       BorderWidth 0,CirculateSkipIcon
Style "*"           SmartPlacement
Style "*"           RandomPlacement
Style "Xlock"       NoTitle
Style "xlock"       NoTitle
Module  FvwmPager 0 3
*FvwmButtons(4x1) - whatever Swallow "FvwmPager" Module FvwmPager 0 3
*FvwmPagerBack #908090
*FvwmPagerFore #484048
*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmPagerHilight #cab3ca
*FvwmPagerGeometry -1-1
#*FvwmPagerLabel 0 Misc
#*FvwmPagerLabel 1 Maker
#*FvwmPagerLabel 2 Mail
#*FvwmPagerLabel 3 Matlab
*FvwmPagerSmallFont 5x8


Read /etc/X11/fvwm2/pre.hook
Read .fvwm2/pre.hook


#
# Section: Various global settings
#
# These settings are personal.  If you need to modify them, do so in post.hook.
#
#
# DeskTopSize sets the size of the desktop in units of physical screen
# `pages'.  I prefer to use separate desktops instead of pages, but
# many reasonable people do it the other way.  My reason is that this
# makes it possible to have different backgrounds when changing the
# workspace.
#

DeskTopSize 3x3

#
# I don't like to be able to move between pages or desks simply by 
# moving the mouse against the screen border.  I find it very 
# confusing.  The following command disables it.
#

EdgeScroll 0 0

#
# When moving a window against the edge of the screen, it is
# nice to have a small resistance before the window is moved outside
# the screen.  This makes it easier to line windows against the
# edges.
#

EdgeResistance 0 100


#
# Section: Styles, colors, fonts, and related things
#
# This section defines the looks, behavior, and other attributes of windows.
# These are also quite personal.  Modify them in post.hook.
#
#
# The following sets window colors.  This is highly personal,
# of course.
#

Style "*" Color black/darkgrey
HilightColor white steelblue
WindowFont -adobe-helvetica-bold-r-*-*-12-*

#
# The following sets the window decorations: the window title, borders,
# and the handles in the corners.
#

ButtonStyle 2 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1
ButtonStyle 4 5 25x25@1 25x75@1 75x75@0 75x25@0 25x25@1
ButtonStyle 6 2 80x76@0 20x76@1

Style "*" BorderWidth 6
Style "*" HandleWidth 6
Style "*" MWMBorder
Style "*" MWMDecor
Style "*" DecorateTransient
Style "*" SmartPlacement
Style "*" RandomPlacement
Style "*" IconBox 0 0 50 -1

Style "Fvwm*" NoTitle
Style "Fvwm*" WindowListSkip
Style "Fvwm*" CirculateSkip

Style "FvwmButtons" Sticky
Style "FvwmIconMan" Sticky

Style "FvwmIdent" Title
Style "FvwmIdent" WindowListHit
Style "FvwmIdent" CirculateHit


#
# Section: Init and restart functions
#
# This section defines the functions InitFunction and RestartFunction.
# InitFunction is executed automatically when fvwm first starts.
# RestartFunction is executed automatically when fvwm restarts itself.
# They share a common hook, init-restart.hook, and two specific hooks,
# init.hook and restart.hook.
#
# init-restart.hook should be used for starting fvwm modules, such as the
# button bar.  init-hook should be used to start other applications; they
# should not be started again, when fvwm is restarted, since they don't
# die like fvwm modules do.  restart.hook exists mostly for completeness;
# tell me if you find any use for it.
#
# InitFunction runs the script setup-background, which looks in 
# ~/.fvwm2 to see if the user wants some specific background color or
# image.
#

DestroyMenu InitFunction
AddToFunc InitFunction
+ "I" Exec setup-background
Read /etc/X11/fvwm2/init.hook
Read /etc/X11/fvwm2/init-restart.hook
Read .fvwm2/init.hook
Read .fvwm2/init-restart.hook

DestroyMenu RestartFunction
AddToFunc RestartFunction
Read /etc/X11/fvwm2/restart.hook
Read /etc/X11/fvwm2/init-restart.hook
Read .fvwm2/restart.hook
Read .fvwm2/init-restart.hook


#
# Section: Menus
#
# This section defines a small menu structure.  The main menu contains
# some typical entries, and uses a hook (main-menu.hook) to allow the
# user to add new entries.  Most of the default entries are submenus,
# which are also defined here.
#

#
# MWM style menus are easier to use and better for Windows refugees.
#

MenuStyle black grey white -adobe-helvetica-bold-r-*-*-12-* mwm

#
# The main menu.
#

###DestroyMenu MainMenu
###AddToMenu MainMenu
###+ "Main menu"		Title 	
###Read /etc/X11/fvwm2/main-menu-pre.hook
###Read .fvwm2/main-menu-pre.hook
###Read /etc/X11/fvwm2/main-menu.hook
###Read .fvwm2/main-menu.hook
###+ ""			Nop
###+ "Exit Fvwm"		Popup Quit-Verify
###
####
# Read in system and user menu definitions.
#

Read /etc/X11/fvwm2/menudefs.hook
Read .fvwm2/menudefs.hook

#
# The Window-Ops menu is for manipulating windows.  It is invoked either
# from the main menu, or directly from the root window.
#

DestroyMenu Window-Ops
AddToMenu Window-Ops
+ "Window Ops"			Title		
+ "Move"			Move
+ "Resize"			Resize
+ "Raise"			Raise
+ "Lower"			Lower 
+ "(De)Iconify"			Iconify
+ "(Un)Stick"			Stick		
+ "(Un)Maximize vertical"	Maximize 0 100
+ "(Un)Maximize horizontal"	Maximize 100 0
+ "(Un)Maximize to screen" 	Maximize 100 100
+ ""				Nop  
+ "Destroy"			Destroy
+ "Close"			Close	 

#
# Quit-Verify checks that the user really wants to exit.
#

DestroyMenu Quit-Verify
AddToMenu Quit-Verify
+ "Restart Fvwm"	Restart fvwm2
+ ""			Nop
+ "Really quit"		Quit	


#
# Section: Mouse bindings
#
# This section defines the mouse bindings, that is, all the things that
# can be done with the mouse.
#

#
# Each button gives a different menu from the background.
#

Mouse 1	R A Menu /Debian
Mouse 2	R A Menu Window-Ops
Mouse 3	R A WindowList

#
# Moving and resizing, depending on which part of the window
# you grab (T=title bar, S=side/top/bottom, F=corner).
#

Mouse 1 T A move-or-raise
Mouse 2 T A move-and-raise-or-raiselower
Mouse 3 T A move-or-lower
Mouse 0 F A resize-or-raiselower
Mouse 1 S A move-or-raise
Mouse 2 S A move-and-raise-or-raiselower
Mouse 3 S A move-or-lower


#
# Move or de-iconify an icon.
#

Mouse 0 I A move-or-winmenu-or-deiconify

#
# Buttons on the title bar (1,3,5,7,9 are on the left, 0,8,6,4,2 on
# the right side of the title bar).  Note that the bindings here
# make more sense if the ButtonStyle's defined earlier are retained.
#

Mouse 0 1 A Popup Window-Ops
Mouse 0 2 A Close
Mouse 0 4 A Maximize 0 100
Mouse 0 6 A Iconify


#
# Section: Key bindings
#
# This section binds some actions to keys.  The bindings have been inspired
# by MWM, Windows, and nightmares.  Everything that these key bindings do,
# can be done without them.  Therefore they should not be too much of a
# burden on new users, but it definitely _can_ be confusing to press a
# key by accident and have it do something completely unexpected.
#

Key Tab		A	M	Next [CurrentDesk !iconic] Focus
Key Tab		A	MS	Prev [CurrentDesk !iconic] Focus
Key Tab		A	CM	Next [CurrentDesk] deiconify-and-focus
Key Tab		A	CMS	Prev [CurrentDesk] deiconify-and-focus
Key Left	A	M	Desk -1 0
Key Up		A	M	Desk -1 0
Key Right	A	M	Desk 1 0
Key Down	A	M	Desk 1 0
Key F1		A	M	Popup Window-Ops
Key F2		A	M	Popup /Debian
Key F3		A	M	Lower
Key F4		A	M	WindowList
Key F5		A	M	CirculateUp
Key F6		A	M	CirculateDown
Key F7		A	M	Move
Key F8		A	M	Resize
Key F9		A	M	Iconify
Key F10 	A	M	Maximize

Key F1		A	C	exec /usr/bin/X11/xterm_color -sb -sl 500 -j -ls -fn 7x14 -geometry 80x30
#
# Section: Functions
#
# This section defines various functions.  Not all of these are used by
# the default bindings, but they can be useful for a user who wants to
# customize things.
#
#
# The following functions operate on a window or menu.  The
# names are systematic: foo means "do foo"; foo-or-bar means
# "do foo, if mouse is moving, bar if click"; and foo-or-bar-or-baz
# adds "baz, if double-clicked".
#

DestroyMenu move-or-winmenu-or-deiconify
AddToFunc   move-or-winmenu-or-deiconify
+ "M" Move
+ "C" Popup Window-Ops
+ "D" Iconify

DestroyMenu deiconify-and-focus
AddToFunc   deiconify-and-focus
+ "I" Iconify -1
+ "I" Focus

DestroyMenu deiconify-and-raise
AddToFunc   deiconify-and-raise
+ "I" Iconify -1
+ "I" Raise

DestroyMenu move-or-raiselower	
AddToFunc   move-or-raiselower	
+ "M" Move
+ "C" RaiseLower

DestroyMenu move-or-raise
AddToFunc   move-or-raise
+ "M" Move
+ "C" Raise

DestroyMenu move-or-lower
AddToFunc   move-or-lower
+ "M" Move
+ "C" Lower

DestroyMenu move-and-raise-or-raiselower	
AddToFunc   move-and-raise-or-raiselower	
+ "M" Move
+ "M" Raise
+ "C" RaiseLower

DestroyMenu move-or-raiselower-or-maximize-vertical
AddToFunc   move-or-raiselower-or-maximize-vertical
+ "M" Move
+ "C" RaiseLower
+ "D" Maximize 0 100

DestroyMenu resize-or-raiselower	
AddToFunc   resize-or-raiselower	
+ "M" Resize
+ "C" RaiseLower

#
# Section: post.hook
#
# Use post.hook to force things that may have been changed earlier, for
# example, key bindinds.
#

Read /etc/X11/fvwm2/post.hook
Read .fvwm2/post.hook