3 # Starts up a procmeter on the right hand side of the screen,
4 # displaying whatever I typically want to see on the host that is
5 # displaying the procmeter. It looks at DISPLAY, so if for example,
6 # box's screen is connecting to kite via xdm, it knows to still show
7 # box's procmeter anyway.
9 # this is useful because it might be running off a nfs automount. Same reason
10 # a normal daemon chdir's
13 my $screenheight = `xdpyinfo |grep -i dim`;
14 $screenheight =~ s/\s+dimensions:\s+\d+x(\d+)\s+/$1/;
15 #$geom="62x".($screenheight - 66)."-0+0"; # for wmaker
16 $geom="66x".($screenheight - 64 - 64 - 4)."-0+0"; # for ion
18 $currenthost=lc `hostname`;
21 if ($ENV{DISPLAY
}=~m/([a-zA-Z]+)\./) {
25 $desthost=$currenthost;
28 # What to display and other options.
29 my @command=('procmeter3',
37 'Date_Time.Date_DM-t',
38 'Date_Time.Time_HM-t',
39 # 'APM.Battery_Life-t',
40 # 'APM.Battery_Status-t',
41 force_opts
(), "-geometry", $geom);
44 # Satin has a lot of memory, and some extra outputs, so
45 # frop this one for it.
46 if ($currenthost ne 'satin') {
47 return 'Memory.Swap_Used-g';
53 if ($currenthost eq 'satin' || $currenthost eq 'dragon') {
54 return 'Longrun.Longrun-g', 'ACPI.Batt1_Rate-g';
56 elsif ($currenthost eq 'kodama') {
57 return 'CPUInfo.CPU_Speed-g', 'ACPI.Batt1_Rate-g';
63 if ($currenthost eq 'dragon') {
64 # Well, there is the onboard wireless (eth0), the pcmcia
65 # card (eth2?), and the onboard ethernet (eth1). Sometimes
66 # the wifi shows up as wlan0, driver depending.
67 return #'Network.Pkt_eth0-g', 'Wireless.Link_eth0-g',
68 'Network.Pkt_wlan0-g', 'Wireless.Link_wlan0-g',
70 'Network.Pkt_eth2-g', 'Wireless.Link_eth2-g';
72 elsif ($currenthost eq 'kodama') {
73 # Well, there is the onboard wireless (wlan0), the pcmcia
74 # card (eth2?), and the onboard ethernet (eth0).
75 return 'Network.Pkt_wlan0-g', 'Wireless.Link_wlan0-g',
80 return 'Network.Pkt_eth0-g', 'Wireless.Link_eth0-g',
81 'Network.Pkt_eth1-g', 'Wireless.Link_eth1-g';
82 'Network.Pkt_wlan0-g', 'Wireless.Link_wlan0-g';
87 # For laptops, I need to force enable the network
88 # and wireless options, even if the network card is not in at the
90 if ($currenthost eq 'silk' || $currenthost eq 'paper') {
91 return '--Network.options=eth0';
93 elsif ($currenthost eq 'satin') {
94 return '--Wireless.options=eth1';
96 elsif ($currenthost eq 'dragon') {
97 return '--Wireless.options=eth2', '--Wireless.options=eth0';
99 elsif ($currenthost eq 'kodama') {
100 return '--Wireless.options=eth2';
106 # Enable log files? Yes, for my web server.
107 if ($currenthost eq 'kite') {
108 return "LogFile.Log_Rate_access-g";