On 10/26/11 at 12:32pm, Bastien Dejean wrote:
> No, this is not equivalent because the following command:
> 
>     wmctrl -xa mutt
> 
> activates the first client matching the given 'title'.
> 
> You could rather do:
> 
>     #! /bin/sh
> 
>     wid=$(lsw -l | grep -m 1 "$@" | cut -d ' ' -f 1)
> 
>     if [ -n "$wid" ]; then
>         xdotool windowactivate "$wid"
>     else
>         case "$@" in
>             mutt)
>                 urxvt -title mutt -e mutt;;
>             MOC)
>                 urxvt -e mocp;;
>             *)
>                 echo "don't know how to raise '$@'" >&2
>                 exit 1;;
>         esac
>     fi
> 
Thanks for this, Bastien. Is using xdotool's search option slower or otherwise
worse than this?  (btw, i'm not sure I know what lsw is)

Cheers,
Manolo
-- 

Reply via email to