Bug 93422 - addition of execute a program to custom notifications
Summary: addition of execute a program to custom notifications
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Main Application (other bugs)
Version First Reported In: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 98835 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-17 05:46 UTC by mchugh19@yahoo.com
Modified: 2011-03-16 22:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mchugh19@yahoo.com 2004-11-17 05:46:44 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

It would be nice to have the "execute a program" ability in the custom notifications. A it is now I must run my totally awesome script to make dcop calls. 

$ cat user_online
#!/bin/sh

##### name to search for #######
name=someuser
################################

if [ dcop kdesktop 2>/dev/null ]
then
        exit 3
fi

kopete_running ()
{
        if [ dcop kopete 2>/dev/null ]
        then
                exit 2
        fi
}

kopete_running
old_paper=`dcop kdesktop KBackgroundIface currentWallpaper 1`

while true; do
        kopete_running
        dcop kopete KopeteIface onlineContacts | grep $name > /tmp/online
        if [ `wc -c /tmp/online | cut -d " " -f 1` -gt 0 ]
        then
                dcop kdesktop KBackgroundIface setWallpaper "$HOME/media/pictures/llama.jpg" 1
        else
                dcop kdesktop KBackgroundIface setWallpaper "$old_paper" 1
        fi
        rm /tmp/online
        sleep 5s
done


Also the list might better serve this question, but laziness is overtaking me. Is there an easy way to see if a user is online from their name, not just uid? Also how can I look up a uid from username?
Comment 1 Olivier Goffart 2004-11-29 19:37:00 UTC
Why not execute this program with all notificaiton (you can do that with KNotify)  and in your program, try to extract the contact name.
Comment 2 Olivier Goffart 2005-04-23 14:35:42 UTC
*** Bug 98835 has been marked as a duplicate of this bug. ***
Comment 3 Degand Nicolas 2006-10-18 20:19:55 UTC
This bug can be closed now, I guess, if I understand it well.
Comment 4 mchugh19@yahoo.com 2006-12-18 16:47:34 UTC
Sorry for the lack of clarity, rereading this report I don't know what I was thinking. Anyway the request is for an option under custom notifications for running a script for executable. Otherwise the user is forced to check each time any users online state changes for a specific user's online state in order to change something (like in the example above make a dcop call). As of 0.12.3 that custom notification option is not there.
Comment 5 Lamarque V. Souza 2011-03-16 22:28:50 UTC
Closing this bug since Kopete from KDE SC 4.6.1 at least already has this option.