Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
[kopete] and fortune
Hi!
Can I use fortune in kopete to create away-messages?
Thanks,
Seb
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.