You are not logged in.
Pages: 1
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
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
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?
//github/
Offline
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
this is totally untested, and my grep command might be wrong. but it should work, no?
I like it... . will test and report back
Thanks
MrG
Mr Green
Offline
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
If you're interested, you can find it in my blog.
Offline
Pages: 1