X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=files%2F_.vtwmrc;h=3eb1ad0800ecb8e89646998e68d9da59ac877191;hb=d5a9f4ea2d6d4eaec69520cf05e0c91f4e13f3bf;hp=0de46279ba0a356a8269c5ae43477707e48405da;hpb=820234b59d54e1d436a8e58995247c910d62dcbc;p=ian-dotfiles.git diff --git a/files/_.vtwmrc b/files/_.vtwmrc index 0de4627..3eb1ad0 100644 --- a/files/_.vtwmrc +++ b/files/_.vtwmrc @@ -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