Conky and Crunchbang

I finally got Conky working on my Crunchbang netbook to my liking.

A picture:

For a larger pic, please go to my deviantArt page.

Anyway, I’ve been trying to get the weather script working for the past few days.  Well, I’ve wanted it since I got Crunchbang working, but I’d put it off.

I finally got it working… Here’s my setup:

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# Enjoy! :)
##############################################
#  Settings
##############################################
# Use Xft?
use_xft yes
xftfont Trebuchet MS:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 180 0

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color white
own_window_colour white

# Text alignment, other possible values are commented
alignment top_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 5
gap_y 5

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

TEXT
SYSTEM ${hr 2}
${alignc 0}${font Arial Black:size=8}${nodename}${font}

${font OpenLogos:size=10}u${font}   Kernel:  ${alignr}${kernel}
${font StyleBats:size=10}A${font}   CPU: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=10}g${font}   RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=10}j${font}   Swap: $swapperc% ${alignr}${swapbar 8,60}
${font StyleBats:size=10}q${font}   Uptime: ${alignr}${uptime_short}


NETWORK ${hr 2}
${if_existing /proc/net/route wlan0}
Up: ${upspeed wlan0} kb/s ${alignr}${upspeedgraph wlan0 8,60 789E2D A7CC5C}
Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph wlan0 8,60 789E2D A7CC5C}
Upload: ${alignr}${totalup wlan0}
Download: ${alignr}${totaldown wlan0}
Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}${else}${if_existing /proc/net/route eth0}
Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,60 789E2D A7CC5C}
Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 789E2D A7CC5C}
Upload: ${alignr}${totalup eth0}
Download: ${alignr}${totaldown eth0}${endif}${else}${if_existing /proc/net/route eth1}
Up: ${upspeed eth1} kb/s ${alignr}${upspeedgraph eth1 8,60 789E2D A7CC5C}
Down: ${downspeed eth1} kb/s ${alignr}${downspeedgraph eth1 8,60 789E2D A7CC5C}
Upload: ${alignr}${totalup eth1}
Download: ${alignr}${totaldown eth1}${endif}${else}${font PizzaDude Bullets:size=14}4${font}   Network Unavailable${endif}


WEATHER ${hr 2}

${if_existing /proc/net/route wlan0}
${voffset -8}${font ConkyWeather:size=24}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=WF}${font}
${voffset -52}${font ConkyWeather:size=34}        ${font}${voffset -40}${font sans:size=24}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=HT –imperial}${font}

${voffset 0}${font}Barometer Tendency: ${alignr}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=BD}
${voffset 0}Humidity: ${alignr}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=HM}
${voffset 0}${font}Wind Speed: ${alignr}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –hideunits –datatype=WS} mph ${execi 500 /usr/bin/conkyForecast –location=USMI0739 –hideunits –datatype=WD}

${else}

${if_existing /proc/net/route eth0}
${voffset -8}${font ConkyWeather:size=24}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=WF}${font}
${voffset -52}${font ConkyWeather:size=34}       ${font}${voffset -40}${font sans:size=22}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=HT –imperial}${font}

${voffset 0}${font}Barometer Tendency: ${alignr}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=BD}
${voffset 0}Humidity: ${alignr}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –datatype=HM}
${voffset 0}${font}Wind Speed: ${alignr}${execi 500 /usr/bin/conkyForecast –location=USMI0739 –hideunits –datatype=WS} mph ${execi 500 /usr/bin/conkyForecast –location=USMI0739 –hideunits –datatype=WD}

${else}
${font PizzaDude Bullets:size=14}4${font}   Weather Unavailable
${endif}

I grabbed the initial setup from the Crunchbang forums.  I grabbed setups from Hanna, cdn, and NWAdawg.  I followed the weather script setup from the Ubuntu forums here.

Feel free to grab this and experiment.  It was a little bit frustrating, but I enjoy seeing what the setup looks like when it’s working!

Blogged with the Flock Browser