Very nice What's the applets you are using for sys monitors on the right side. I like how they look like part of root window.
i installed conky and wrote-stole cut/paste most of code:
conky rc
# UBUNTU-CONKY
own_window yes
#own_window_type override #seen on top of evry window
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer right
use_xft yes
xftfont Hemi head 426:size=9
xftalpha 0.5
# Update interval in seconds
update_interval 3.0
# Minimum size of text area
minimum_size 250 10
# Default color
default_color gray
# Text alignment, other possible values are commented
alignment top_right
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after 'TEXT' will be formatted on screen
TEXT
$color
${alignr}${color gray}${time %a, } ${color gray}${time %e %B %G} ${color gray}${time %I:%M %P}
${color gray}SYSTEM ${hr 2}$color
$nodename $sysname $kernel on $machine
${color gray}${hr 2}$color
${color gray}CPU ${hr 2}$color
${freq_g}GHz Load: ${loadavg} Uptime: ${uptime}
${cpugraph gray ffffff}
PROCESS NAME${alignr}CPU%
${top name 1}${alignr}${top cpu 1}
${top name 2}${alignr}${top cpu 2}
${top name 3}${alignr}${top cpu 3}
${top name 4}${alignr}${top cpu 4}
${top name 5}${alignr}${top cpu 5}
${color gray}${hr 2}$color
${color gray}MEMORY${hr 2}$color
RAM: $memperc% ${membar 6}$color
Swap: $swapperc% ${swapbar 6}$color
MEMORY NAME${alignr}MEM %
${top_mem name 1}${alignr}${top_mem mem 1}
${top_mem name 2}${alignr}${top_mem mem 2}
${top_mem name 3}${alignr}${top_mem mem 3}
${top_mem name 4}${alignr}${top_mem mem 4}
${top_mem name 5}${alignr}${top_mem mem 5}
${color gray}${hr 2}$color
${color gray}DISK SPACE USED${hr 2}$color
OS: ${fs_used_perc /}%${alignr}${fs_used /} / ${fs_size /}
Media: ${fs_used_perc /media/disk}%${alignr}${fs_used /media/disk} / ${fs_size /media/disk}
weather script: is different written in pearl - not python and i havnt really got it working right atm:
#!/usr/bin/perl
use Switch;
use Encode;
use Text::Wrap;
$code=$ARGV[0]; #zipcode or weather.com city code
$system=$ARGV[1]; #f for imperial c for metric
$what=$ARGV[2]; #what are we looking for?
$file="/tmp/weather.html"; #temp holding weather
$update=3600; #time in seconds to update $file if set to 0 don't use $file
$leadspace=" "; #spacing before each high low
$trailspace=" "; #spacing after each high low.
$fspaces=""; #spacing between condition symbols.
$dspaces=" "; #spacing between each day
$lines="\n\n\n\n"; #each \n represents one line between the days and temps
$Text::Wrap::columns = 58;
$initial_tab=""; #tab before first line in weather output
$subsequent_tab="\t"; #tab before each subsequet line in weather output
$degree= encode_utf8( "\x{00B0}" ); #give me the degree symbol, not everyone has same locale
#ensure user inputs proper system
if($system !=~ "c" || $system !=~ "f"){$what=0;} #this will give usage error
switch($what){ #determine what user wants
case "c" { #if current conditions
&file_op; #save weather to $file
while(<FILE>){ #cycle through file
if (/<em>Current conditions/ .. /<h3>/){ #found current conditions
($cn2) = /<h3>(\b.+\<\/h3>/; #save current conditions
if($cn2){print "$cn2\n"; exit;}
}
}
}
case "w" { #if list
&file_op; #save weather to file
while(<FILE>){ #cycle through file
if (/<dt>Feels Like:<\/dt>/ .. /<dd>/){ #found feels like temp
($tmf) = /<dd>(-?\d+)/; #sav temp
}
if (/<dt>Humidity:<\/dt>/ .. /<dd>/){ #found current humidity
($hmt) = /<dd>(\d+\%)/; #save current humidity
}
if (/<dt>Wind:<\/dt>/ .. /<dd>/){ #found wind conditions
($wnd) = /<dd>(\b.+\<\/dd>/; #save wind conditions
#do we have current conditions?
if($tmf && $hmt && $wnd){
print "Feels like: $tmf$degree\n";
print "Humidity: $hmt\n";
print "Wind: $wnd\n"; exit;}
}
}
}
case "cp" { #if current conditions symbol
&file_op; #save weather to $file
while(<FILE>){ #cycle through file
if (/<em>Current conditions/ .. /<h3>/){ #found current conditions
($cnd) = /<h3>(\b.+\<\/h3>/; #save current conditions
#do we have current conditions? Then translate into symbol
if($cnd){cond_symb($cnd); print "$ctext\n"; exit;}
}
}
}
case "t" { #if current temp
&file_op; #save weather to $file
while(<FILE>){ #cycle through file
if (/<div id="forecast-temperature">/ .. /<h3>/){ #found current temp
($tmp) = /<h3>(-?\d+)/; #save current temp
#do we have current temp? Then print
if($tmp){print "$1$degree\n"; exit;}
}
}
}
case /[1-5]d$/ { #display the days up to specified day
&file_op; #save weather to $file
my $day=(split "t", $what)[0]; #how many days are we looking for
my $count=0;
while(<FILE>){
if(/<th>(\b.+\<\/th>/ && ++$count<=$day){ #look for the conditions upto specified day
$days[$count-1]=$1; #save day
&day_space($days);
}
elsif($count>=$day){print "$dtext\n"; exit;} #don't keep lopking if everything has been found
}
}
case /[1-5]dp$/ { #display the conditions from today through day $days
&file_op; #save weather to $file
my $day=(split "p", $what)[0]; #how many days are we looking for
my $flag=0; #set flag for when we find start of conditions
my $count=0;
while(<FILE>){
if(/^<tr class="titles">\s*$/){$flag=1;} #found the start of conditions
elsif($flag && /(\b.+\<\/td>/ && ++$count<=$day){ #look for the conditions upto specified day
$cnd[$count-1]=$1; #save conditions
&cond_symb ($cnd[$count-1]); #translate conditions to symbol
#exit;
}
elsif($count>=$day){print "$ctext\n"; exit;} #don't keep looking if everything has been found
}
}
case /[1-5]t$/ { #display the temps from today through day $days
&file_op; #save weather to $file
my $count=0;
my $day=(split "t", $what)[0]; #how many days are we looking for
while(<FILE>){
#get the high temp
(my $high) = /<td><strong>High: (-?\d+)°<\/strong><span>Low: \-?\d+°<\/span><\/td>/;
#get the low temp
(my $low) = /<td><strong>High: \-?\d+°<\/strong><span>Low: (-?\d+)°<\/span><\/td>/;
#print the high and low temp for the specified day
if($high=~/\d+/ && $low=~/\d+/ && ++$count<=$day){print "$leadspace$high$degree/$low$degree$trailspace";}
elsif($count>=$day){print "\n"; exit;} #don't keep looking if everything has been found
}
}
case /[1-5]dt$/ {
&file_op; #save weather to $file
my $count1 = my $count2=0;
my $day=(split "dt", $what)[0]; #how many days are we looking for
my $flag=1; #print days once
while(<FILE>){
#get the high temp
(my $high) = /<td><strong>High: (-?\d+)°<\/strong><span>Low: \-?\d+°<\/span><\/td>/;
#get the low temp
(my $low) = /<td><strong>High: \-?\d+°<\/strong><span>Low: (-?\d+)°<\/span><\/td>/;
#print the high and low temp for the specified day
if(/<th>(\b.+\<\/th>/ && ++$count1<=$day){ #look for the conditions upto specified day
$days[$count1-1]=$1; #save day
&day_space($days);
}
elsif($high=~/\d+/ && $low=~/\d+/ && ++$count2<=$day){$ttext.=$leadspace.$high.$degree."/".$low.$degree.$trailspace;}
elsif($count1>=$day && $count2>=$day){print "$dtext\n$lines$ttext\n"; exit;} #don't keep lopking if everything has been found
}
}
case /[1-7]w$/ { #display the weather forecast in words from today through day $days
&file_op; #save weather to $file
my $num=(split "w", $what)[0]; #how many are we looking for
my $count=0; #initialize count
while(<FILE>){ #cycle through file
#get the weather
(my $when) = /<li><strong>(\b.+\b\<\/strong>/;
(my $weather) = /<\/strong>(.+)<\/li>/;
$weather=$when.$weather;
#print weather
if($when && ++$count<=$num){
#print "$when";
print wrap($initial_tab, $subsequent_tab, $weather);
print "\n";
}
elsif($count>=$num){exit;} #don't keep looking if everything has been found
}
}
case /[1-5]p$/ { #if conditions of specified day
&file_op; #save weather to $file
my $day=(split "p", $what)[0]; #what day are we looking for
my $flag=0; #set flag for when we find start of conditions
my $count=0;
while(<FILE>){
if(/^<tr class="titles">\s*$/){$flag=1;} #found the start of conditions
elsif($flag && /(\b.+\<\/td>/ && ++$count==$day){ #look for the conditions for specified day
$cnd=$1; #save conditions
&cond_symb ($cnd); #translate conditions to symbol
}
elsif($count>=$day){print "$ctext\n"; exit;} #don't keep looking if everything has been found
}
}
case /[1-5]$/ { #if temp of specified day
&file_op; #save weather to $file
while(<FILE>){
#get the high temp
($high) = /<td><strong>High: (-?\d+)°<\/strong><span>Low: \-?\d+°<\/span><\/td>/;
#get the low temp
($low) = /<td><strong>High: \-?\d+°<\/strong><span>Low: (-?\d+)°<\/span><\/td>/;
#print the high and low temp for the specified day
if($high && $low && ++$count==$what){print "$high$degree/$low$degree\n";}
}
}
else { #didn't give proper options
&usage; #print usage error
}
}
#print "\n"; # need endline to make things look nice
close FILE;
sub file_op { #do file operations
if(-e $file ){ #does the file exist and is not empty?
my $size=`stat -c %s $file`;
if($size >= 1000){
my $date=`date -u +%s`; #get current date in seconds
my $created=`stat -c %Y $file`; #get creation date of file in seconds
$age=$date - $created; #determine age of file
}
else{
$age=$update+1;
}
}
else{ #if file doesn't exist make it and set to update the file
`touch $file`;
$age=$update+1;
}
if ($age>=$update){ #only get a new file every hour
#obtain the weather forecast and store it in $file
`wget -O - http://weather.yahoo.com/forecast/"...stem".html > $file`;
}
open(FILE, $file) or die "Could not open file $file: $!\n";
}
sub usage { #if correct options haven't been passed usage error
print "Usage error weather.pl <citycode> <system> <option>\n";
print "weather.pl <citycode> <system> <option>\n";
print "\t<citycode> - weather.com city code\n";
print "\t<system> - c for metric or f for imperial\n";
print "\t<option> - Only one option can be entered at a time\n";
print "\t\tc displays current conditions\n";
print "\t\tw displays list of current conditions\n";
print "\t\tcp displays current conditions symbol\n";
print "\t\tt displays current temp in chosen system\n";
print "\t\t[1-5]d displays the days up to specified day\n";
print "\t\t[1-5]dp displays condition symbol for days up to specified day\n";
print "\t\t[1-5]t displays high/low temp in chosen system up to specified day\n";
print "\t\t[1-5]dt displays days and then high/low temp in chosen system up to specified day\n";
print "\t\t[1-7]w displays the weather in words up number specified\n";
print "\t\t[1-5]p displays conditions for specified day\n";
print "\t\t[1-5] displays high/low temp in chosen system for specified day\n";
}
sub cond_symb { #translates conditions into symbol in weather font
if ($_ =~ "Partly Cloudy"){$_="c";}
elsif ($_ =~ "Fair" || $_ =~ "Sun" || $_ =~ "Clear"){$_="A";}
elsif ($_ =~ "Cloud" || $_ =~ "Fog"){$_="e";}
elsif ($_ =~ "Storm" || $_ =~ "Thunder" || $_ =~ "T-"){$_="i";}
elsif ($_ =~ "Snow" || $_ =~ "Flurries" || $_ =~ "Wintry"){$_="k";}
elsif ($_ =~ "Rain" || "Drizzle"){$_="h";}
elsif ($_ =~ "Shower"){$_="g";}
$ctext.=$_.$fspaces;
}
sub day_space { #Adds spaces for aligment
if ($_ =~ "Today"){$_=" Today ";}
elsif ($_ =~ "Tonight"){$_="Tonight";}
elsif ($_ =~ "Tomorrow"){$_="Tomorrow";}
elsif ($_ =~ "Thu"){$_=" Thu ";}
elsif ($_ =~ "Fri"){$_=" Fri ";}
elsif ($_ =~ "Sat"){$_=" Sat ";}
elsif ($_ =~ "Sun"){$_=" Sun ";}
elsif ($_ =~ "Mon"){$_=" Mon ";}
elsif ($_ =~ "Tue"){$_=" Tue ";}
elsif ($_ =~ "Wed"){$_=" Wed ";}
$dtext.=$_.$dspaces;
}