chiark / gitweb /
iwjendian
[ian-dotfiles.git] / files / personal_scripts_bin_xloadt
1 #!/bin/sh -
2 hostname="`hostname | sed -e 's/\..*//'`"
3 xlsclients | egrep \
4  '[^ ]* xload -geometry [^ ]* -title '"'xload - $hostname'" \
5  >/dev/null && exit 0
6 xload -geometry 120x120+@@
7
8 @hostlist= ($ncipher eq 'bos' ? qw(viking dover pell arrakis) :
9             $ncipher eq 'cam' ? qw(jura islay dover dounreay marple belgrano greenock) :
10             qw(davenant anarres lsd));
11 for ($i=0; $i<@hostlist; $i++) { last if $hostlist[$i] eq $nodename; }
12 if ($i>=@hostlist) {
13     print STDERR "!! nodename $nodename not in $ncipher list @hostlist\n";
14     $i=-2;
15 }
16
17 302+141*$i;
18
19 @@+0 -title "xload - $hostname"