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 "$_AT_" | cut -d ' ' -f 1)
>
> if [ -n "$wid" ]; then
> xdotool windowactivate "$wid"
> else
> case "$_AT_" in
> mutt)
> urxvt -title mutt -e mutt;;
> MOC)
> urxvt -e mocp;;
> *)
> echo "don't know how to raise '$_AT_'" >&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
--
Received on Wed Oct 26 2011 - 12:48:09 CEST