Re: [dev] Focusing on windows by name

From: Manolo Martínez <manolo_AT_austrohungaro.com>
Date: Wed, 26 Oct 2011 12:48:09 +0200

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

This archive was generated by hypermail 2.3.0 : Wed Oct 26 2011 - 12:48:04 CEST