Beelzebud |
05-30-2011 10:22 PM |
1 Attachment(s)
Someone asked, so here are my configs. This is for a 1680x1050 display, so some minor tweaking to the voffset values in the conkyrc would be needed if using a different resolution. Hard drive locations will also need to be customized.
Code:
background yes
use_xft yes
xftfont JH_FALLOUT:size=6
xftalpha 0.8
override_utf8_locale yes
update_interval 2
own_window yes
own_window_type normal
own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 255
own_window_class conky-semi
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
stippled_borders no
#border_margin 0
border_width 0
default_color 03fef9
color0 03fef9
color1 00c3d0
default_shade_color black
alignment top_left
minimum_size 1600
gap_x 0
gap_y 0
no_buffers yes
##uppercase yes
short_units yes
pad_percents 2
text_buffer_size 1024
imlib_cache_size 0
##
##
TEXT
${GOTO 105}${if_mpd_playing}${mpd_artist} - ${mpd_title} - ${mpd_album}${endif}
${GOTO 105}${if_mpd_playing}${color1}${mpd_bar 5,170}${color}${endif}
${GOTO 105}${if_mpd_playing}${mpd_status}${GOTO 185}${mpd_elapsed}${GOTO 220}/${GOTO 235}${mpd_length}${endif}
${if_mpd_playing}${execi 5 /home/beelzebud/.conky-mpd-albumart}${image /tmp/cover -s 100x100 -p 0,0}${endif}
${voffset 92}${GOTO 1220}CPU: ${color1}${cpubar cpu0 6,75} ${cpu cpu0}%${color}
${GOTO 1220}Processes: ${color1}$running_processes/$processes${color}
${GOTO 1220}Load: ${color1}${loadavg}${color}
${voffset 10}${GOTO 360}RAM: ${color1}${membar 6,50} ${memperc}%${color}
${GOTO 360}SWAP: ${color1}${swapbar 6,70}${color}
${GOTO 360}Uptime: ${color1}$uptime_short${color}
${voffset 235}${GOTO 300}SDA: ${color1}${diskiograph sda 6,70}${color}
${GOTO 300}SDB: ${color1}${diskiograph sdb 6,70}${color}
${GOTO 300}/slack: ${color1}${fs_free /}${color}
${GOTO 300}/sda: ${color1}${fs_free /media/sda}${color}
${GOTO 300}/sdb: ${color1}${fs_free /media/sdb}${color}
${voffset 150}${GOTO 1205}Up: ${color1}${totalup eth0} ${upspeedgraph eth0 6,75} ${upspeed eth0}${color}
${GOTO 1205}Down: ${color1}${totaldown eth0} ${downspeedgraph eth0 6,75} ${downspeed eth0}${color}
${GOTO 1205}Local IP: ${color1}${addr eth0}${color}
${GOTO 1205}External IP: ${color1}${execi 6600 wget -O - http://ip.tupeux.com | tail}
Here is the python script for the conky mpd art. I named this .mpd-album-art and just put it in my home directory.
Code:
#! /usr/bin/env python
import os
import shutil
import commands
import urllib
def copycover(currentalbum, src, dest, defaultfile):
searchstring = currentalbum.replace(" ", "+")
if not os.path.exists(src):
url = "http://www.albumart.org/index.php?srchkey=" + searchstring + "&itempage=1&newsearch=1&searchindex=Music"
cover = urllib.urlopen(url).read()
image = ""
for line in cover.split("\n"):
if "http://www.albumart.org/images/zoom-icon.jpg" in line:
image = line.partition('src="')[2].partition('"')[0]
break
if image:
urllib.urlretrieve(image, src)
if os.path.exists(src):
shutil.copy(src, dest)
elif os.path.exists(defaultfile):
shutil.copy(defaultfile, dest)
else:
print "Image not found!"
# Path where the images are saved
imgpath = os.getenv("HOME") + "/.covers/"
# image displayed when no image found
noimg = imgpath + "nocover.png"
# Cover displayed by conky
cover = "/tmp/cover"
# Name of current album
album = commands.getoutput("mpc --format %artist%+%album% | head -n 1")
# If tags are empty, use noimg.
if album == "":
if os.path.exists(conkycover):
os.remove(conkycover)
if os.path.exists(noimg):
shutil.copy(noimg, conkycover)
else:
print "Image not found!"
else:
filename = imgpath + album + ".jpg"
if os.path.exists("/tmp/nowplaying") and os.path.exists("/tmp/cover"):
nowplaying = open("/tmp/nowplaying").read()
if nowplaying == album:
pass
else:
copycover(album, filename, cover, noimg)
open("/tmp/nowplaying", "w").write(album)
else:
copycover(album, filename, cover, noimg)
open("/tmp/nowplaying", "w").write(album)
For this script to work you must have mpd and mpc (command line version) installed. Both are found on slackbuilds.org. If you want the exact font that was in my screenshot, google for "JH_Fallout".
Here is my desktop image:
|