chiark / gitweb /
liberator only if liberator
[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=
9 ($ncipher eq 'bos' ? qw(viking dover pell arrakis) :
10  $ncipher eq 'cam' ? qw(jura islay dover dounreay marple belgrano greenock) :
11  $chiark ? qw(chiark) :
12  qw(davenant anarres liberator norway));
13
14 for ($i=0; $i<@hostlist; $i++) { last if $hostlist[$i] eq $nodename; }
15 if ($i>=@hostlist) {
16     print STDERR "!! nodename $nodename not in $ncipher list @hostlist\n";
17     $i=-2;
18 }
19
20 302+141*$i;
21
22 @@+0 -title "xload - $hostname"