Note: I got the scripts and adapted them from http://conky.sourceforge.net/screenshots.html
my conkyrc:
Code:
# set to yes if you want Conky to be forked in the background
background no
cpu_avg_samples 2
net_avg_samples 2
out_to_console no
# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
#font 8x13
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
xftfont Comic Sans MS:size=10
own_window_transparent no
own_window_colour hotpink
# Text alpha when using Xft
xftalpha 0.8
on_bottom yes
# mail spool
mail_spool $MAIL
# Update interval in seconds
update_interval 1
# Create own window instead of using desktop (required in nautilus)
own_window no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
#minimum_size 280 5
#maximum_width 150
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 10
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors
default_color green
default_shade_color green
default_outline_color green
# Text alignment, other possible values are commented
#alignment top_left
#minimum_size 10 10
gap_x 13
gap_y 13
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer no
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# boinc (seti) dir
# seti_dir /opt/seti
# Possible variables to be used:
#
# Variable Arguments Description
# acpiacadapter ACPI ac adapter state.
# acpifan ACPI fan state
# acpitemp ACPI temperature.
# adt746xcpu CPU temperature from therm_adt746x
# adt746xfan Fan speed from therm_adt746x
# battery (num) Remaining capasity in ACPI or APM
# battery. ACPI battery number can be
# given as argument (default is BAT0).
# buffers Amount of memory buffered
# cached Amount of memory cached
# color (color) Change drawing color to color
# cpu CPU usage in percents
# cpubar (height) Bar that shows CPU usage, height is
# bar's height in pixels
# downspeed net Download speed in kilobytes
# downspeedf net Download speed in kilobytes with one
# decimal
# exec shell command Executes a shell command and displays
# the output in torsmo. warning: this
# takes a lot more resources than other
# variables. I'd recommend coding wanted
# behaviour in C and posting a patch :-).
# execi interval, shell Same as exec but with specific interval.
# command Interval can't be less than
# update_interval in configuration.
# fs_bar (height), (fs) Bar that shows how much space is used on
# a file system. height is the height in
# pixels. fs is any file on that file
# system.
# fs_free (fs) Free space on a file system available
# for users.
# fs_free_perc (fs) Free percentage of space on a file
# system available for users.
# fs_size (fs) File system size
# fs_used (fs) File system used space
# hr (height) Horizontal line, height is the height in
# pixels
# i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
# may be omitted if you have only one I2C
# device. type is either in (or vol)
# meaning voltage, fan meaning fan or temp
# meaning temperature. n is number of the
# sensor. See /sys/bus/i2c/devices/ on
# your local computer.
# kernel Kernel version
# loadavg (1), (2), (3) System load average, 1 is for past 1
# minute, 2 for past 5 minutes and 3 for
# past 15 minutes.
# machine Machine, i686 for example
# mails Mail count in mail spool. You can use
# program like fetchmail to get mails from
# some server using your favourite
# protocol. See also new_mails.
# mem Amount of memory in use
# membar (height) Bar that shows amount of memory in use
# memmax Total amount of memory
# memperc Percentage of memory in use
# new_mails Unread mail count in mail spool.
# nodename Hostname
# outlinecolor (color) Change outline color
# pre_exec shell command Executes a shell command one time before
# torsmo displays anything and puts output
# as text.
# processes Total processes (sleeping and running)
# running_processes Running processes (not sleeping),
# requires Linux 2.6
# shadecolor (color) Change shading color
# stippled_hr (space), Stippled (dashed) horizontal line
# (height)
# swapbar (height) Bar that shows amount of swap in use
# swap Amount of swap in use
# swapmax Total amount of swap
# swapperc Percentage of swap in use
# sysname System name, Linux for example
# time (format) Local time, see man strftime to get more
# information about format
# totaldown net Total download, overflows at 4 GB on
# Linux with 32-bit arch and there doesn't
# seem to be a way to know how many times
# it has already done that before torsmo
# has started.
# totalup net Total upload, this one too, may overflow
# updates Number of updates (for debugging)
# upspeed net Upload speed in kilobytes
# upspeedf net Upload speed in kilobytes with one
# decimal
# uptime Uptime
# uptime_short Uptime in a shorter format
#
# seti_prog Seti@home current progress
# seti_progbar (height) Seti@home current progress bar
# seti_credit Seti@hoome total user credit
# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
#${font Dungeon:style=Bold:pixelsize=10}I can change the font as well
#${font Verdana:size=10}as many times as I choose
#${font Perry:size=10}Including UTF-8,
#${font Luxi Mono:size=10}justo como este texto que o google traduz fêz o português
# stuff after 'TEXT' will be formatted on screen
#${font Grunge:size=12}${time %a %b %d}${alignr -25}${time %k:%M}
TEXT
$nodename - $sysname $kernel on $machine
${color 000000 5000a0}${color green}Today is: ${time %a, }${time %e %B %G}
${color 000000 5000a0}${time %Z, }${time %H:%M:%S} Don't Lag....too much!
${color #5b6dad}$stippled_hr
${color lightgrey}Uptime:$color $uptime ${color lightgrey}- Load:$color $loadavg
${color lightgrey}CPU Usage:${color #5000a0} ${cpu}% ${cpubar}
${color black}${cpugraph 000000 5000a0}
${color lightgrey}RAM Usage:$color $mem/$memmax - $memperc% $membar
${color lightgrey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar}
${color lightgrey}Processes:$color $processes ${color grey}Running:$color $running_processes
${color}Name PID CPU% MEM%
${color #ddaa00} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color}Mem usage
${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color #5b6dad} $stippled_hr
${color lightgrey}Networking:
Down:${color #8844ee} ${downspeed ath0} k/s${color lightgrey} ${offset 70}Up:${color #22ccff} ${upspeed ath0} k/s
${color black}${downspeedgraph ath0 32,150 ff0000 0000ff} $alignr${color black}${upspeedgraph ath0 32,150 0000ff ff0000}
${color green}File Systems:
${color #5b6dad}/ ${color #7f8ed3}${fs_used /}/${fs_size /} ${color #7f8ed3}${fs_bar /}
${color #5b6dad}~ ${color #7f8ed3}${fs_used /media/LACIE/}/${fs_size /media/LACIE/} ${color #7f8ed3}${fs_bar /media/LACIE/}
${color #5b6dad} $stippled_hr${if_running amarokapp}
${color}${alignc}Listening to:${color #22ccff}
${alignc}${execi 10 /home/mitch/amarok.sh artist}
${alignc}${execi 10 /home/mitch/amarok.sh title}
${execibar 1 /home/mitch/amarok.sh progress}
${alignc}"${execi 10 /home/mitch/amarok.sh album}"
${alignc}${execi 10 /home/mitch/amarok.sh year} - ${color #22ccff}${alignc}${execi 10 /home/mitch/amarok.sh genre}
${color #5b6dad} $stippled_hr
${alignc}Collection Information
Artists: ${color #22ccff}${execi 5 /home/mitch/amarok.sh totalArtists} $color${alignr}Compilations: ${color #22ccff}${execi 10 /home/mitch/amarok.sh totalCompilations}$color
Albums: ${color #22ccff}${execi 5 /home/mitch/amarok.sh totalAlbums} $color${alignr}Genres: ${color #22ccff}${execi 10 /home/mitch/amarok.sh totalGenres}$color
Tracks: ${color #22ccff}${execi 5 /home/mitch/amarok.sh totalTracks}
${color #5b6dad} $stippled_hr
${alignc}Collection Statisctics
Most songs by ${color #22ccff}${execi 10 /home/mitch/amarok.sh most_songs_by_artist} $alignr${color}(${color #22ccff}${execi 10 /home/mitch/amarok.sh most_songs_by_artist_n}${color})
Most songs are ${color #22ccff}${execi 10 /home/mitch/amarok.sh most_songs_are_genre} $alignr${color}(${color #22ccff}${execi 10 /home/mitch/amarok.sh most_songs_are_genre_n}${color})
Most songs during ${color #22ccff}${execi 10 /home/mitch/amarok.sh most_songs_during_year} $alignr${color}(${color #22ccff}${execi 10 /home/mitch/amarok.sh most_songs_during_year_n}${color})
Most albums by ${color #22ccff}${execi 10 /home/mitch/amarok.sh most_albums_by_artist} $alignr${color}(${color #22ccff}${execi 10 /home/mitch/amarok.sh most_albums_by_artist_n}${color})
Most albums are ${color #22ccff}${execi 10 /home/mitch/amarok.sh most_albums_are_genre} $alignr${color}(${color #22ccff}${execi 10 /home/mitch/amarok.sh most_albums_are_genre_n}${color})
Most albums during ${color #22ccff}${execi 10 /home/mitch/amarok.sh most_albums_during_year} $alignr${color}(${color #22ccff}${execi 10 /home/mitch/amarok.sh most_albums_during_year_n}${color})$endif
${color #5b6dad}$stippled_hr
${color #5b6dad}Local Weather:
${color #7f8ed3}${execi 1800 /home/mitch/Documents/weather/weather.sh}
weather scripts:
weather.sh:
Code:
#!/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 orignal 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="your loc id"
# s=standard units, m=metric units
UNITS=s
# where this script and the XSLT lives
RUNDIR=/home/mitch/Documents/weather
# 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:
Code:
<!--
This XSLT is used to translate an XML response from the weather.com
XML API.
You can format this file to your liking. Two things you may feel
like doing:
1) Modify the layout of the fields or static text already defined
2) Add other fields from the XML response file that aren't referenced in this
XSLT. You can grab a full list by just doing a:
wget "http://xoap.weather.com/weather/local/$LOCID?cc=*&unit=$UNITS"
(change $LOCID and $UNITS to suit your needs)
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:output method="text" disable-output-escaping="yes"/>
<xsl:template match="weather">
<xsl:apply-templates select="cc"/>
<xsl:apply-templates select="dayf/day[@d='1']"/>
</xsl:template>
<xsl:template match="cc">
<xsl:text>Location: </xsl:text><xsl:value-of select="obst"/>
<xsl:text>:
</xsl:text>
<xsl:text> Temperature: </xsl:text><xsl:value-of select="tmp"/><xsl:value-of select="/weather/head/ut"/>
<xsl:if test="tmp != flik">
<xsl:text>
Feels Like: </xsl:text><xsl:value-of select="flik"/><xsl:value-of select="/weather/head/ut"/>
</xsl:if>
<xsl:text>
Conditions: </xsl:text><xsl:value-of select="t"/>
<xsl:text>
Wind: </xsl:text>
<xsl:choose>
<xsl:when test="wind/s = 'calm'"><xsl:text>0</xsl:text></xsl:when>
<xsl:otherwise><xsl:value-of select="wind/s"/></xsl:otherwise>
</xsl:choose>
<xsl:value-of select="/weather/head/us"/>
<xsl:choose>
<xsl:when test="wind/s = 'calm'"><xsl:text>(0mph)</xsl:text></xsl:when>
<xsl:otherwise><xsl:text> (</xsl:text><xsl:value-of select="round(wind/s * 0.6214)"/><xsl:text>mph)</xsl:text></xsl:otherwise>
</xsl:choose>
<xsl:text> (</xsl:text><xsl:value-of select="wind/t"/>
<xsl:text>)</xsl:text>
</xsl:template>
<xsl:template match="dayf/day[@d='1']">
<xsl:text>
Tomorrow: </xsl:text><xsl:value-of select="low"/><xsl:value-of select="/weather/head/ut"/>
<xsl:text> to </xsl:text><xsl:value-of select="hi"/><xsl:value-of select="/weather/head/ut"/>
<xsl:text>, </xsl:text><xsl:value-of select="part[@p='d']/t"/>
<xsl:text>
</xsl:text><xsl:value-of select="/weather/a/t"/>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
amarokscript:
Code:
#!/bin/bash
# I copied the script from http://conky.sourceforge.net/screenshots.html
#amaroK info display script by eirc <eirc.eirc@gmail.com>
# requirements: amaroK (!)
# for Collection stats to work amarok must be using
# mySQL to store it's collection
case "$1" in
# Now Playing Info
artist) dcop amarok player artist ;;
title) dcop amarok player title ;;
album) dcop amarok player album ;;
year) dcop amarok player year ;;
genre) dcop amarok player genre ;;
progress)
curr=`dcop amarok player trackCurrentTime`
tot=`dcop amarok player trackTotalTime`
if (( $tot )); then
expr $curr \* 100 / $tot
fi
;;
# Collection Info
totalArtists) dcop amarok collection totalArtists ;;
totalAlbums) dcop amarok collection totalAlbums ;;
totalTracks) dcop amarok collection totalTracks ;;
totalGenres) dcop amarok collection totalGenres ;;
totalCompilations) dcop amarok collection totalCompilations ;;
# Collection Stats
most_songs_by_artist) dcop amarok collection query 'SELECT t1.name FROM artist t1 INNER JOIN tags t2 ON t1.id = t2.artist GROUP BY t2.artist ORDER BY COUNT(t2.artist) DESC LIMIT 1;' ;;
most_songs_by_artist_n) dcop amarok collection query 'SELECT count(t2.artist) FROM artist t1 INNER JOIN tags t2 ON t1.id = t2.artist GROUP BY t2.artist ORDER BY COUNT(t2.artist) DESC LIMIT 1;' ;;
most_songs_are_genre) dcop amarok collection query 'SELECT t1.name FROM genre t1 INNER JOIN tags t2 ON t1.id = t2.genre GROUP BY t2.genre ORDER BY COUNT(t2.genre) DESC LIMIT 1;' ;;
most_songs_are_genre_n) dcop amarok collection query 'SELECT count(t2.genre) FROM genre t1 INNER JOIN tags t2 ON t1.id = t2.genre GROUP BY t2.genre ORDER BY COUNT(t2.genre) DESC LIMIT 1;' ;;
most_songs_during_year) dcop amarok collection query 'SELECT t1.name FROM year t1 INNER JOIN tags t2 ON t1.id = t2.year GROUP BY t2.year ORDER BY COUNT(t2.year) DESC LIMIT 1;' ;;
most_songs_during_year_n) dcop amarok collection query 'SELECT count(t2.year) FROM year t1 INNER JOIN tags t2 ON t1.id = t2.year GROUP BY t2.year ORDER BY COUNT(t2.year) DESC LIMIT 1;' ;;
most_albums_by_artist) dcop amarok collection query 'SELECT name FROM artist WHERE id=(SELECT t1.artist from (SELECT artist FROM tags GROUP BY album) AS t1 GROUP BY t1.artist ORDER BY count(artist) DESC LIMIT 1);' ;;
most_albums_by_artist_n) dcop amarok collection query 'SELECT count(artist) from (SELECT artist FROM tags GROUP BY album) AS t1 GROUP BY t1.artist ORDER BY count(artist) DESC LIMIT 1;' ;;
most_albums_are_genre) dcop amarok collection query 'SELECT name FROM genre WHERE id=(SELECT t1.genre from (SELECT genre FROM tags GROUP BY album) AS t1 GROUP BY t1.genre ORDER BY count(genre) DESC LIMIT 1);' ;;
most_albums_are_genre_n) dcop amarok collection query 'SELECT count(genre) from (SELECT genre FROM tags GROUP BY album) AS t1 GROUP BY t1.genre ORDER BY count(genre) DESC LIMIT 1;' ;;
most_albums_during_year) dcop amarok collection query 'SELECT name FROM year WHERE id=(SELECT t1.year from (SELECT year FROM tags GROUP BY album) AS t1 GROUP BY t1.year ORDER BY count(year) DESC LIMIT 1);' ;;
most_albums_during_year_n) dcop amarok collection query 'SELECT count(year) from (SELECT year FROM tags GROUP BY album) AS t1 GROUP BY t1.year ORDER BY count(year) DESC LIMIT 1;' ;;
esac
Bookmarks