chiark / gitweb /
a9f31ecc13803b21a9fb390d399c383fa7f1cf01
[ian-dotfiles.git] / templates / vtwmrc.in
1 #!/bin/bash
2 set -e
3 . infra/template
4
5 cat <<END
6 #
7 # Ian's twm configuration file.
8 #
9
10 # RandomPlacement
11 DecorateTransients
12 TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
13 ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
14 MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
15 IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
16 IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
17 IconifyByUnmapping
18 NoCaseSensitive
19 IconManagerGeometry "119x286+0+0"
20 NoDefaults
21 DontMoveOff
22 OpaqueMove
23 Zoom
24 NoRaiseOnMove
25 NoRaiseOnResize
26 SortIconManager
27 SqueezeTitle
28 RestartPreviousState
29 WarpCursor
30 Function "select" { f.iconify f.deiconify }
31 WindowFunction f.function "select"
32 WindowRing { "emacs" "emacs18" "XTerm" }
33 OldFashionedTwmWindowsMenu
34 NoStackMode { "emacs" "Iceweasel" }
35
36 VirtualDesktop "$vtwmvdesktop" 48
37
38 #VirtualDesktop "6432x3608-208-0" 48
39 #VirtualDesktop "6400x3600-208-0" 48
40 # +32,+8
41
42 #VirtualDesktop "5136x3076-208-0" 48
43 #VirtualDesktop "5120x3072-237-0" 48
44 # +16,+4
45
46 #VirtualDesktop "4x3-208-0" 48
47
48 NotVirtualGeometries
49 PanDistanceX 100
50 PanDistanceY 100
51
52 FixManagedVirtualGeometries
53 FixTransientVirtualGeometries
54 SnapRealScreen
55
56 NoTitle {
57         "TWM Icon Manager"
58         "VTWM Desktop"
59         "xclock"
60         "panel"
61         "xload"
62         "xacpi-simple"
63 }
64
65 DontSqueezeTitle {
66         "emacs"
67         "emacs18"
68         "epoch"
69         "Emacs"
70 }
71
72 DontShowInDisplay { 
73         "VTWM Desktop"
74         "xb ian"
75         "xb sysadmin"
76         "xb chiark"
77         "xb iwj"
78         "xclock"
79         "xload"
80         "XLoad"
81         "panel"
82         "xacpi-simple"
83 }
84
85 NailedDown {
86         "VTWM Desktop"
87         "xb ian"
88         "xb sysadmin"
89         "xb chiark"
90         "xb iwj"
91         "xclock"
92         "xwrits"
93         "xload"
94         "XLoad"
95         "panel"
96         "xacpi-simple"
97 }
98
99 Cursors
100 {
101         Frame           "crosshair"
102         Title           "crosshair"
103         Icon            "crosshair"
104         IconMgr         "crosshair"
105         Move            "fleur"
106         Resize          "fleur"
107         Menu            "sb_left_arrow"
108         Button          "hand2"
109         Wait            "watch"
110         Select          "dot"
111         Destroy         "pirate"
112 }
113
114 Color
115 {
116     BorderColor "yellow"
117     DefaultBackground "black"
118     DefaultForeground "white"
119     TitleBackground "midnight blue"
120     TitleForeground "light steel blue"
121     MenuBackground "midnight blue"
122     MenuForeground "light steel blue"
123     MenuTitleBackground "midnight blue"
124     MenuTitleForeground "light steel blue"
125     IconBackground "midnight blue"
126     IconForeground "light steel blue"
127     IconBorderColor "red"
128     IconManagerBackground "orange1"
129     IconManagerForeground "black"
130     BorderTileForeground "red"
131     BorderTileBackground "red"
132
133     VirtualBackground "midnight blue"
134     DesktopDisplayBackground "black"
135     DesktopDisplayBorder "light steel blue"
136     RealScreenBackground "white"
137 }
138
139 Monochrome
140 {
141     BorderColor "black"
142     DefaultBackground "black"
143     DefaultForeground "white"
144     TitleBackground "white"
145     TitleForeground "black"
146     MenuBackground "black"
147     MenuForeground "white"
148     MenuTitleBackground "black"
149     MenuTitleForeground "white"
150     IconBackground "black"
151     IconForeground "white"
152     IconBorderColor "white"
153     IconManagerBackground "white"
154     IconManagerForeground "black"
155     BorderTileForeground "black"
156     BorderTileBackground "white"
157 }
158
159 # Define some useful functions for motion-based actions.
160 MoveDelta 3
161 Function "forcemove-or-lower" { f.forcemove f.deltastop f.lower }
162 Function "move-or-raise" { f.move f.deltastop f.raise }
163
164 # Root window buttons
165 Button1 =       : root          : f.menu "hosts"
166 Button2 =       : root          : f.menu "TwmWindows"
167 Button3 =       : root          : f.menu "programs"
168 Button1 = m     : root          : f.unfocus
169
170 Button1 = : desktop : f.movescreen
171 Button2 = : desktop : f.movescreen
172 #Button3 = : desktop : f.iconify
173
174 # Per window buttons
175 Button1 =               : icon|iconmgr|frame|title      : f.function "move-or-raise"
176 Button2 =               : icon|iconmgr|frame|title      : f.function "forcemove-or-lower"
177 Button3 =               : icon|iconmgr|frame|title      : f.menu "windowmenu"
178 Button1 = shift         : icon|iconmgr|frame|title      : f.resize
179 Button2 = shift         : icon|iconmgr|frame|title      : f.resize
180 Button3 = shift         : icon|iconmgr|frame|title      : f.zoom
181 Button1 = m             : icon|iconmgr|frame|title      : f.focus
182 Button3 = m             : icon|iconmgr|frame|title      : f.saveyourself
183 Button1 = control       : icon|iconmgr|frame|title      : f.forcemove
184 Button3 = control       : icon|iconmgr|frame|title      : f.delete
185 Button3 = control|shift : icon|iconmgr|frame|title      : f.destroy
186 Button1 = control|shift|m : window|frame|title          : f.destroy
187 Button2 = control|shift|m : window|frame|title          : f.forcemove
188 Button3 = control|shift|m : window|frame|title          : f.menu "windowmenu"
189
190 "Up"    = m : all                               : f.function "pan-up"
191 "Down"  = m : all                               : f.function "pan-down"
192 "Left"  = m : all                               : f.function "pan-left"
193 "Right" = m : all                               : f.function "pan-right"
194
195 Function "pan-up" {
196         !"raise-mini-desktop"
197         f.panup "100"
198 }
199 Function "pan-down" {
200         !"raise-mini-desktop"
201         f.pandown "100"
202 }
203 Function "pan-left" {
204         !"raise-mini-desktop"
205         f.panleft "100"
206 }
207 Function "pan-right" {
208         !"raise-mini-desktop"
209         f.panright "100"
210 }
211
212 Function "drag-with-up" {
213         f.nail
214         f.panup "100"
215         f.raise
216         f.nail
217         !"raise-mini-desktop"
218 }
219 Function "drag-with-down" {
220         f.nail
221         f.pandown "100"
222         f.raise
223         f.nail
224         !"raise-mini-desktop"
225 }
226 Function "drag-with-left" {
227         f.nail
228         f.panleft "100"
229         f.raise
230         f.nail
231         !"raise-mini-desktop"
232 }
233 Function "drag-with-right" {
234         f.nail
235         f.panright "100"
236         f.raise
237         f.nail
238         !"raise-mini-desktop"
239 }
240
241 "Up"    = m|shift : window|frame|title  : f.function "drag-with-up"
242 "Down"  = m|shift : window|frame|title  : f.function "drag-with-down"
243 "Left"  = m|shift : window|frame|title  : f.function "drag-with-left"
244 "Right" = m|shift : window|frame|title  : f.function "drag-with-right"
245
246 # Accelerators out of icon manager
247 # "F1"          =       : icon|window|frame|title       : f.iconify
248 "F2"            =       : icon|window|frame|title       : f.raise
249 "F3"            =       : icon|window|frame|title       : f.lower
250 "F1"            =       : iconmgr                       : f.hideiconmgr
251 "F2"            =       : iconmgr                       : f.hideiconmgr
252 "Menu"          =       : icon|window|frame|title       : f.showiconmgr
253
254 # Accelerators in icon manager
255 "F7"            =       : iconmgr                       : f.previconmgr
256 "F8"            =       : iconmgr                       : f.nexticonmgr
257 "Menu"          =       : iconmgr                       : f.function "select"
258
259 # Accelerators everywhere for new clients
260 "F4"            =       : all                   : !"xtrlock &"
261 "F6"            =       : all                   : !"xterm &"
262
263 menu "windowmenu"
264 {
265         "Window Menu"   f.title
266         "Close"         f.delete
267         "Destroy"       f.destroy
268         ""              f.nop
269         "Icon"          f.iconify
270         "Nail"          f.nail
271         "Zoom"          f.zoom
272         "Resize"        f.resize
273         "Identify"      f.identify
274         "Forced move"   f.forcemove
275         ""              f.nop
276         "Mouse help"    f.menu "windowmice"
277 }
278
279 menu "windowmice"
280 {
281         "Modifiers      Leftbutton      Middle      Right"      f.nop
282         ""                                                      f.nop
283         "                 Move/Raise    Move/Lower   Menu"       f.nop
284         " Shift:            Iconify           Resize       Zoom"       f.nop
285         "  Meta:       Focus/Unfocus                Checkpoint" f.nop
286         " Control:       Forced Move                       Delete"     f.nop
287         "Control+Shift:                                    Destroy"    f.nop
288 }
289
290 menu "special"
291 {
292         "Management"            f.title
293         "Refresh"               f.refresh
294         "Restart"               f.function "restart"
295         ""                      f.nop
296         "Kill twm"              f.quit
297         ""                      f.nop
298         "Show icon list"        f.showiconmgr
299         "Hide icon list"        f.hideiconmgr
300 }
301
302 Function "restart" {
303         !"rm .configs/mini-desktop-window-id"
304         f.restart
305 }
306
307 menu "programs"
308 {
309         "Programs"      f.title
310         "Emacs restart" !".configs/startemacs"
311         "Emacs left"    !"emacs -geometry 79x40+0+35 &"
312         ""              f.nop
313  "IRC Diziet" !"xterm -geometry 80x24+24-0 -T ' IRC' -e sh -c 'ssh -vt ijackson@tunnel.chiark.greenend.org.uk screen -x irc; read x' &"
314 # "IRC iwj" !"xterm -geometry 80x70+340-0 -T 'IRC iwj' -e irc iwj cam.irc.devel.ncipher.com &"
315         ""              f.nop
316         "Trn"           !"MAILCAPS=/u/iwj/.trnmailcap xterm -geometry 80x45+240+95 -e trn4 &"
317         "Archie"        !"xarchie &"
318         "Calc"          !"xcalc &"
319 #       "Xab large"     !"xab &"
320 #       "Xab small"     !"perl -e '\$xab=\"xab\"; exec \$xab \"other-xab\"' &"
321         ""              f.nop
322         "Management"    f.menu "special"
323         "Hosts"         f.menu "hosts"
324         "Games"         f.menu "games"
325         "Demos"         f.menu "demos"
326 }
327
328
329 Menu "hosts"
330 {
331         "Hosts"         f.title
332
333
334
335
336  ""             f.nop
337  "Relativity"   !"xterm-CT 'Relativity' -e ssh -p24 r-ian@relativity.dynamic.greenend.org.uk &"
338  ""             f.nop
339  "Lewes"        !"xterm-CT 'lewes rlogin' -e rlogin lewes &"
340  "Scunthorpe"   !"xterm-CT 'scunthorpe rlogin' -e rlogin scunthorpe &"
341  "Saintpaul"    !"xterm-CT 'saintpaul rlogin' -e rlogin saintpaul &"
342  "Slough"       !"xterm-CT 'slough rlogin' -e rlogin slough &"
343  "Guildford"    !"xterm-CT 'guildford rlogin' -e rlogin guildford &"
344  "York"         !"xterm-CT 'york rlogin' -e rlogin york &"
345 # "Greenock"    !"xterm-CT 'greenock rlogin' -e rlogin greenock &"
346  ""             f.nop
347  "Ursa"         !"xterm-CT 'ursa rlogin' -e rlogin ursa.cus.cam.ac.uk -l iwj10 &"
348  "Taurus"       !"xterm-CT 'taurus ssh' -e ssh taurus.cus.cam.ac.uk -l iwj10 &"
349  "Taurus rlogin" !"xterm-CT 'taurus rlogin' -e rlogin taurus.cus.cam.ac.uk -l iwj10 &"
350  "Bootes"       !"xterm-CT 'bootes rlogin' -e rlogin bootes.cus.cam.ac.uk -l iwj10 &"
351  "Thor"         !"xterm-CT 'thor rlogin' -e rlogin hammer.thor.cam.ac.uk -l iwj10 &"
352  ""             f.nop
353  "Leek"         !"xterm-CT 'leek rlogin' -e rlogin leek.cam-orl.co.uk -l iwj&"
354  "Lobster"      !"xterm-CT 'lobster rlogin' -e rlogin lobster.cam-orl.co.uk -l iwj&"
355  ""             f.nop
356  "Shep"         !"xterm-CT 'shep ssh' -e ssh shep.cl.cam.ac.uk -l iwj10 &"
357  "Ouse"         !"xterm-CT 'ouse ssh' -e ssh ouse.cl.cam.ac.uk -l iwj10 &"
358         ""              f.nop
359  "Chiark"       !"xterm-CT 'chiark ssh' -e ssh tunnel.chiark.greenend.org.uk -l ijackson &"
360  "Chiark ian"   !"xterm-CT 'chiark ssh ian' -e ssh tunnel.chiark.greenend.org.uk -l ian &"
361  "Chiark II"    !"xterm-CT 'chiark ssh II' -e ssh tunnel.chiark.greenend.org.uk -t -l ijackson personal/linux/bin/II &"
362  "Iguana"       !"xterm-CT 'iguana ssh' -e ssh iguana.ucam.org -l ijackson &"
363  "Utter"        !"xterm-CT 'utter ssh' -e ssh utter.chaos.org.uk -l ijackson &"
364         ""              f.nop
365  "Club"         !"xterm-CT 'club rlogin' -e rlogin club.damtp.cam.ac.uk -l iwj10 &"
366  "Greed"        !"xterm-CT 'greed rlogin' -e rlogin greed.damtp.cam.ac.uk -l iwj10 &"
367  "Enghp"     !"xterm -geometry 80x50 -T 'enghp' -e rlogin enghp.chu.cam.ac.uk -l iwj10 &"
368  "Impren"    !"xterm-CT 'impren rlogin' -e rlogin impren.al.cl.cam.ac.uk -l ijackson &"
369  ""             f.nop
370  "Novare -v"    !"xterm-CT 'novare -v' -e ssh -v debian.novare.net -l iwj &"
371  "Novare"       !"xterm-CT 'novare' -e ssh debian.novare.net -l iwj &"
372  "Debian"       !"xterm-CT 'debian' -e rlogin ftp.debian.org -l iwj &"
373  "Debra"                !"xterm-CT 'debra' -e rlogin debra.debian.org -l iwj &"
374  "GNU"          !"xterm-CT 'gnu' -e rlogin mescaline.gnu.org -l ijackson &"
375  "GNU dist"     !"xterm-CT 'gnudist' -e rlogin gnudist.gnu.org -l ijackson &"
376  "Master"       !"xterm-CT 'master' -e ssh master.debian.org -l iwj &"
377  "Va"           !"xterm-CT 'va' -e ssh va.debian.org -l iwj &"
378  "Nyx"          !"xterm-CT 'nyx - rlogin' -e rlogin nyx.cs.du.edu -l ijackson &"
379  "Sunsite"      !"xterm-CT 'sunsite' -e rlogin sunsite.unc.edu -l iwj &"
380 }
381
382 Menu "demos"
383 {
384         "Demos - probably broken"       f.title
385         "Ico"                           !"ico &"
386         "Maze"                          !"maze &"
387         "Muncher"                       !"muncher &"
388         "Plaid"                         !"plaid &"
389         "Worm"                          !"worm &"
390         "Colors"                        !"xcolors &"
391         "Eyes"                          !"xeyes &"
392         "Life"                          !"xlife &"
393         "XLogo"                         !"xlogo &"
394 }
395
396 Menu "games"
397 {
398         "Games - probably broken"       f.title
399         "Chomp"                         !"xchomp &"
400         "Cbzone"                        !"cbzone &"
401         "MazeWar"                       !"xterm -e mazewar &"
402         "Mille"                         !"xmille &"
403         "Reversi"                       !"reversi &"
404         "Roids"                         !"roids &"
405         "Robots"                        !"xrobots &"
406         "Shanghai"                      !"xmj &"
407         "Solitaire"                     !"xsol &"
408         "Spider"                        !"spider &"
409 }
410 END