Posts tagged ·



buienradar (weather image) in conky

no comments

Erik wanted some help with getting a piece of an animated gif to show up in his conky (Conky Help::Tips, Tricks & Scripts::CrunchBang Forums.)

Now I liked that idea very much so came up with this:

First I created a directory ~/.conky/radar/  (for the temp.gif).
Then the (chmod it +x)

# Erik
# 2010-07-31
# iggikoopa and pieter
# adjust the paths to your own liking!

# Enter the name of the radar GIF image you want to download:

# Download the GIF file:
wget -q -N -t 1 "$RADARIMAGEURL" # quiet, timestamping, 1 retry

# Split the file, leave only the last frame. This might be tricky, because the
# frames seem to share one background frame...

# convert the gif to the right colors so we can do something with it.
gifsicle --colors=255 "$RADARIMAGE" > /home/pieter/.conky/radar/temp.gif
# make them B&W (I like it that way)
gifsicle --use-col=bw /home/pieter/.conky/radar/temp.gif > /home/pieter/.conky/radar/tempbw.gif
# For greyscale:
# gifsicle --dither --use-col=bw /home/pieter/.conky/radar/temp.gif > /home/pieter/.conky/radar/tempbw.gif
# grab the last animated gif and make a stilt image of it.
gifsicle -U /home/pieter/.conky/radar/tempbw.gif "#-1" > /home/pieter/.conky/radar/radar.gif

# if you want to keep the colors then comment above and uncomment these:
#gifsicle --colors=255 "$RADARIMAGE" > /home/pieter/.conky/radar/temp.gif
#gifsicle -U /home/pieter/.conky/radar/temp.gif "#-1" > /home/pieter/.conky/radar/radar.gif

Then in Conky:
add variable:
imlib_cache_size 0

and use this (dont forget to edit the path):

${texeci 300 /home/pieter/.conky/}
${image /home/pieter/.conky/radar/radar.gif -p 50,15 -s 125x125}

Works great here…

Display a # in conky

no comments

I wanted to display #! in my conky script but could not seem to get it working right.

This tip: Conky Help – Tips, Tricks & Scripts – CrunchBang Linux Forums worked great!

To display a “#” in conky you have to do

${exec echo “#”}

More conky tips (hellanzb and External IP)

no comments

Sometimes I kinda get lost in the great conky rules that I and many people use..

For example look at this crunchbang conky forum.

a few snippets:
${execpi 3600 wget -q -O -|sed -e 's/.*Current IP Address: //' -e 's/<.*$//';}|${addr eth0}
Will give you your esternal and internal IP adress

Or for hellanzb:
${if_running hellanzb}${font terminus:bold:size=11}${color FFFFFF}NZB ${hr 2}${color 888888}
${execi 10 ~/.conky/ -n}
Speed: ${execi 10 ~/.conky/ -r} k/s
Percent Done: ${execi 10 ~/.conky/ -p}%
ETA:${execi 10 ~/.conky/ -e}
Queued: ${execi 10 ~/.conky/ -q}

The looks like this:

# writen by Austin Trask
# contact
# visit for more info

import xmlrpclib
import optparse

#change this next line to represent your hellanzb server info
SERVER = 'http://hellanzb:changeme@localhost:8760/'
hellanzbServer = xmlrpclib.ServerProxy(SERVER)

def NZB(option, opt, value, parser):
download = hellanzbServer.status()['currently_downloading']
if( len(download)>0):
print download[0]['nzbName'].encode('ascii', 'ignore')
print 'None'>

def rate(option, opt, value, parser):
rate = int(hellanzbServer.status()['rate'])
print rate

def percentage(option, opt, value, parse):
percent = hellanzbServer.status()['percent_complete']
print percent

def ETA(option, opt, value, parse):
eta = hellanzbServer.status()['eta']
hours = (eta/3600)
minutes = (eta/60)%60
seconds = (eta%60)
time_left = "%02d:%02d:%02d" % (hours, minutes, seconds)
print time_left

parser = optparse.OptionParser()
parser.add_option("-n", "--nzb", action="callback", callback=NZB,
help="output current NZB")
parser.add_option("-r", "--rate", action="callback", callback=rate,
help="output hellanzb rate")
parser.add_option("-p", "--percent", action="callback", callback=percentage,
help="output completion percentage of current NZB")
parser.add_option("-e", "--eta", action="callback", callback=ETA,
help="displays the ETA of the current NZB")

# New function definitions added by ubuntuforums user "kebes"
# to allow for query of the queue:
def NZBNext(option, opt, value, parser):
queued = hellanzbServer.status()['queued']
if( len(queued)>0):
print queued[0]['nzbName'].encode('ascii', 'ignore')
print 'None'

def QueueLength(option, opt, value, parser):
queued = hellanzbServer.status()['queued']
print len(queued)

def ListQueued(option, opt, value, parser):
queued = hellanzbServer.status()['queued']
if( len(queued)>0):
for item in queued:
print item['nzbName'].encode('ascii', 'ignore')
print 'None'

parser.add_option("-N", "--next", action="callback", callback=NZBNext,
help="output next NZB")
parser.add_option("-l", "--length", action="callback", callback=QueueLength,
help="output queue length")
parser.add_option("-q", "--list", action="callback", callback=ListQueued,
help="output all items in queue")

(options, args) = parser.parse_args()

Resize Linux Terminator how you want it.

no comments

If you use terminator but want it to startup with the size you want then run it like this:

terminator –geometry=800×400+150+150

800×400 is the size ot the screen and 150+150 the position where it should popup.

!# crunchbang

no comments

So I was really happy with sabayon running on my machines but somehow I didnt get that linux feeling (or kinda lost it).

So I searched furter and stumbled on cruchnbang.


You need to change loads of stuff but thatsthe great thing about this distro.

There is a great community behind crunchbang and they have some amazing suggestions, tips, hints and solutions for you.

Like this conky script I am running on it instead of the default one.