#!/bin/sh # Matt Manjos, 2006 - This script is GPL: http://www.gnu.org/copyleft/gpl.html # A script to create a png of todo items and apply it to compiz/cube # Version 0.3 # Configuration: RUNPATH=/home/mmanjos/.xgl/todo EDITOR=/usr/bin/pico # User edits datafile with editor $EDITOR $RUNPATH/datafile # Create svg of desired todo list, taking template.svg as a header { cat $RUNPATH/template.svg # Initialize variables LINES=`wc -l < $RUNPATH/datafile` TIMES=0 while [ $TIMES -lt $LINES ]; do # Line by line, take data from datafile and output it with the tags around it echo '" echo "`cat $RUNPATH/datafile|head -n $[TIMES+1]|tail -n 1`" ((TIMES++)) echo "" done # Close tags echo "" echo "" echo "" } > $RUNPATH/cubetodo.svg echo "Working..." /usr/bin/rsvg-convert -o $RUNPATH/cubetodo.png < $RUNPATH/cubetodo.svg # Set cube image as nothing, and then as generated png to invoke an update /usr/bin/gconftool-2 -s -t list --list-type string /apps/compiz/plugins/cube/screen0/options/images \[/nothing\] sleep 1 /usr/bin/gconftool-2 -s -t list --list-type string /apps/compiz/plugins/cube/screen0/options/images \[$RUNPATH/cubetodo.png\]