I did this very thing not too long ago. I've got mine setup as a cronjob
newMessage:
|
Source code
|
1
2
3
|
#!/bin/bash
# change Kopete's away message
/opt/kde/bin/dcop --user goten kopete KopeteIface setAway "`/home/goten/oneliner`" 0
|
oneliner:
|
Source code
|
1
2
3
4
|
#!/bin/bash
# strip newlines from a short fortune
fort=`/usr/games/fortune -s`
echo ${fort//'\n'//''}
|
crontab excerpt:
|
Source code
|
1
2
|
# update Kopete's away message
*/4 * * * * /home/goten/newMessage
|
You'll need to change them to match your system, obviously. Works quite well.