You are not logged in.

#1 2009-06-24 15:57:51

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Conky as a Todo list

Hi,

I am slowly setting up Conky to display my ToDos on the desktop in Gnome

atm using this after TEXT

$color
${color white}ToDo $color
${execi 30 cat /home/mrgreen/Desktop/.stuffigottado}

Trying to find a cool font for 'Todo' ?

I have now got a system running where work stuff starts with a '-'

So a quick look and I know whats what... could have run two conkyrcs but hey lifes complicated enough wink

Thus:

- Sell Fridge
- Gift Aid
Ipods
Weekend
Holidays
- Auction
Holiday

Now all I need is a way to edit list from cli

MrG


Mr Green

Offline

#2 2009-06-24 16:23:39

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Conky as a Todo list

how about a bash script?

#!/bin/bash

file="$HOME/.todo"

arg=$1
shift

case $1 in
   add)
   echo "$@" >> $file
   ;;
   addwork)
   echo "- $@" >> $file
   ;;
   finish)
   grep -Eiv "^$@$" $file >> $file.tmp
   mv $file.tmp $file
   ;;
   *)
   exit 1
   ;;
esac

exit 0

this is totally untested, and my grep command might be wrong.  but it should work, no?

Offline

#3 2009-06-24 16:46:39

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Conky as a Todo list

You could use a sed / dmenu (vertical) editor

#! /bin/bash
#make sure ~/.todo exists and has at least 1 line in it

sedcmd=$(cat -n ~/.todo | dmenu -l 5 -p "\`sed -i ... ~/.todo\`")
[[ -z "$sedcmd" || "$sedcmd" =~ ^[[:blank:]] ]] && exit

sed -i "$sedcmd" ~/.todo

and use it like 5d, or 3a -more work, or 3s/work/play/

sed doesn't seem to work on an empty file though.

Offline

#4 2009-06-24 16:50:10

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Conky as a Todo list

brisbin33 wrote:

this is totally untested, and my grep command might be wrong.  but it should work, no?

I like it... smile. will test and report back

Thanks

MrG


Mr Green

Offline

#5 2009-06-25 06:02:06

the_isz
Member
Registered: 2009-04-14
Posts: 280

Re: Conky as a Todo list

I recently wrote a script formatting the output of calcurse to be used in conky. That way you're not restricted to todo's, but can also
have appointments and can filter out the ones which are too far in the future. calcurse gives you a curse-based frontend to edit your
todo's and appointments and my script allows you to format them quite nicely for conky to interpret smile

If you're interested, you can find it in my blog.

Offline

Board footer

Powered by FluxBB