Conky



Funny name and an amazing must have program!
Conky is a system Desktop Monitor, and with a tiny bit of tweaking, you can get it to display anything that you want it to.

Many people have made their own scripts that you can download online. I have seen scripts that display the weather, new mail in your GoogleMail account, what song is play on your media player etc.

At the moment, I have two Conky's running on my desktop:
Conky

To change how your Conky looks, just edit the .conkyrc file within your main directory.

Scripts for the one in the top left:

Conky

# .conkyrc
# By JAM - http://www.jamsubuntu.blogspot.com

update_interval 1.0

double_buffer yes
own_window yes
own_window_hints undecorated,below,skip_taskbar

use_xft yes
xftfont Bitstream Vera Sans:size=8

background yes
own_window_transparent yes
minmum_width 250
default_color white
alignment top_left
gap_x 15
gap_y 15

uppercase no

TEXT

${color #ff0000}Name PID CPU% MEM%
${color #ffffff} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color #ffffff} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color #ffffff} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color #ff0000}Mem usage
${color #ffffff} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color #ffffff} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color #ffffff} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}

${color #ff0000}Local Weather:
${color #aaaaaa}${execi 1800 /home/jam/weather.sh}


Weather.sh
#!/bin/sh

#
# Grab weather data from weather.com and format it according to the given XSLT
# Script written by boojit
# Modified by Hellf[i]re
# The original script and xslt can be downloaded from http://pondol.com/weather.tar.gz

# Usage:
# ${execi 1800 /path/to/weather/weather.sh location}
# Usage Example:
# ${execi 1800 /home/user/weather/weather.sh 03833}

# your Location ID: use http://xoap.weather.com/search/search?where=[yourcity] to find it
# U.S. users can just use their zip code; doubt that works for anyone else though (YMMV)
LOCID=UKXX0272

# s=standard units, m=metric units
UNITS=m

# where this script and the XSLT lives
RUNDIR=/home/jam

# there's probably other stuff besides CURL that will work for this, but i haven't
# tried any others.
# you can get curl at http://curl.haxx.se/
CURLCMD=/usr/bin/curl

# get it at http://xmlsoft.org/XSLT/
XSLTCMD=/usr/bin/xsltproc

# you probably don't need to modify anything below this point....

# CURL url. Use cc=* for current forecast or dayf=10 to get a multi-day forecast
CURLURL="http://xoap.weather.com/weather/local/$LOCID?cc=*&unit=$UNITS&dayf=2"

# The XSLT to use when translating the response from weather.com
# You can modify this xslt to your liking
XSLT=$RUNDIR/weather.xslt

#filter (if you want to convert stuff to lower-case or upper case or something)
#FILTER="|gawk '{print(tolower(\$0));}'"


#####
eval "$CURLCMD \"$CURLURL\" 2>/dev/null| $XSLTCMD $XSLT - $FILTER"



Weather.xslt



Script for the one in the bottom right:
# .conkyrc
# By JAM - http://www.jamsubuntu.blogspot.com

update_interval 1.0

double_buffer yes
own_window yes
own_window_hints undecorated,below,skip_taskbar

use_xft yes
xftfont Bitstream Vera Sans:size=8

background yes
own_window_transparent yes
minmum_width 250
default_color white
alignment bottom_right
gap_x 15
gap_y 0

uppercase no

TEXT
$nodename - $kernel

${color lightgrey}Uptime:$color $uptime $alignr${color lightgrey}Load:$color $loadavg
${color lightgrey}CPU: $color ${freq} Mhz $alignr${color lightgrey} Usage:$color $cpu%
$color${cpugraph}

${color lightgrey}Processor temperature: $color${acpitemp}°C

${color lightgrey}Battery: $color ${battery}

${color lightgrey}RAM usage:$color $mem/$memmax - $memperc%
${membar}

${color grey}Disk usage: $color${fs_free /} of ${fs_size /}
${fs_bar 6 /}

${color #ffcb48}Wi-Fi ${hr 1}
${color lightgrey}Wireless signal: $color${wireless_link_qual ath0}%
${color lightgrey}IP address: $color${addr ath0}
${color lightgrey}Download speed: $color${downspeedf wifi0} Kb/sec
${downspeedgraph wifi0}
${color red}Downloaded: $color${totaldown wifi0} $alignr ${color green}Uploaded: $color${totalup wifi0}

${color #ffcb48}Ethernet ${hr 1}
${color lightgrey}IP address: $alignr$color${addr eth0}




Share your views...

1 Respones to "Conky"

eric said...

here's one I wrote for seeing your power usage in watts on a laptop http://crunchbanglinux.org/forums/topic/323/conky-power-usage-script/


8 February 2009 21:54

Post a Comment

 

About Me

Hey! I'm Jam, a part time web developer / blogger form the UK. I have a love for anything involving Artificial Intelligence, and robotics.

I'm also quite a fan of Ubuntu Linux! And I'm guessing you are since you're here? If you would like to contribute your own posts to this blog, then please get in touch!

Thinking about getting your own website? Click on the below link for great prices, and great designs!

Jam1e.co.uk

© 2010 Jam's Ubuntu Linux Blog All Rights Reserved Thesis WordPress Theme Converted into Blogger Template by Hack Tutors.info