-
Notifications
You must be signed in to change notification settings - Fork 0
/
.fvwm2rc
337 lines (292 loc) · 9.57 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
## mafia.fvwm-v9000 ##
## Preferred applications
SetEnv fvwm_browser google-chrome-stable
SetEnv fvwm_terminal urxvt
SetEnv fvwm_editor "urxvt -e vim"
SetEnv fvwm_mail "urxvt -e mutt"
SetEnv fvwm_chat "rxvt -e irssi"
SetEnv fvwm_filemanager
SetEnv fvwm_image_viewer feh
SetEnv fvwm_runner dmenu
SetEnv FVWM_USERDIR "/home/mafia/.fvwm"
## Cursors
CursorStyle TOP "/usr/share/icons/Oxygen_White/cursors/n-resize"
CursorStyle RIGHT "/usr/share/icons/Oxygen_White/cursors/e-resize"
CursorStyle LEFT "/usr/share/icons/Oxygen_White/cursors/w-resize"
CursorStyle BOTTOM "/usr/share/icons/Oxygen_White/cursors/s-resize"
CursorStyle TOP_RIGHT "/usr/share/icons/Oxygen_White/cursors/size_bdiag"
CursorStyle TOP_LEFT "/usr/share/icons/Oxygen_White/cursors/size_fdiag"
CursorStyle BOTTOM_LEFT "/usr/share/icons/Oxygen_White/cursors/size_bdiag"
CursorStyle BOTTOM_RIGHT "/usr/share/icons/Oxygen_White/cursors/size_fdiag"
CursorStyle TOP_LEFT "/usr/share/icons/Oxygen_White/cursors/size_fdiag"
CursorStyle MENU "/usr/share/icons/Oxygen_White/cursors/pointer"
CursorStyle DEFAULT "/usr/share/icons/Oxygen_White/cursors/left_ptr"
## Ignore CapsLock and NumLock modifiers
IgnoreModifiers 2L
## Index window namees
Style * IndexedWindowName
## Hides the position and resize dialog
HideGeometryWindow
## Virtual desktops
DesktopName 0 ws1
DesktopName 1 ws2
DesktopName 2 ws3
DesktopName 3 ws4
DesktopSize 4x1
## TEST
BugOpts FlickeringMoveWorkaround True
## Desktop edge thickness and resistance
Style EdgeScroll 100 100
EdgeResistance -1
Style EdgeThickness 1
## Start functions
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Module FvwmCommandS
+ I Module FvwmAnimate
+ I Module FvwmButtons
+ I Module FvwmBacker
+ I Module FvwmPerl
+ I Module FvwmAuto 0 -menter "Silent AutoUnshade" "Silent AutoShade"
AddToFunc StartFunction I Test (Restart) All (Iconic) \
Test (f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) WindowStyle \
IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png
## Thumbnail screenshot icons
DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise
+ I SetEnv Icon-$[w.id] $[w.iconfile]
+ I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead \
"xwd -silent -id $[w.id] | convert -scale 200 -border 2 \
-bordercolor white -mattecolor black -quality 0 xwd:- \
png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png \
&& echo WindowStyle IconOverride, \
Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
|| echo Nop"
+ I Iconify
## Restore Thumbnail
DestroyFunc DeThumbnail
AddToFunc DeThumbnail
+ I PipeRead "echo WindowStyle Icon \\$\\[Icon-$[w.id]\\]"
+ I UnsetEnv Icon-$[w.id]
+ I Exec rm -f $[FVWM_USERDIR]/icon.tmp.$[w.id].png
## Check for floater images and destroy on exit
DestroyFunc ExitFunction
AddToFunc ExitFunction I Test (!ToRestart) \
Exec rm -f $[FVWM_USERDIR]/icon.tmp.*
## WASD/QEZX Tile
DestroyFunc TileLeft
AddToFunc TileLeft
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 100
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 +0
DestroyFunc TileRight
AddToFunc TileRight
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 100
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move -0 +0
DestroyFunc TileTop
AddToFunc TileTop
+ I ThisWindow (!Shaded, !Iconic) Maximize 100 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 +0
DestroyFunc TileBottom
AddToFunc TileBottom
+ I ThisWindow (!Shaded, !Iconic) Maximize 100 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 -0
DestroyFunc TileTopLeft
AddToFunc TileTopLeft
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 +0
DestroyFunc TileTopRight
AddToFunc TileTopRight
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move -0 +0
DestroyFunc TileBottomLeft
AddToFunc TileBottomLeft
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 -0
DestroyFunc TileBottomRight
AddToFunc TileBottomRight
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move -0 -0
## Widescreen formatting
DestroyFunc ReadableWidth
AddToFunc ReadableWidth
+ I Maximize 60
+ I Move 50-50w 50-50w
## Undecorate window and maximize it
DestroyFunc UndecMax
AddToFunc UndecMax
+ I Schedule 100 Maximize 100 100
## Undecorate given window
DestroyFunc UnDecorate
AddToFunc UnDecorate
+ I WindowStyle !Title, !Borders, !Handles
## Decorate given window
DestroyFunc Decorate
AddToFunc Decorate
+ I WindowStyle Borders, Handles
## File browser menu using $[fvwm_filemanager]
AddToFunc FuncFvwmMenuDirectory
+ I PipeRead \
"fvwm-menu-directory -d '$0' \
-command-t 'Exec exec $[fvwm_filemanager] "%d"' \
-command-f 'Exec exec $[fvwm_filemanager] "%f"'"
## Focus policy
ClickTime 350
MoveThreshold 3
Style * SloppyFocus, MouseFocusClickRaises
####################
# Device bindings #
# Cheatsheat #
####################
# Contexts:
#
# R - Root window
# I - Iconified window
# F - window decoration corner
# S - window decoration side
# T - window decoration title
# W - active window
# 0-9 - titlebar buttons
# M - Menu
# A - any context
#
# You can combine contexts: FWST etc.
#
# Modifiers:
# ctrl - C
# super - 4
# alt - 1
# shift - S
# caps - L
# num - 2
#
# You can combine modifiers: 1S, 4S, etc.
## Switch desktops with arrow keys
Key Left A C1 Scroll -100 0
Key Right A C1 Scroll +100 +0
Key Up A C1 Scroll +0 -100
Key Down A C1 Scroll +0 +100
## Daily Binds + WASD/QEZX Tiling
Key Return A 1 Exec urxvt
Key Return A C1 Exec dmenu_run -nb "#222222" -nf "#C7c7c7" -sb "#333333" -sf "#F0205c" -fn "montecarlo-9"
Key r A C1 restart
Key q A C1 quit
Key k A C1 delete
Key b A C1 Exec google-chrome-stable
Key t A 1 Thumbnail
Key m A 1 UndecMax
Key w A 1 TileTop
Key a A 1 TileLeft
Key s A 1 TileBottom
Key d A 1 TileRight
Key q A 1 TileTopLeft
Key e A 1 TileTopRight
Key z A 1 TileBottomLeft
Key x A 1 TileBottomRight
Key c A 1 ReadableWidth
## Mouse bindings
Mouse 3 R A Menu MainMenu
Mouse 1 R A WindowList Root NoGeometry NoNumInDeskTitle
Mouse 1 A 1 Move
Mouse 3 A 1 Resize
Mouse 1 W M Move
Mouse 1 I N Iconify
## Main menu
AddToMenu MainMenu MainMenu title
+ DynamicPopupAction Function MakeMainMenu
AddToFunc MakeMainMenu
+ I DestroyMenu recreate MainMenu
+ I AddToMenu MainMenu MissingSubmenuFunction FuncFvwmMenuDirectory
+ I AddToMenu MainMenu "&Term" Exec exec urxvt
+ I AddToMenu MainMenu "&Web" Exec exec google-chrome-stable
+ I AddToMenu MainMenu "&Browse" Popup $[HOME]
+ I AddToMenu MainMenu "&Apps" Popup Applications
+ I AddToMenu MainMenu "" No
+ I AddToMenu MainMenu "Re&start" Restart
+ I AddToMenu MainMenu "E&xit" Quit
## Applications menu
DestroyMenu Applications
AddToMenu Applications
+ "gimp" Exec exec gimp
+ "gcolor2" Exec exec gcolor2
+ "xterm" Exec exec xterm
## Window menu
DestroyMenu WindowMenu
AddToMenu WindowMenu
+ "On &Top" WinOnTop
+ "Audo&shade" ToggleAutoShaded
+ "Undecorate and &Maximize" UndecMax
+ "Autoshade and &On Top" AutoShadeAndOnTop
+ "S&tick" Stick
+ "" Nop
+ "Force close" Destroy
##############
# Colorset #
# Cheatsheet #
##############
#
# Colorsets:
#
# 0 = Default colors
# 1 = Inactive windows
# 2 = Active windows
# 3 = Inactive menu entry and menu background
# 4 = Active menu entry
# 5 = greyed out menu entry (only bg used)
# 6 = module foreground and background
# 7 = hilight colors
## Window Decor CS
Colorset 4 bg #222222
Colorset 5 bg #282828
Colorset 10 fg #B5E15D, bg #111111, sh #555555, hi #555555
Colorset 11 fg #D2B48C, bg #111111, sh #D2B48C, hi #D2B48C
## Menu CS
Colorset 7 fg #C7C7C7, bg #303030, sh #414141, hi #414141
Colorset 8 fg #FFFFB9, bg #eb928e, sh #eb928e, hi #151515
## Menu Styles
MenuStyle * MenuColorset 7
MenuStyle * ActiveColorset 8
MenuStyle * SeparatorsLong, TrianglesRelief
MenuStyle * BorderWidth 7
MenuStyle * ActiveFore, Hilight3DOff,
## Popup settings
MenuStyle * PopupAsSubmenu, HoldSubmenus, SubmenusRight
MenuStyle "*" PopupOffset 2 100
## Fonts
MenuStyle "*" Font "-*-montecarlo-medium-*-*-*-11-*-*-*-*-*-microsoft-cp1252"
Style "*" Font "-*-montecarlo-medium-*-*-*-11-*-*-*-*-*-microsoft-cp1252"
## Borders/Decor
DestroyDecor MyDecor
AddToDecor MyDecor
+ TitleStyle RightJustified Height 18
+ ButtonStyle 2 ActiveUp Vector 6 30x50@3 40x40@3 50x50@3 50x65@4 40x55@3 30x65@3 -- Flat
+ ButtonStyle 2 ActiveDown Vector 6 30x50@3 40x40@3 50x50@3 50x65@4 40x55@3 30x65@3 -- Flat
+ ButtonStyle 2 Inactive Vector 6 30x50@3 40x40@3 50x50@3 50x65@4 40x55@3 30x65@3 -- Flat
+ ButtonStyle 4 ActiveUp Vector 6 40x50@3 30x40@3 40x30@3 55x50@4 40x40@3 55x30@3 -- Flat
+ ButtonStyle 4 ActiveDown Vector 6 40x50@3 30x40@3 40x30@3 55x50@4 40x40@3 55x30@3 -- Flat
+ ButtonStyle 4 Inactive Vector 6 40x50@3 30x40@3 40x30@3 55x50@4 40x40@3 55x30@3 -- Flat
+ ButtonStyle 6 ActiveUp Vector 6 30x20@3 40x30@3 50x20@3 50x30@4 40x40@3 30x30@3 -- Flat
+ ButtonStyle 6 ActiveDown Vector 6 30x20@3 40x30@3 50x20@3 50x30@4 40x40@3 30x30@3 -- Flat
+ ButtonStyle 6 Inactive Vector 6 30x20@3 40x30@3 50x20@3 50x30@4 40x40@3 30x30@3 -- Flat
+ TitleStyle -- Flat
+ BorderStyle Simple -- NoInset Flat
+ ButtonStyle All -- UseTitleStyle
TitleStyle Height 19
Style * TitleAtTop
TitleStyle Colorset 11 -- Flat
Style "*" HilightColorset 11
Style "*" Colorset 10
Style "*" UseDecor MyDecor
Style "*" NoTitle
Style "*" BorderWidth 8, HandleWidth 8
Style "*" BorderColorset 4
Style "*" HilightBorderColorset 5
## Misc. Application Styles
Style "feh" !Borders
Style "*" ResizeOpaque
OpaqueMoveSize unlimited
Style "*" ResizeHintOverride
Style "*" !IconTitle
Style * IconBox 1000x944+40+40, IconGrid 15 15, IconFill top left, !IconTitle, IconBackgroundRelief 0
DestroyMenuStyle WindowList
## END ##