[openbox] Go to a program if it's already running

Wujek Srujek wujek.srujek at gmail.com
Fri Jul 19 02:43:09 EDT 2013


I didn't know xdotool was to manage windows, I though it was only to
generate events (like do a mouse click in the top left corner of the
screen or moving a mouse somewhere). Thanks for the tip.

On 7/19/13, Anthony Thyssen <A.Thyssen at griffith.edu.au> wrote:
> On Thu, 18 Jul 2013 20:44:12 +0200
> Antoine <antoine.vigouroux at numericable.fr> wrote:
> | On 18/07/2013 19:43, Wujek Srujek wrote:
> | > !/usr/bin/bash
> | >
> | > if [ "$#" -gt 1 ]; then
> | >     echo "Has arguments, starting..."
> | >     "$@" &
> | >     exit
> | > fi
> | >
> | > CMD="$1"
> | > app="$(wmctrl -lx | grep "$CMD" | head -n 1)"
> | > if [ -z "$app" ]; then
> | >     echo "App not found, starting..."
> | >     "$CMD" &
> | > else
> | >     id="$(echo $app | cut -f 1 -d ' ')"
> | >     echo "Refocusing app..."
> | >     wmctrl -i -R "$id"
> | > fi
> | >
> | Thanks a lot. I had never heard of wmctrl, that's awesome.
>
>
> There are a number of such programs, many like wmctrl are old and
> no longer being developed.  The one that is in active development is
> xdotool.
>
> Here is a list...
>   xwit          Modify Size Position, Iconification of windows.
>                 This fails with some applications.
>   wmctrl        Modify Windows (and desktops) with wm like controls
>                 Each provide quite different sets of posible actions
>   wmiface       A old KDE3-based window controller
>   xdotool       Window modifaction but also X event generation
>                 (see Event Generators below)
>
>
> This comes from a personal list of X windows software (started a very
> long time ago)
> http://www.ict.griffith.edu.au/anthony/info/X/progs.summary
>
>
>
>
>   Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
>  --------------------------------------------------------------------------
>       Warning - the varmits in these woods are NOT tame.
>           Travellers are warning to stay on the road,
>       as their remains will not be returned to their kin.  -- The Lerdki
>                                         Robert Heinlein's, "Glory Road"
>  --------------------------------------------------------------------------
>    Anthony's Castle     http://www.ict.griffith.edu.au/anthony/
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>


More information about the openbox mailing list