chiark / gitweb /
belgrano
[ian-dotfiles.git] / files / _.vtwmrc
index 0de46279ba0a356a8269c5ae43477707e48405da..3eb1ad0800ecb8e89646998e68d9da59ac877191 100644 (file)
@@ -282,18 +282,45 @@ menu "programs"
 Menu "hosts"
 {
         "Hosts"                f.title
- "Dounreay"    !"remoteshell dounreay &"
- "Dover"       !"remoteshell -rrsh dover &"
- "Titanic"     !"xterm-CT 'titanic rlogin' -e rlogin titanic &"
- "Belgrano"    !"xterm-CT 'belgrano ssh' -e ssh belgrano &"
+@@-
+       sub host {
+               my ($x,$xfqdn,$usex,$rsh) = @_;
+               $x =~ m/^(.)(.*)$/;
+               my ($y) = (uc $1).$2;
+               my ($rlss) = $rsh ? 'rlogin' : 'ssh';
+               return " \"$y\"\t\t!\"".
+ ($usex ? "remoteshell ".($rsh?'-rrsh ':'')."$x" :
+       "xterm-CT '$x $rlss' -e $rlss $xfqdn"). "\t&\"";
+       }
+@@
+
+@@? $ncipher ?@@
+@@-
+       sub host_nc {
+               my ($x,$h,$rsh) = @_;
+               &host($x,"$x.$ncipherdom{$h}", $ncipher eq $h, $rsh);
+       }
+@@
+@@ &host_nc(   'dover',        'cam',  1)      @@
  ""            f.nop
- "Jura"                !"remoteshell jura &"
- "Islay"       !"remoteshell -rrsh islay &"
- "Keynes"      !"remoteshell -rrsh keynes &"
- "Scarp"       !"remoteshell -rrsh scarp &"
- "Fowey"       !"remoteshell -rrsh fowey &"
- "Ludlow"      !"remoteshell -rrsh ludlow &"
- "Greenock"    !"remoteshell -rrsh greenock &"
+@@ &host_nc(   'dounreay',     'cam',  0)      @@
+@@ &host(      'titanic','titanic.ncipher.com',        0,      1)      @@
+@@ &host(      'belgrano','belgrano.ncipher.com',      0,      0)      @@
+ ""            f.nop
+@@ &host_nc(   'pell',         'bos',  0)      @@
+ ""            f.nop
+@@ &host_nc(   'jura',         'cam',  0)      @@
+@@ &host_nc(   'islay',        'cam',  0)      @@
+@@ &host_nc(   'keynes',       'cam',  1)      @@
+@@ &host_nc(   'scarp',        'cam',  1)      @@
+@@ &host_nc(   'fowey',        'cam',  1)      @@
+@@ &host_nc(   'ludlow',       'cam',  1)      @@
+@@ &host_nc(   'greenock',     'cam',  1)      @@
+ ""            f.nop
+@@ &host_nc(   'viking',       'bos',  0)      @@
+@@ &host_nc(   'arrakis',      'bos',  0)      @@
+@@;
+
  ""            f.nop
  "Relativity"  !"xterm-CT 'Relativity' -e ssh -p24 r-ian@relativity.dynamic.greenend.org.uk &"
  ""            f.nop