Re: [wmii] Popups in all views: is it possible ?

From: Sean Russell <wmii_AT_ser1.net>
Date: Thu, 14 Sep 2006 11:34:00 -0400

> Francis GUDIN wrote:
> > I must use Ekiga (formerly GnomeMeeting). When an incoming call
> > is placed, Ekiga raises a small window asking me "accept
> > it/reject it/whatever". This "pops up" with those tags inherited
> > from its parents.
>
> You can listen for the CreateClient event via wmiir and check the
> title or class information of the created client to determine
> whether it is the Ekiga pop-up window. If that is the case, you can:
>
> 1. have the popup appear on all views by tagging it with all current
> tags. This way, you won't need to know all possible tags you will be
> using before-hand (for /def/rules).

You can force the pop-up to your current view with this bit of code:
        
        POPUPS="Ekiga|kopete"

        wmiir read /event 2>/dev/null |
        while read event
        do
            set -f
            set -- $event
            set +f
            type="$1"; shift
            parms="$@"
            case "$type" in
            CreateClient)
                target_view=`wmiir read /ctl | awk '/^view/ {print $2}'`
                if [[ `wmiir read /client/${params}/props | egrep -q "${POPUPS}"` == 0 ]]
                then
                        echo -n $target_view | wmiir write /client/${parms}/tags
                fi
                ;;
            esac
        done

Just stick the CreateClient) ... ;; block in your wmiirc, and define the POPUPS
variable at the top.

Note: this code has not been tested; you may have to tweak it.

--- SER
Received on Thu Sep 14 2006 - 17:34:28 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:13:48 UTC