chiark / gitweb /
belgrano
[ian-dotfiles.git] / files / personal_scripts_bin_xloadt
index 861a76ceb15b9dd31951cbee843debeb8ee4b088..a55f2a840fd097213c5590c0fdb75d1b3d9f9bcb 100755 (executable)
@@ -3,4 +3,17 @@ hostname="`hostname | sed -e 's/\..*//'`"
 xlsclients | egrep \
  '[^ ]* xload -geometry [^ ]* -title '"'xload - $hostname'" \
  >/dev/null && exit 0
-xload -geometry 120x120+302+0 -title "xload - $hostname"
+xload -geometry 120x120+@@
+
+@hostlist= ($ncipher eq 'bos' ? qw(viking dover pell arrakis) :
+            $ncipher eq 'cam' ? qw(jura islay dover dounreay marple belgrano) :
+            qw(davenant anarres));
+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"