chiark / gitweb /
Merge old CVS `ian-dotfiles' repo, as a subtree where we can pick bits
[ian-dotfiles.git] / from-cvs / files / personal_scripts_bin_xloadt
diff --git a/from-cvs/files/personal_scripts_bin_xloadt b/from-cvs/files/personal_scripts_bin_xloadt
new file mode 100755 (executable)
index 0000000..d713216
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh -
+hostname="`hostname | sed -e 's/\..*//'`"
+xlsclients | egrep \
+ '[^ ]* xload -geometry [^ ]* -title '"'xload - $hostname'" \
+ >/dev/null && exit 0
+xload -geometry 120x120+@@
+
+@hostlist=
+($ncipher eq 'bos' ? qw(viking dover pell arrakis) :
+ $ncipher eq 'cam' ? qw(jura islay dover dounreay marple belgrano greenock) :
+ $chiark ? qw(chiark) :
+ qw(davenant anarres liberator norway));
+
+for ($i=0; $i<@hostlist; $i++) { last if $hostlist[$i] eq $nodename; }
+if ($i>=@hostlist) {
+    print STDERR "!! nodename $nodename not in $ncipher list @hostlist\n";
+    $i=-2;
+}
+
+302+141*$i;
+
+@@+0 -title "xload - $hostname"