]> git.phdru.name Git - dotfiles.git/blob - .fvwm/main.m4
Refactor(.fvwmrc): Combine term+ssh+screen macros
[dotfiles.git] / .fvwm / main.m4
1 ##########################################################################
2 # FVWM - F? Virtual Window Manager, Version 2.x (fvwm2) Configuration File
3 #
4
5 dnl The file is in m4 format, use FvwmM4 module to read it
6 dnl like this: ModuleSynchronous FvwmM4 -lock main.m4
7
8 dnl This is to prevent FvwmM4 to shadow $HOME
9 undefine(`HOME')
10
11 dnl Echo dimension
12 `#' width = WIDTH
13
14 divert(-1)
15
16 dnl TrueType Fonts
17 define(`VERY_SMALL_FONT', `xft:Sans:size=10')
18 define(`SMALL_FONT', `xft:Sans:size=12')
19 define(`MEDIUM_FONT', `xft:Sans:size=14')
20 define(`BIG_FONT', `xft:Sans:size=16')
21 define(`LARGE_FONT', `xft:Sans:size=18')
22 define(`HUGE_FONT', `xft:Sans:size=20')
23 define(`GIGANTIC_FONT', `xft:Sans:size=22')
24
25 dnl Bold TT fonts
26 define(`SMALL_BOLD_FONT', SMALL_FONT`:Bold')
27 define(`MEDIUM_BOLD_FONT', MEDIUM_FONT`:Bold')
28 define(`BIG_BOLD_FONT', BIG_FONT`:Bold')
29
30 define(`TITLE_FONT', MEDIUM_FONT)
31 define(`ICON_FONT', LARGE_FONT)
32
33 dnl Font and geometry aliases that depend on whether the screen resolution is
34 dnl 800x600, 1024x768 or 1920x1200
35
36 define(`PAGER_GEOM',
37 ifelse(eval(WIDTH < 1024), 1, `365x100+0+0',
38        eval(WIDTH < 1920), 1, `365x100+0+0', `600x160+0+0'))
39
40 define(`SMALL_PAGER_FONT', ifelse(eval(WIDTH < 1920), 1, VERY_SMALL_FONT, SMALL_FONT))
41 define(`PAGER_FONT', ifelse(eval(WIDTH < 1920), 1, SMALL_FONT, BIG_FONT))
42 define(`BUTTONS_FONT', PAGER_FONT)
43
44
45 define(`MENU_FONT',
46 ifelse(eval(WIDTH < 1024), 1, BIG_FONT,
47        eval(WIDTH < 1920), 1, LARGE_FONT, GIGANTIC_FONT))
48 define(`IDENT_FONT', MENU_FONT)
49 define(`WIN_LIST_FONT', MENU_FONT)
50 define(`ICON_BOX_FONT', MENU_FONT)
51
52
53 dnl XSetBg message width and font
54 define(`TEXT_WIDTH',
55 ifelse(eval(WIDTH < 1024), 1, 70,
56        eval(WIDTH < 1920), 1, 75, 80))
57
58 define(`MESSAGE_FONT', `Nimbus Sans L 18')
59
60
61 dnl Terminal emulator
62 define(`TERM_GEOM',
63 ifelse(eval(WIDTH < 1024), 1, `80x25',
64        eval(WIDTH < 1920), 1, `80x30', `80x32'))
65
66 define(`TERM_GEOM_BOTLT', TERM_GEOM`+0-0')
67 define(`TERM_GEOM_BOTRT', TERM_GEOM`-0-0')
68
69 define(`TERM_GEOM_BIG',
70 ifelse(eval(WIDTH < 1024), 1, `96x30',
71        eval(WIDTH < 1920), 1, `112x32+2-0', `119x32+1-0'))
72
73
74 define(`TERM', `urxvt')
75 define(`TERM_KOI8', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM')
76 define(`TERM_RU_UTF8', `Exec LC_CTYPE=ru_RU.UTF-8 exec TERM -name URxvt')
77 define(`TERM_EN_UTF8', `Exec LC_CTYPE=en_US.UTF-8 exec TERM -name URxvt')
78 define(`TERM_HEB_UTF8', `Exec LC_CTYPE=he_IL.UTF-8 exec TERM -name URxvt')
79 define(`TERM_KOI8_BOTLT', `TERM_KOI8 -geometry TERM_GEOM_BOTLT')
80 define(`TERM_RU_UTF8_BOTLT', `TERM_RU_UTF8 -geometry TERM_GEOM_BOTLT')
81 define(`TERM_KOI8_BOTRT', `TERM_KOI8 -geometry TERM_GEOM_BOTRT')
82 define(`TERM_RU_UTF8_BOTRT', `TERM_RU_UTF8 -geometry TERM_GEOM_BOTRT')
83
84
85 define(`SSH', `cgmem_nice 300 ssh')
86
87 define(`TERM_SSH', `$1 -e SSH $2')
88
89 define(`TERM_TITLE_SSH', `$1 -title "$3" -n "$3" -e SSH $2')
90
91 define(`TERM_KOI8_SSH',
92 TERM_TITLE_SSH(TERM_KOI8, $1, $2))
93
94 define(`SSH_SCREEN_KOI8', `-t $1 exec /usr/bin/screen -xRR -S default-koi8')
95 define(`SSH_SCREEN_UTF8', `-t $1 exec /usr/bin/screen -xRR -S default-utf8')
96
97 define(`TERM_TITLE_SSH_SCREEN_KOI8',
98 `$1 -title "$3 scr" -n "$3 scr" -e SSH SSH_SCREEN_KOI8($2)')
99
100 define(`TERM_TITLE_SSH_SCREEN_UTF8',
101 `$1 -title "$3 scr" -n "$3 scr" -e SSH SSH_SCREEN_UTF8($2)')
102
103 define(`MENU_TERM_KOI8_SSH',
104 "$2 (koi8)" TERM_KOI8_SSH($1, $2))
105
106 define(`TERM_KOI8_BOTLT_SSH',
107 TERM_TITLE_SSH(TERM_KOI8_BOTLT, $1, $2))
108
109 define(`TERM_KOI8_BOTRT_SSH',
110 TERM_TITLE_SSH(TERM_KOI8_BOTRT, $1, $2))
111
112 define(`MENU_TERM_KOI8_BOTLT_SSH',
113 "$2 (btlt,koi8)" TERM_KOI8_BOTLT_SSH($1, $2))
114
115 define(`MENU_TERM_KOI8_BOTRT_SSH',
116 "$2 (btrt,koi8)" TERM_KOI8_BOTRT_SSH($1, $2))
117
118 define(`TERM_KOI8_SSH_SCREEN',
119 TERM_TITLE_SSH_SCREEN_KOI8(TERM_KOI8, $1, $2))
120
121 define(`MENU_TERM_KOI8_SSH_SCREEN',
122 "$2 (koi8,scr)" TERM_TITLE_SSH_SCREEN_KOI8(TERM_KOI8, $1, $2))
123
124 define(`TERM_KOI8_BOTLT_SSH_SCREEN',
125 TERM_TITLE_SSH_SCREEN_KOI8(TERM_KOI8_BOTLT, $1, $2))
126
127 define(`TERM_KOI8_BOTRT_SSH_SCREEN',
128 TERM_TITLE_SSH_SCREEN_KOI8(TERM_KOI8_BOTRT, $1, $2))
129
130 define(`MENU_TERM_KOI8_BOTLT_SSH_SCREEN',
131 "$2 (btlt,koi8,scr)" TERM_KOI8_BOTLT_SSH_SCREEN($1, $2))
132
133 define(`MENU_TERM_KOI8_BOTRT_SSH_SCREEN',
134 "$2 (btrt,koi8,scr)" TERM_KOI8_BOTRT_SSH_SCREEN($1, $2))
135
136 define(`TERM_UTF8_SSH',
137 TERM_TITLE_SSH(TERM_RU_UTF8, $1, $2))
138
139 define(`MENU_TERM_UTF8_SSH',
140 "$2 (utf8)" TERM_UTF8_SSH($1, $2))
141
142 define(`TERM_UTF8_BOTLT_SSH',
143 TERM_TITLE_SSH(TERM_RU_UTF8_BOTLT, $1, $2))
144
145 define(`TERM_UTF8_BOTRT_SSH',
146 TERM_TITLE_SSH(TERM_RU_UTF8_BOTRT, $1, $2))
147
148 define(`MENU_TERM_UTF8_BOTLT_SSH',
149 "$2 (btlt,utf8)" TERM_UTF8_BOTLT_SSH($1, $2))
150
151 define(`MENU_TERM_UTF8_BOTRT_SSH',
152 "$2 (btrt,utf8)" TERM_UTF8_BOTRT_SSH($1, $2))
153
154 define(`TERM_UTF8_SSH_SCREEN',
155 TERM_TITLE_SSH_SCREEN_UTF8(TERM_RU_UTF8, $1, $2))
156
157 define(`MENU_TERM_UTF8_SSH_SCREEN',
158 "$2 (utf8,scr)" TERM_UTF8_SSH_SCREEN($1, $2))
159
160 define(`TERM_UTF8_BOTLT_SSH_SCREEN',
161 TERM_TITLE_SSH_SCREEN_UTF8(TERM_RU_UTF8_BOTLT, $1, $2))
162
163 define(`TERM_UTF8_BOTRT_SSH_SCREEN',
164 TERM_TITLE_SSH_SCREEN_UTF8(TERM_RU_UTF8_BOTRT, $1, $2))
165
166 define(`MENU_TERM_UTF8_BOTLT_SSH_SCREEN',
167 "$2 (btlt,utf8,scr)" TERM_UTF8_BOTLT_SSH_SCREEN($1, $2))
168
169 define(`MENU_TERM_UTF8_BOTRT_SSH_SCREEN',
170 "$2 (btrt,utf8,scr)" TERM_UTF8_BOTRT_SSH_SCREEN($1, $2))
171
172 define(`TERM_KOI8_BIG_SSH',
173 TERM_KOI8 -geometry TERM_GEOM_BIG -title "$2" -n "$2" -e SSH "$1")
174
175 define(`MENU_TERM_KOI8_BIG_SSH',
176 "$2 (koi8)" TERM_KOI8_BIG_SSH($1, $2))
177
178 define(`TERM_KOI8_BIG_SSH_SCREEN',
179 TERM_KOI8 -geometry TERM_GEOM_BIG -title "$2" -n "$2" -e SSH_SCREEN_KOI8 "$1")
180
181 define(`MENU_TERM_KOI8_BIG_SSH_SCREEN',
182 "$2 (koi8,scr)" TERM_KOI8_BIG_SSH_SCREEN($1, $2))
183
184 divert
185
186 ##########################################################################
187 # PATH Setup
188 #
189 # Colon seperated unix directory paths for Modules, xpm files, and bitmaps
190 #ModulePath /usr/lib/fvwm
191 ImagePath /usr/share/icons/hicolor/32x32/apps/:/usr/share/pixmaps/fvwm:/usr/share/pixmaps:/usr/include/X11/bitmaps #:/usr/local/firefox/browser/chrome/icons/default:/usr/local/firefox/browser/icons
192
193 ############################################################################
194 # COLORS and FONTS
195 #
196 # Set the fore and back border colors for the window that has focus
197 Style * HilightFore Black, HilightBack #c06077
198
199 # Set fore/back border colors for all other windows
200 Style * Color Black/#60a0c0
201
202 # Set colors/font for pop-up menus
203 # Syntax: MenuStyle forecolor backcolor shadecolor font style(fvwm/mwm)
204 MenuStyle * FVWM, Foreground Black, Background grey, Greyed SlateGrey, Font MENU_FONT
205
206 # Set fonts to use on title bar and icon label
207 Style * Font              TITLE_FONT
208
209 ############################################################################
210 # ICON Setup
211 #
212 # If you don't want icons for some or all windows (or all of them!)
213 # Style * !Icon
214
215 # If you want ALL icons to follow you around the desktop (Sticky)
216 #Style * StickyIcon
217
218 # Auto Place Icons is a nice feature (Left Top Right Bottom)
219 #Style * IconBox 10 -75 -10 -0
220
221 Style * IconFont          ICON_FONT
222
223 ############################################################################
224 # FOCUS Setup
225 #
226 # Does the window with focus control the colormap, or the one under the mouse
227 ColormapFocus FollowsMouse
228
229 # Uncomment this to force you to click in a window to give it focus
230 #Style * ClickToFocus
231
232 # default: focus follows mouse
233 #Style * MouseFocus
234 #Style * FocusFollowsMouse
235
236 # If you knock your mouse out of the term, it keeps focus while in root window
237 Style *           SloppyFocus
238
239 ############################################################################
240 # MISC Setup
241 #
242 # click/release must occur in <n milliseconds to be a "click"
243 ClickTime 250
244
245 # if the window occupies less than n% of the screen, draw it opaque
246 OpaqueMoveSize 100
247
248 # Do not flip pages on the edge of the screen, but allow to move windows
249 EdgeScroll 0 0
250 EdgeResistance 10000
251 Style * EdgeMoveDelay 500
252 Style * EdgeMoveResistance 100
253
254 # MWM Emulation: Don't ignore hints for functions and transient decoration
255 #Style * MWMFunctions, MWMDecor, MWMButtons, MWMMenus
256 Style * MWMFunctions, MWMDecor, MWMButtons
257
258 # Changes the look of the "rubberband" you see when moving windows (0 - 255)
259 XORvalue 80
260
261 ###########################################################################
262 # PAGER Setup
263 #
264 # set the desk top size in units of physical screen size (width x height)
265 DesktopSize 2 2
266
267 ############################################################################
268 # WINDOW Placement
269 #
270 Style * PositionPlacement Center
271
272 ############################################################################
273 # STYLE Flag Setup
274 #
275 # (decorations and window options)
276 # Note: Order is important!! If compatible styles are set, styles are ORed
277 # together. If conflicting styles are set, the last one specified is used.
278
279 # change the default width, set a global icon, and give borders to popups
280 Style * BorderWidth 5, HandleWidth 5, Icon unknown1.xpm
281 Style * DecorateTransient, ClickToFocusRaisesOff
282
283 Style "Fvwm*"           !Title, Sticky, WindowListSkip
284 Style "FvwmButtons"     !Handles, BorderWidth 0, Layer 2
285 Style "FvwmPager"       Layer 2
286
287 # Terminals
288 Style "*term"           Icon term.xpm
289 Style "*rxvt"           Icon term.xpm
290 Style "term-im-local"   Icon pidgin-menu.xpm
291 Style "term-im-remote"  Icon rcalc2.xpm
292 Style "term-im-*"       IconBox 630 -75 -2 -2, IconGrid 200 80
293 Style "term-im-*"       StartsOnPage 1 1 0, StartIconic
294
295 # Browsers' windows
296 Style "Certificate Manager" PositionPlacement Center
297 Style "*Downloads"      PositionPlacement 50-50w +5
298 Style "*Mozilla*"       PositionPlacement +0 -0
299
300 Style "*Chromium*"      PositionPlacement +0 -0
301
302 # IM
303 Style "Gajim"           PositionPlacement +0 -0
304 Style "* - Gajim"       MinOverlapPercentPlacement
305 # Pidgin
306 Style "Buddy List"      PositionPlacement +0 -0
307 Style "*Pidgin*"        MinOverlapPercentPlacement
308
309 # (S)MPlayer
310 Style "*MPlayer*"       Layer 6, PositionPlacement 250p 100p
311 Style "*mpv"            Layer 6, PositionPlacement 250p 100p
312
313 Style "*clock"          !Title, Sticky, WindowListSkip, Color Black/#40c040, NeverFocus, PositionPlacement 50-50w +1p, Layer 2
314 Style "deadbeef"        PositionPlacement -0 -0
315 Style "gxmessage"       PositionPlacement 50-50w +20
316 Style "*lock"           !Title, Sticky, WindowListSkip
317 Style "Mosaic"          NoPPosition
318 Style "xbiff"           Icon mail1.xpm, !Title, Sticky, WindowListSkip
319 Style "xcalc"           Icon xcalc.xpm
320 Style "xconsole"        !Title, Sticky, WindowListSkip, NeverFocus
321 Style "xload"           !Title, Sticky, WindowListSkip, NeverFocus
322 Style "xman"            Icon xman.xpm
323 Style "xmh"             Icon mail2.xpm
324 Style "xsession"        !Title, Sticky, WindowListSkip, ClickToFocus
325 Style "XXkb"            !Title, !Borders, Sticky, WindowListSkip, Layer 5
326
327 ############################################################################
328 # BUTTON Setup
329 #
330
331 ## Buttons actually being used (duplicated below)
332 # small up triangle
333 #ButtonStyle 2 4 50x35@1 65x65@0 35x65@0 50x35@1
334 # small down triangle
335 #ButtonStyle 4 4 50x65@1 35x35@1 65x35@1 50x65@0
336 # Stylized X
337 #ButtonStyle 3 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
338
339 ## Triangles
340 #
341 # Small up Triangle
342 # ButtonStyle * 4 50x35@1 65x65@0 35x65@0 50x35@1
343 # Small down Triangle
344 #ButtonStyle * 4 50x65@1 35x35@1 65x35@1 50x65@0
345 # Large up Triangle
346 #ButtonStyle 6 4 50x25@1 75x75@0 25x75@0 50x25@1
347 # Large down Triangle
348 #ButtonStyle 8 4 50x75@1 25x25@1 75x25@1 50x75@0
349
350 ## Boxes
351 #
352 # Big Box
353 ButtonStyle 4 5 25x25@1 25x75@1 75x75@0 75x25@0 25x25@1
354 # Little Box
355 ButtonStyle 5 5 40x40@1 60x40@1 60x60@0 40x60@0 40x40@1
356 # Tall Box
357 #ButtonStyle 7 5 40x25@1 60x25@1 60x75@0 40x75@0 40x25@1
358 # Dot
359 #ButtonStyle 5 5 45x45@1 55x45@1 55x55@0 45x55@0 45x45@1
360 # Big Box with arrow (left-up to right-down) to little box (iconify)
361 #ButtonStyle 6 14 20x20@1 20x70@1 70x70@0 70x20@0 20x20@1 60x60@0 60x50@0 60x60@0 50x60@0 60x60@0 60x80@0 80x80@0 80x60@0 60x60@0
362 # Big Box with arrow (right-up to left-down) to little box (iconify)
363 ButtonStyle 6 14 70x20@0 70x70@0 20x70@1 20x20@1 70x20@1 30x60@0 30x50@0 30x60@0 40x60@0 30x60@0 30x80@0 10x80@0 10x60@0 30x60@0
364
365 ## X's
366 #
367 # Standard X
368 #ButtonStyle 3 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1
369 ButtonStyle 2 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1
370 # Funky X
371 #ButtonStyle 3 13 26x29@1 34x21@1 50x35@1 70x21@1 79x29@1 63x48@0 79x65@1 70x75@0 50x61@0 34x75@0 26x65@0 44x48@1 26x29@0
372 # Stylized X
373 #ButtonStyle 3 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
374
375 ## Lightning Bolts
376 #
377 # Small Lightning Bolt (skinny at both ends)
378 #ButtonStyle 5 7 70x15@0 30x55@1 50x55@0 40x85@1 80x45@0 60x45@1 70x15@0
379 # Big Lighting Bolt (Fat at top, comes to a point)
380 #ButtonStyle 6 8 35x15@1 20x50@1 40x50@0 30x80@1 75x40@0 50x40@1 75x15@0 35x15@1
381
382 ## Miscellaneous Buttons
383 #
384 # Nested Right Angles (looks kinda crappy)
385 #ButtonStyle 5 13 10x0@1 80x0@1 80x10@1 80x80@0 0x80@0 0x60@1 10x65@1 70x65@0 70x0@0 55x0@1 55x10@1 55x55@0 10x55@0
386 # Nested Right Angles (looks nice)
387 #ButtonStyle 6 14 0x0@1 0x20@1 20x20@0 20x0@0 0x0@1 0x25@1 25x25@1 25x0@1 55x0@1 55x55@0 0x55@0 0x60@1 60x60@1 60x0@1
388 # 4 Horizontal bars (sticky)
389 #ButtonStyle 7 12 10x23@0 90x23@0 90x28@0 10x28@1 10x47@1 90x47@0 90x52@0 10x52@1 10x70@2 90x70@0 90x76@0 10x76@1
390 ButtonStyle 3 12 10x23@0 90x23@0 90x28@0 10x28@1 10x47@1 90x47@0 90x52@0 10x52@1 10x70@2 90x70@0 90x76@0 10x76@1
391 # Expanding Windows (iconify -- looks NICE)
392 #ButtonStyle 8 16 60x40@1 60x80@0 15x80@0 15x40@1 60x40@1 40x40@1 40x25@1 75x25@1 75x60@0 60x60@0 75x60@0 75x40@0 85x40@0 85x15@0 60x15@1 60x25@1
393
394 ## Arrows Galore
395 #
396 # Up Arrow
397 #ButtonStyle 3 8 40x80@1 40x50@1 20x50@1 50x20@1 80x50@0 60x50@0 60x80@0 40x80@0
398 # Down Arrow
399 #ButtonStyle 3 8 40x20@1 40x50@1 20x50@1 50x80@1 80x50@0 60x50@0 60x20@0 40x20@1
400 # Left arrow  ( <- )
401 #ButtonStyle 7 8 80x40@1 50x40@1 50x20@1 20x50@1 50x80@0 50x60@0 80x60@0 80x40@0
402 # Right arrow ( -> )
403 #ButtonStyle 8 8 20x40@1 50x40@1 50x20@1 80x50@1 50x80@0 50x60@0 20x60@0 20x40@1
404 # Horizontal Line with arrowheads on left and right ( <-> )
405 #ButtonStyle * 12 10x50@1 35x25@1 35x40@1 65x40@1 65x25@1 90x50@1 65x75@0 65x60@0 35x60@0 35x75@0 10x50@0 10x50@1
406 # Vertical Line with arrowheads on top and bottom
407 #ButtonStyle * 12 50x10@1 25x35@1 40x35@1 40x60@1 25x60@1 50x85@1 75x60@0 60x60@0 60x35@0 75x35@0 50x10@0 50x10@1
408 # Diagonal Line with arrowheads on top and bottom ( / )
409 #ButtonStyle 5 11 80x15@1 45x15@1 55x25@1 25x55@1 15x45@1 15x80@1 50x80@0 40x70@0 70x40@0 80x50@0 80x15@0
410 # Diagonal Line with arrowheads on top and bottom ( \ )
411 #ButtonStyle 6 12 55x15@0 45x25@0 75x55@0 85x45@0 85x80@0 50x80@0 60x70@1 30x40@1 20x50@1 20x15@1 55x15@1 55x15@0
412 #
413 # the number "2"
414 #ButtonStyle 8 12 80x80@0 22x80@0 80x40@0 70x25@0 30x25@0 20x35@0 20x30@1 30x20@1 70x20@1 80x30@1 20x75@1 80x75@1
415
416 ############################################################################
417 # MOUSE Setup
418 #
419 # First, the root window. Button 1 brings up the Main Menu. B2 is the
420 # window operations list, and B3 is the winlist module
421 #     Button    Context Modifi  Function
422 Mouse 1         R       A       Menu RootMenu Nop
423 Mouse 2         R       A       Menu Window-Ops Nop
424 Mouse 3         R       A       WindowList
425
426 # Now, title bar buttons
427 # Left button is the Window-Ops2 menu
428 #     Button    Context Modifi  Function
429 Mouse 0         1       A       Menu Window-Ops2 Close
430 Mouse 0         3       A       Stick
431 Mouse 0         5       A       Center
432 # Right buttonsare iconify/maximize, rightmost is close
433 Mouse 0         2       A       Close
434 Mouse 0         4       A       Maximize toggle
435 Mouse 0         6       A       Iconify
436
437 # Button 1 in Frame or Sides is a resize-or-raise, in Icons is a move or
438 # de-iconify, and on Top does a move-or-raise
439 #     Button    Context Modifi  Function
440 Mouse 1         F       A       Resize-or-Raise
441 Mouse 1         S       A       Move-or-Raise
442 Mouse 1         I       A       Move-or-Iconify
443 #Mouse 1                T       A       Move-or-Raise
444 Mouse 1         T       A       Shadify
445
446 # Button 2 in an Icon is de-iconify, in Corners/Sides/Titlebar gets Ops Menu
447 #     Button    Context Modifi  Function
448 Mouse 2         I       A       Iconify
449 Mouse 2         FST     A       Menu Window-Ops2 Nop
450
451 # Button 3 does a raise-lower on anything
452 Mouse 3         TSIF    A       RaiseLower
453
454 ############################################################################
455 # KEYBOARD Setup
456
457 #
458 # press arrow + control + meta anywhere, and scroll by 1 page
459 Key Left        A       CM      Scroll -100 +0
460 Key Right       A       CM      Scroll +100 +0
461 Key Up          A       CM      Scroll +0   -100
462 Key Down        A       CM      Scroll +0   +100
463
464 # press arrow + meta key, and scroll by 1/10 of a page
465 Key Left        A       M       Scroll -10   +0
466 Key Right       A       M       Scroll +10   +0
467 Key Up          A       M       Scroll  +0  -10
468 Key Down        A       M       Scroll  +0  +10
469
470 # press shift arrow + control anywhere, and move the pointer by 1% of a page
471 Key Left        A       SC      CursorMove -1  +0
472 Key Right       A       SC      CursorMove +1  +0
473 Key Up          A       SC      CursorMove +0  -1
474 Key Down        A       SC      CursorMove +0  +1
475
476 # press shift arrow + meta key, and move the pointer by 1/10 of a page
477 Key Left        A       SM      CursorMove -10  +0
478 Key Right       A       SM      CursorMove +10  +0
479 Key Up          A       SM      CursorMove +0  -10
480 Key Down        A       SM      CursorMove +0  +10
481
482 # Switch window, mswindows style :)
483 Key Tab         A       M       Next [*] focus
484 Key Escape      A       M       Prev [*] focus
485
486 # Goto desktop/page
487 Key 1           A       CM      Desk 0 0
488 Key 2           A       CM      Desk 0 1
489 Key 3           A       CM      Desk 0 2
490 Key 4           A       CM      Desk 0 3
491 Key 5           A       CM      GotoPage 0 0
492 Key 6           A       CM      GotoPage 1 0
493 Key 7           A       CM      GotoPage 0 1
494 Key 8           A       CM      GotoPage 1 1
495
496 #############################################################################
497 # START-UP Functions
498 #
499 DestroyFunc InitFunction
500 AddToFunc InitFunction
501 +              I Module FvwmBacker
502 +              I Module FvwmButtons
503 +              I Module FvwmCommandS
504 +              I Module FvwmPager 0 2
505
506 DestroyFunc RestartFunction
507 AddToFunc RestartFunction
508 +              I Module FvwmBacker
509 +              I Module FvwmButtons
510 +              I Module FvwmCommandS
511 +              I Module FvwmPager 0 2
512 +              I Schedule 1000 Raise-All
513
514 DestroyFunc UrgencyFunc
515 AddToFunc UrgencyFunc
516 +                             I Iconify off
517 +                             I ThisWindow ("*Downloads|Skype") Break
518 +                             I FlipFocus
519 +                             I Raise
520 +                             I WarpToWindow 5p 5p
521
522 DestroyFunc StartStandardSession
523 AddToFunc StartStandardSession
524 +              I GotoDeskAndPage 0 0 0
525 +              I TERM_KOI8
526 +              I Wait TERM
527 +              I Exec exec cgmem_nice 200 pulseaudio --start
528 +              I PaVuControl
529 +              I Exec exec "$HOME"/current/projects/audio-cdr-video/audio/pa-mic-off
530 +              I XsetbgFilename
531 +              I Wait gxmessage
532 +              I GotoDeskAndPage 2 0 1
533 +              I TERM_KOI8 -geometry TERM_GEOM_BIG
534 +              I Wait TERM
535 +              I FireFox
536 +              I GotoDeskAndPage 0 1 1
537
538 DestroyFunc ResumeFunction
539 AddToFunc ResumeFunction
540 +              I GotoDeskAndPage 0 0 0
541 +              I TERM_KOI8
542 +              I Wait TERM
543 +              I Exec exec cgmem_nice 200 pulseaudio --start
544 +              I None ("Volume Control") PaVuControl
545 +              I Exec sleep 10; exec "$HOME"/current/projects/audio-cdr-video/audio/pa-mic-off
546 +              I XsetbgFilename
547 +              I Wait gxmessage
548 +              I Any ("*Mozilla Firefox") GotoDeskAndPage 0 1 1
549 +              I TestRc (Match) Break
550 +              I None ("*Mozilla Firefox") FireFox
551
552 ############################################################################
553 # COMPLEX FUNCTIONS
554 #
555 DestroyFunc Center
556 AddToFunc Center                I Move 50-50w 50-50w
557 +                               I WarpToWindow 74p 18p
558
559 DestroyFunc Iconify-and-Raise
560 AddToFunc Iconify-and-Raise     I Iconify
561 +                               I Raise
562
563 DestroyFunc Maximize-Func
564 AddToFunc Maximize-Func         C Maximize     toggle
565 +                               D Maximize     100 100
566
567 DestroyFunc Move-or-Iconify
568 AddToFunc Move-or-Iconify       I Raise
569 +                               M Move
570 +                               D Iconify
571
572 DestroyFunc Move-or-Raise
573 AddToFunc Move-or-Raise         I Raise
574 +                               M Move
575 +                               D Lower
576
577 DestroyFunc Move-or-Raise2
578 AddToFunc Move-or-Raise2        M Raise
579 +                               M Move
580 +                               D Lower
581
582 DestroyFunc Resize-or-Raise
583 AddToFunc Resize-or-Raise       I Raise
584 +                               M Resize
585 +                               D Lower
586
587 DestroyFunc Resize-or-Raise2
588 AddToFunc Resize-or-Raise2      M Raise
589 +                               M Resize
590 +                               D Lower
591
592 DestroyFunc Shadify
593 AddToFunc Shadify               D WindowShade
594 +                               M Move
595 +                               C RaiseLower
596
597 DestroyFunc warp-or-run
598 AddToFunc warp-or-run           I Next [$0 CirculateHit] Iconify -1
599 +                               I Next [$0 CirculateHit] Focus
600 +                               I None [$0] $1
601
602 DestroyFunc MailFunction
603 AddToFunc MailFunction          I Next [$0] Iconify -1
604 +                               I Next [$0] focus
605 +                               I None [$0] Exec exec $0 $1
606
607 DestroyFunc PrintFunction
608 AddToFunc PrintFunction         I Raise
609 +                               I Exec exec xdpr -id $w
610
611 DestroyFunc Raise-All
612 AddToFunc Raise-All           I All Raise
613
614 ##############################################################################
615 # User-defined functions
616 #
617
618 DestroyFunc PaVuControl
619 AddToFunc PaVuControl         I GotoDeskAndPage 0 1 1
620 +                             I Exec exec pulseaudio --kill
621 +                             I Exec exec cgmem_nice 200 pulseaudio --start
622 +                             I Exec exec cgmem_nice 200 pavucontrol
623 +                             I Wait "Volume Control"
624
625 changequote([,])
626 DestroyFunc Id3Info
627 AddToFunc Id3Info             I Exec "$HOME"/lib/audio/mp3/id3info.py "`audtool --current-song-filename`" | text-wrap.py | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
628 changequote([`], ['])
629
630 DestroyFunc AudioPlayer
631 AddToFunc AudioPlayer         I GotoDeskAndPage 0 1 1
632 +                             I Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 400 deadbeef
633
634 DestroyFunc Term-Iskra
635 AddToFunc Term-Iskra          I GotoDeskAndPage 1 1 2
636 +                             I TERM_KOI8_SSH_SCREEN(iskra-aviel.phdru.name, iskra)
637
638 DestroyFunc Term-Iskra-Big
639 AddToFunc Term-Iskra-Big      I GotoDeskAndPage 1 1 2
640 +                             I TERM_KOI8_BIG_SSH(iskra-aviel.phdru.name, ISKRA)
641
642 DestroyFunc Term-Oper
643 AddToFunc Term-Oper           I GotoDeskAndPage 1 1 2
644 +                             I TERM_KOI8_BOTRT_SSH_SCREEN(oper.med.ru, oper)
645
646 DestroyFunc Term-Oper-Big
647 AddToFunc Term-Oper-Big       I GotoDeskAndPage 1 1 2
648 +                             I TERM_KOI8_BIG_SSH(oper.med.ru, OPER)
649
650 DestroyFunc Term-Phdru
651 AddToFunc Term-Phdru          I GotoDeskAndPage 1 0 1
652 +                             I TERM_KOI8_SSH_SCREEN(phdru.name, phdru.name)
653
654 DestroyFunc Term-Phdru-Big
655 AddToFunc Term-Phdru-Big      I GotoDeskAndPage 1 0 1
656 +                             I TERM_KOI8_BIG_SSH(phdru.name, phdru.name)
657
658 DestroyFunc Term3Hosts
659 AddToFunc Term3Hosts          I Term-Iskra
660 +                             I Wait TERM
661 +                             I Term-Oper
662 +                             I Wait TERM
663 +                             I GotoDeskAndPage 1 0 1
664 +                             I TERM_KOI8_SSH_SCREEN(-D 1080 phdru.name, phdru.name)
665 +                             I Wait TERM
666 +                             I GotoDeskAndPage 1 1 2
667
668 DestroyFunc FireFox
669 AddToFunc FireFox             I Any ("*Mozilla Firefox") Break
670 +                             I GotoDeskAndPage 1 0 0
671 +                             I Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 4000 start-browser firefox -P phd
672 +                             I Wait "*Mozilla Firefox"
673 +                             I Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 4000 firefox --new-window
674 +                             I Wait "*Mozilla Firefox"
675 +                             I Next ("*Mozilla Firefox") Iconify true
676
677 DestroyFunc Gajim
678 AddToFunc Gajim               I GotoDeskAndPage 1 1 0
679 +                             I Exec exec cgmem_nice 300 gajim
680
681 DestroyFunc Pidgin
682 AddToFunc Pidgin              I GotoDeskAndPage 1 1 0
683 +                             I Exec exec cgmem_nice 300 pidgin
684
685 DestroyFunc Skype
686 AddToFunc Skype               I GotoDeskAndPage 0 0 1
687 +                             I Exec BROWSER=firefox exec cgmem_nice 1000 skypeforlinux
688
689 DestroyFunc XFilename
690 AddToFunc XSetbgFilename      I Exec "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
691
692 ##############################################################################
693 # MENU Setup
694 #
695
696 # This defines the most common window operations
697 AddToMenu Window-Ops    "Window Ops"    Title
698 +                       "Center"        Center
699 +                       "Move"          Move-or-Raise2
700 +                       "Resize"        Resize-or-Raise2
701 +                       "Raise"         Raise
702 +                       "Lower"         Lower
703 +                       "(De)Iconify"   Iconify
704 +                       "(Un)Stick"     Stick
705 +                       "(Un)Maximize"  maximize_func
706 +                       ""              Nop
707 +                       "Delete"        Delete
708 +                       "Close"         Close
709 +                       "Destroy"       Destroy
710 +                       ""              Nop
711 +                       "Refresh Screen" Refresh
712
713 # A trimmed down version of "Window Ops", good for binding to decorations
714 DestroyMenu Window-Ops2
715 AddToMenu Window-Ops2   "Center"        Center
716 +                       "Move"          Move-or-Raise
717 +                       "Iconify"       Iconify
718 +                       "(Un)Stick"     Stick
719 +                       "Refresh"       RefreshWindow
720 +                       ""              Nop
721 +                       "Close"         Close
722 +                       "Delete"        Delete
723 +                       "Destroy"       Destroy
724 +                       ""              Nop
725 +                       "Resize"        Resize-or-Raise
726 +                       "Shade"         WindowShade
727 +                       "Raise/Lower"   RaiseLower
728 +                       ""              Nop
729 +                       "ScrollBar"     Module FvwmScroll 2 2
730 +                       "Print"         PrintFunction
731
732 AddToMenu Terminals     "Terminals" Title
733 +               "Grey term (koi8)" TERM_KOI8
734 +               "Grey term (utf8)" TERM_RU_UTF8
735 +               "Grey term (heb-utf8)" TERM_HEB_UTF8
736 +               "Grey term (btlt,koi8)" TERM_KOI8_BOTLT
737 +               "Grey term (btrt,koi8)" TERM_KOI8_BOTRT
738 +               "Grey term (btlt,utf8)" TERM_RU_UTF8_BOTLT
739 +               "Grey term (btrt,utf8)" TERM_RU_UTF8_BOTRT
740 +               "Big grey term (koi8)" TERM_KOI8 -geometry TERM_GEOM_BIG
741 +               "Big grey term (utf8)" TERM_RU_UTF8 -geometry TERM_GEOM_BIG
742 +                       ""      Nop
743 +               "White/black term (koi8)" TERM_KOI8 -fg white -cr white -bg black
744 +               "White/black term (utf8)" TERM_RU_UTF8 -fg white -bg black
745
746 AddToMenu TermColors    "Term Colors" Title
747 +                       "Term: black/mediumturquoise" TERM_KOI8 -fg black -cr black -bg mediumturquoise
748 +                       "Term: black/lightseagreen" TERM_KOI8 -fg black -cr black -bg lightseagreen
749 +                       ""      Nop
750 +                       "Term: black/lightsteelblue" TERM_KOI8 -fg black -cr black -bg lightsteelblue
751 +                       "Term: black/lightblue3" TERM_KOI8 -fg black -cr black -bg lightblue3
752 +                       ""      Nop
753 +                       "Term: black/lightgoldenrod" TERM_KOI8 -fg black -cr black -bg lightgoldenrod
754 +                       "Term: black/rosybrown1" TERM_KOI8 -fg black -cr black -bg rosybrown1
755 +                       "Term: black/pink1" TERM_KOI8 -fg black -cr black -bg pink1
756 +                       ""      Nop
757 +                       "Term: white/orchid4" TERM_KOI8 -fg white -cr white -bg orchid4
758 +                       "Term: white/purple3" TERM_KOI8 -fg white -cr white -bg purple3
759 +                       "Term: white/purple4" TERM_KOI8 -fg white -cr white -bg purple4
760 +                       ""      Nop
761 +                       "Term: white/lightslategrey" TERM_KOI8 -fg white -cr white -bg lightslategrey
762 +                       "Term: white/navyblue" TERM_KOI8 -fg white -cr white -bg navyblue
763 +                       "Term: white/mediumblue" TERM_KOI8 -fg white -cr white -bg mediumblue
764 +                       "Term: white/steelblue" TERM_KOI8 -fg white -cr white -bg steelblue
765 +                       ""      Nop
766 +                       "Term: white/forestgreen" TERM_KOI8 -fg white -cr white -bg forestgreen
767 +                       "Term: white/rosybrown" TERM_KOI8 -fg white -cr white -bg rosybrown
768 +                       "Term: white/deeppink" TERM_KOI8 -fg white -cr white -bg deeppink
769 +                       "Term: white/black" TERM_KOI8 -fg white -cr white -bg black
770
771 AddToMenu Systems       "Systems" Title
772 +                       "Iskra+Oper+Phdru" Term3Hosts
773 +                       ""        Nop
774 +                       MENU_TERM_KOI8_SSH_SCREEN(iskra-aviel.phdru.name, iskra)
775 +                       MENU_TERM_UTF8_BOTLT_SSH(iskra-aviel.phdru.name, iskra)
776 +                       MENU_TERM_KOI8_BIG_SSH(iskra-aviel.phdru.name, ISKRA)
777 +                       ""        Nop
778 +                       MENU_TERM_KOI8_BOTRT_SSH_SCREEN(oper.med.ru, oper)
779 +                       MENU_TERM_UTF8_BOTRT_SSH(oper.med.ru, oper)
780 +                       MENU_TERM_KOI8_BIG_SSH(oper.med.ru, OPER)
781 +                       ""        Nop
782 +                       MENU_TERM_KOI8_SSH_SCREEN(phdru.name, phdru)
783 +                       MENU_TERM_KOI8_SSH_SCREEN(-D 1080 phdru.name, phdru SOCKS5)
784 +                       MENU_TERM_UTF8_BOTLT_SSH(phdru.name, phdru)
785 +                       MENU_TERM_KOI8_BIG_SSH(phdru.name, PHDRU)
786
787 AddToMenu FvwmCommands  "Fvwm Commands" Title
788 +                       "Restart" Restart
789 +                       "Raise all" Raise-All
790 #+                       "Restart Fvwm2" Restart fvwm2
791 #+                       "Start Fvwm"    Restart fvwm
792 +                       "Fvwm Setup"    Popup FvwmSetup
793 +                       "Fvwm Modules"  Popup FvwmModules
794 +                       "" Nop
795 +                       "Exit Fvwm"     Quit
796
797 AddToMenu FvwmSetup     "Fvwm Setup" Title
798 +                       "Start standard session" StartStandardSession
799 +                       "Change Scrolling"      Popup FvwmScroll
800
801 AddToMenu FvwmScroll    "Change Scroll Behavior" Title
802 +                       "OFF"   EdgeScroll 0 0
803 +                       "ON"    EdgeScroll 100 100
804 +                       "Horizontal Only"       EdgeScroll 100 0
805 +                       "Vertical Only"         EdgeScroll 0 100
806 +                       "Partial"               EdgeScroll 50 50
807
808 AddToMenu FvwmModules   "Fvwm Modules" Title
809 +                       "Animate"      Module FvwmAnimate
810 +                       "Auto"         Module FvwmAuto
811 +                       "Backer"       Module FvwmBacker
812 +                       "Banner"       Module FvwmBanner
813 +                       "Buttons"      Module FvwmButtons
814 +                       "Cascade"      Module FvwmCascade
815 +                       "CommandS"     Module FvwmCommandS
816 +                       "Console"      Module FvwmConsole
817 +                       "ConsoleC"     Module FvwmConsoleC -e FvwmConsoleC.pl
818 +                       "Cpp"          Module FvwmCpp
819 +                       "Debug"        Module FvwmDebug
820 +                       "DragWell"     Module FvwmDragWell
821 +                       "Event"        Module FvwmEvent
822 +                       "Form"         Module FvwmForm
823 +                       "Gtk"          Module FvwmGtk
824 +                       "IconBox"      Module FvwmIconBox
825 +                       "IconMan"      Module FvwmIconMan
826 +                       "Ident"        Module FvwmIdent
827 +                       "M4"           Module FvwmM4
828 +                       "Pager"        Module FvwmPager 0 2
829 +                       "Rearrange"    Module FvwmRearrange
830 +                       "Save"         Module FvwmSave
831 +                       "SaveDesk"     Module FvwmSaveDesk
832 +                       "Script"       Module FvwmScript
833 +                       "Scroll"       Module FvwmScroll
834 +                       "TaskBar"      Module FvwmTaskBar
835 +                       "Theme"        Module FvwmTheme
836 +                       "Tile"         Module FvwmTile
837 +                       "Wharf"        Module FvwmWharf
838 +                       "WinList"      Module FvwmWinList
839
840 # This is the root menu
841 AddToMenu RootMenu "Root Menu"  Title
842 +               "Terminals"     Popup Terminals
843 #+               "Color term"    Popup TermColors
844 +               "Systems"       Popup Systems
845 +               ""              Nop
846 +               "Browsers"      Popup Browsers
847 +               "Utilities"     Popup Utilities
848 #+               ""              Nop
849 #+               "Lock Screen"   Popup XlockMenu
850 +               "XScreenSaver"  Popup XScreenSaverMenu
851 #+               "Tv-tuner"      Popup Tv-tuner
852 +               ""              Nop
853 +               "XSetBg"        Popup XSetBgMenu
854 +               "Fvwm Commands" Popup FvwmCommands
855
856 DestroyMenu OSMenu
857 AddToMenu OSMenu        "OS commands:" Title
858 +                       "Suspend to both" Exec exec s2b
859 +                       "Suspend to disk" Exec exec s2d
860 +                       "Suspend to ram"  Exec exec s2r
861
862 # This menu will fire up some often used programs
863 DestroyMenu Utilities
864 AddToMenu Utilities     "Choose one:" Title
865 +                       "OS"     Popup OSMenu
866 +                       ""       Nop
867 +                       "GVim (koi8)" Exec LC_CTYPE=ru_RU.KOI8-R exec gvim
868 +                       "GVim (utf8)" Exec LC_CTYPE=ru_RU.UTF-8  exec gvim
869 +                       ""       Nop
870 +                       "Refresh Screen" Refresh
871 +                       "xrefresh" Exec exec xrefresh
872 +                       ""       Nop
873 +                       "Skype" Skype
874 +                       "pavucontrol" PaVuControl
875
876 DestroyMenu  Browsers
877 AddToMenu Browsers      "Choose one:" Title
878 +                       "FireFox" FireFox
879 +                       "Chromium" None ("*Chromium") Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 2000 start-browser chromium
880 +                       "Opera" None ("*Opera") Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 2000 start-browser opera
881
882 # A wide variety of screenlocking options...
883 #AddToMenu XlockMenu     "Choose one:" Title
884 #+                       "Hop" Exec exec xlock -mode hop
885 #+                       "Image" Exec exec xlock -mode image
886 #+                       "Life" Exec exec xlock -mode life
887 #+                       "Flame" Exec exec xlock -mode flame
888 #+                       "Pyro" Exec exec xlock -mode pyro
889 #+                       "Qix" Exec exec xlock -mode qix
890 #+                       "Rotor" Exec exec xlock -mode rotor
891 #+                       "Swarm" Exec exec xlock -mode swarm
892 #+                       "" Nop
893 #+                       "Random" Exec exec xlock -mode random
894 #+                       "Blank" Exec exec xlock -mode blank
895
896 AddToMenu XScreenSaverMenu     "Choose mode:" Title
897 +                       "Blank Screen Now" Exec exec xscreensaver-command -activate
898 +                       "Lock Screen Now"  Exec exec xscreensaver-command -lock
899 +                       "Screen Saver Demo" Exec exec xscreensaver-command -demo
900 +                       "Screen Saver Preferences"  Exec exec xscreensaver-command -prefs
901 +                       "Reinitialize Screen Saver" Exec exec xscreensaver-command -restart
902 +                       "" Nop
903 +                       "Kill Screen Saver"         Exec exec xscreensaver-command -exit
904 +                       "Launch Screen Saver"       Exec exec xscreensaver
905
906 AddToMenu XSetBgMenu    "XSetBg" Title
907 +                       "Change wallpaper" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-force
908 +                       "Start" Exec exec cgmem_nice 100 "$HOME"/current/projects/xsetbg/xsetbg-http-start
909 +                       "Stop" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-stop
910 +                       "Restart" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-restart
911 +                       ""       Nop
912 changequote([,])
913 +                       "Xli" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn"
914 +                       "Xli (scaled)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn"
915 +                       "Open in browser" Exec exec webbrowserX -n "`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r`"
916 +                       "Filename" Exec exec "$HOME"/current/projects/xsetbg/print-filename.py -e koi8-r
917 +                       "XFilename" Exec "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
918 +                       "XFilename (wrapped)" XSetbgFilename
919 +                       ""       Nop
920 +                       "Xli (prev.)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r 1`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn"
921 +                       "Xli (prev., scaled)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r 1`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn"
922 +                       "Open in browser (prev.)" Exec exec webbrowserX -n "`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r 1`"
923 changequote([`], ['])
924 +                       "Filename (prev.)" Exec exec "$HOME"/current/projects/xsetbg/print-filename.py -e koi8-r 1
925 +                       "XFilename (prev.)" Exec "$HOME"/current/projects/xsetbg/print-filename.py 1 | text-wrap.py | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
926 +                       "XFilename (prev., wrapped)" Exec "$HOME"/current/projects/xsetbg/print-filename.py 1 | text-wrap.py -w TEXT_WIDTH -s | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
927
928 ############################################################################
929 # FvwmBacker
930 #
931 #*FvwmBacker: Command (Desk 0, Page * *) -solid DarkCyan
932 #*FvwmBacker: Command (Desk 1, Page * *) -solid steelblue
933 #*FvwmBacker: Command (Desk 2, Page * *) -solid midnightblue
934 *FvwmBacker: Command (Desk *, Page * *) Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-change
935
936 ############################################################################
937 # FvwmButtons
938 #
939 # Colors
940 *FvwmButtons: Fore Black
941 *FvwmButtons: Back rgb:90/80/90
942
943 # Font
944 *FvwmButtons: Font BUTTONS_FONT
945
946 # Geometry-- really likes to pick its own size, but giving a position is OK
947 *FvwmButtons: Geometry -1+1
948
949 # Layout: specify rows or columns, not both
950 *FvwmButtons: Rows 2 #, Columns 5
951
952 # Transparent background
953 #*FvwmButtons: Pixmap none
954 # Background
955 #*FvwmButtons: Pixmap fvwm.xpm
956
957 # Define the buttons to use.....
958 #*FvwmButtons: Move              arrows2.xpm     Move
959 #*FvwmButtons: Kill              skull.xpm       Destroy
960 #*FvwmButtons: Quit              nuke.xpm        Popup "Quit-Verify"
961
962 #*FvwmButtons: (Swallow XClock 'Exec exec xclock -update 1 -geometry -3000-3000')
963
964 # Buttons
965 pushdef(`TERM_KOI8', `Exec "TERM" LC_CTYPE=ru_RU.KOI8-R exec TERM')
966 pushdef(`TERM_RU_UTF8', `Exec "URxvt" LC_CTYPE=ru_RU.UTF-8 exec TERM -name URxvt')
967 *FvwmButtons: (Title Term,     Icon rterm2.xpm,      Action TERM_KOI8)
968 *FvwmButtons: (Title UTF-8,    Icon rterm2.xpm,      Action TERM_RU_UTF8)
969 *FvwmButtons: (Title "phdru (koi8,scr)",    Icon xterm-sgi.xpm,   Action TERM_KOI8_SSH_SCREEN(phdru.name, phdru.name))
970 *FvwmButtons: (Title "iskra (koi8,scr)",    Icon xterm-sgi.xpm,   Action TERM_KOI8_SSH_SCREEN(iskra-aviel.phdru.name, iskra))
971 *FvwmButtons: (Title "oper (koi8,scr)",     Icon xterm-linux.xpm, Action TERM_KOI8_BOTRT_SSH_SCREEN(oper.med.ru, oper))
972 popdef(`TERM_KOI8', `TERM_RU_UTF8')
973
974 *FvwmButtons: (Title Wallpaper, Icon find1.xpm,        Action Exec "gxmessage" "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -)
975 *FvwmButtons: (Title "-1",      Icon find1.xpm,        Action Exec "gxmessage" "$HOME"/current/projects/xsetbg/print-filename.py 1 | text-wrap.py -w TEXT_WIDTH -s | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -)
976 *FvwmButtons: (Title Next,      Icon Jrecycle.xpm,     Action Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-force)
977 #*FvwmButtons: (Title pavucontrol, Icon mini.sound.xpm, Action Exec "Volume Control" exec cgmem_nice 200 pavucontrol)
978 #*FvwmButtons: (Title Id3Info,  Icon bell.xpm,         Action Id3Info)
979 *FvwmButtons: (Title AudioPlayer,  Icon bell.xpm,      Action Exec "deadbeef" LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 400 deadbeef)
980 #*FvwmButtons: (Title XLock,     Icon Jxlock.xpm,      Action Exec exec xscreensaver-command -lock)
981 *FvwmButtons: (Title Skype,    Icon skypeforlinux.png, Action Skype)
982
983 ############################################################################
984 # FvwmForm
985 #
986 # FvwmForm alias - rlogin to host via term
987 #FvwmForm Rlogin
988 #*Rlogin: WarpPointer
989 #*Rlogin: Font         *helvetica*m*r*n*14*
990 #*Rlogin: ButtonFont   *helvetica*m*o*n*14*
991 #*Rlogin: InputFont    *cour*m*r*n*14*
992 #*Rlogin: Fore         Black
993 #*Rlogin: Back         Light Gray
994 #*Rlogin: ItemFore          Wheat
995 #*Rlogin: ItemBack          Gray50
996 ## begin items
997 #*Rlogin: Line         center
998 #*Rlogin: Text         "Login to Remote Host"
999 #*Rlogin: Line         center
1000 #*Rlogin: Text         "Host:"
1001 #*Rlogin: Input        HostName  20   ""
1002 #*Rlogin: Line         center
1003 #*Rlogin: Selection    UserSel   single
1004 #*Rlogin: Choice       Default   Default   on   "same user"
1005 #*Rlogin: Choice       Custom    Custom    off  "user:"
1006 #*Rlogin: Input        UserName  10   ""
1007 #*Rlogin: Line         expand
1008 #*Rlogin: Button       quit "Login" ^M
1009 #*Rlogin: Command      TERM_KOI8 -T term@$(HostName) -e rlogin $(HostName) $(Custom?-l $(UserName))
1010 #*Rlogin: Button       restart   "Clear"
1011 #*Rlogin: Command Beep
1012 #*Rlogin: Button       quit "Cancel"
1013 #*Rlogin: Command Nop
1014 ##
1015 ## FvwmForm alias - query exit ala mwm
1016 #FvwmForm QuitVerify
1017 #*QuitVerify: GrabServer
1018 #*QuitVerify: WarpPointer
1019 #*QuitVerify: Font          *helvetica*m*r*n*14*
1020 ##*QuitVerify: ButtonFont    *helvetica*m*o*n*14*
1021 #*QuitVerify: ButtonFont    7x13bold
1022 #*QuitVerify: Fore          Black
1023 #*QuitVerify: Back          Light Gray
1024 #*QuitVerify: ItemFore Wheat
1025 #*QuitVerify: ItemBack Gray50
1026 ## begin items
1027 #*QuitVerify: Line          center
1028 #*QuitVerify: Text          "Do you really want to exit FVWM?"
1029 #*QuitVerify: Line          expand
1030 #*QuitVerify: Button   quit      " Exit "
1031 #*QuitVerify: Command  Quit
1032 #*QuitVerify: Button   quit      "Cancel"
1033 #*QuitVerify: Command  Nop
1034 #
1035 ##
1036 ## MyTalk & MyFvwmTalk from Dave Goldberg
1037 ## MyTalk Form - dissappears after use
1038 #FvwmForm MyTalk
1039 #*MyTalk: WarpPointer
1040 #*MyTalk: Font *helvetica*m*r*n*14*
1041 #*MyTalk: ButtonFont *helvetica*m*o*n*14*
1042 #*MyTalk: InputFont *cour*m*r*n*14*
1043 #*MyTalk: Fore Red
1044 #*MyTalk: Back Gray
1045 #*MyTalk: ItemFore Blue
1046 #*MyTalk: ItemBack Gray
1047 #*MyTalk: Line center
1048 #*MyTalk: Text "Fvwm Function"
1049 #*MyTalk: Input Func 40 ""
1050 #*MyTalk: Line expand
1051 #*MyTalk: Button quit "Run" ^M
1052 #*MyTalk: Command $(Func)
1053 #*MyTalk: Button restart "Clear" ^R
1054 #*MyTalk: Button quit "Cancel" ^C
1055 #*MyTalk: Command Nop
1056 ##
1057 ## MyFvwmTalk Form - sticks around
1058 #FvwmForm MyFvwmTalk
1059 #*MyFvwmTalk: WarpPointer
1060 #*MyFvwmTalk: Font *helvetica*m*r*n*14*
1061 #*MyFvwmTalk: ButtonFont *helvetica*m*o*n*14*
1062 #*MyFvwmTalk: InputFont *cour*m*r*n*14*
1063 #*MyFvwmTalk: Fore Red
1064 #*MyFvwmTalk: Back Gray
1065 #*MyFvwmTalk: ItemFore Blue
1066 #*MyFvwmTalk: ItemBack Gray
1067 #*MyFvwmTalk: Line center
1068 #*MyFvwmTalk: Text "Fvwm Function"
1069 #*MyFvwmTalk: Input Func 40 ""
1070 #*MyFvwmTalk: Line expand
1071 #*MyFvwmTalk: Button restart "Run" ^M
1072 #*MyFvwmTalk: Command $(Func)
1073 #*MyFvwmTalk: Button restart "Clear" ^R
1074 #*MyFvwmTalk: Command Nop
1075 #*MyFvwmTalk: Button restart "Iconify" ^Z
1076 #*MyFvwmTalk: Command Next [MyFvwmTalk] Iconify
1077 #*MyFvwmTalk: Button quit "Quit" ^C
1078 #*MyFvwmTalk: Command Nop
1079
1080 ############################################################################
1081 # FvwmIconBox
1082 #
1083 # NOTE: Icons will only be shown in module if "Style * !Icon" is set
1084 *FvwmIconBox: IconBack    #cfcfcf
1085 *FvwmIconBox: IconHiFore  black
1086 *FvwmIconBox: IconHiBack  LightSkyBlue
1087 *FvwmIconBox: Back        #5f9ea0
1088 #*FvwmIconBox: Fore       blue
1089 *FvwmIconBox: Geometry    5x1+0+0
1090 *FvwmIconBox: MaxIconSize 64x38
1091 *FvwmIconBox: Font        ICON_BOX_FONT
1092 *FvwmIconBox: SortIcons   IconName
1093 *FvwmIconBox: Padding     4
1094 *FvwmIconBox: Lines       10
1095 *FvwmIconBox: SBWidth     11
1096 *FvwmIconBox: Placement   Left Top
1097 *FvwmIconBox: Pixmap      fvwm.xpm
1098 #*FvwmIconBox: HideSC Horizontal
1099 *FvwmIconBox: SetWMIconSize
1100 *FvwmIconBox: HilightFocusWin
1101 #*FvwmIconBox: Resolution          Desk
1102 *FvwmIconBox: Mouse       1       Click           RaiseLower
1103 *FvwmIconBox: Mouse       1       DoubleClick     Iconify
1104 *FvwmIconBox: Mouse       2       Click           Iconify -1, Focus
1105 *FvwmIconBox: Mouse       3       Click           Module FvwmIdent
1106 *FvwmIconBox: Key         r       RaiseLower
1107 *FvwmIconBox: Key         space   Iconify
1108 *FvwmIconBox: Key         d       Close
1109 *FvwmIconBox: Key         n       Next
1110 *FvwmIconBox: Key         p       Prev
1111 *FvwmIconBox: Key         h       Left
1112 *FvwmIconBox: Key         j       Down
1113 *FvwmIconBox: Key         k       Up
1114 *FvwmIconBox: Key         l       Right
1115
1116 ############################################################################
1117 # FvwmIdent
1118 #
1119 # Give us colors and a fonts
1120 *FvwmIdent: Back MidnightBlue
1121 *FvwmIdent: Fore Yellow
1122 *FvwmIdent: Font IDENT_FONT
1123
1124 ############################################################################
1125 # FvwmPager
1126 #
1127 *FvwmPager: Back #908090
1128 *FvwmPager: Fore #484048
1129 *FvwmPager: Font TITLE_FONT
1130 *FvwmPager: Hilight #cab3ca
1131 *FvwmPager: Geometry PAGER_GEOM
1132 *FvwmPager: Label 0 System
1133 *FvwmPager: Label 1 Net
1134 *FvwmPager: Label 2 Work
1135 *FvwmPager: SmallFont SMALL_PAGER_FONT
1136
1137 *FvwmPager: Balloons All
1138 *FvwmPager: BalloonBack #efe3b5
1139 *FvwmPager: BalloonFore Black
1140 *FvwmPager: BalloonFont ICON_FONT
1141 *FvwmPager: BalloonYOffset +2
1142 *FvwmPager: BalloonBorderWidth 1
1143 *FvwmPager: BalloonBorderColor Black
1144
1145 ############################################################################
1146 # FvwmScroll
1147 #
1148 *FvwmScroll: Back grey40
1149 *FvwmScroll: Fore green
1150
1151 ############################################################################
1152 # FvwmWinList
1153 #
1154 *FvwmWinList: Back #908090
1155 *FvwmWinList: Fore Black
1156 *FvwmWinList: Font WIN_LIST_FONT
1157 *FvwmWinList: Action Click1 Iconify -1, Focus
1158 *FvwmWinList: Action Click2 Iconify
1159 *FvwmWinList: Action Click3 Module "FvwmIdent: " FvwmIdent
1160 *FvwmWinList: UseSkipList
1161 *FvwmWinList: Geometry +10-10