All pastes #89788 Raw Edit

mattdev121

public shellscript v1 · immutable
#89788 ·published 2006-07-17 00:02 UTC
rendered paste body
#!/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/todoEDITOR=/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 variablesLINES=`wc -l < $RUNPATH/datafile`TIMES=0while [ $TIMES -lt $LINES ]; do# Line by line, take data from datafile and output it with the tags around itecho '<tspan x="65"' 'y="'"$[TIMES*60+60]"'"' 'id="'"tspan$TIMES"'"'">"echo "`cat $RUNPATH/datafile|head -n $[TIMES+1]|tail -n 1`"((TIMES++))echo "</tspan>"done# Close tagsecho "</text>"echo "</g>"echo "</svg>"} > $RUNPATH/cubetodo.svgecho "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\]