[openbox] script to focus and raise window demanding attention

John Eikenberry jae at zhar.net
Sat Feb 27 09:37:37 EST 2010


Vaughn Dickson wrote:

> I'm running Openbox with Gnome and windows demanding attention show
> in the taskbar with a yellow highlight, usually skype IMs or
> something. I've created the following bash script that I bind to a
> hotkey, but it's not very quick. Is there a better way? I'd also

Have you looked at devilspie or winwrangler? They might be able to do
something like this more efficiently though they are daemons, not something
that would be bound to a key.

http://burtonini.com/blog/computers/devilspie
https://launchpad.net/winwrangler

> like to bind it to W-`, but it doesn't work. I've also tried
> ` and that chokes too.
> 
> for id in `wmctrl -l | cut -d " " -f 1`; do
>    xprop -id $id | grep "_NET_WM_STATE_DEMANDS_ATTENTION" 2>&1 > /dev/null
>    if [ "$?" = "0" ]; then
>        wmctrl -i -a $id
>        exit 0
>    fi
> done
> exit 1
> 
> 
> 
> Thanks,
> Vaughn
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
> 

-- 

John Eikenberry
[jae at zhar.net - http://zhar.net]
[PGP public key @ http://zhar.net/jae_at_zhar_net.gpg]
______________________________________________________________
"Perfection is attained, not when no more can be added, but when no more 
 can be removed." -- Antoine de Saint-Exupery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://icculus.org/pipermail/openbox/attachments/20100227/9311e1ef/attachment.pgp>


More information about the openbox mailing list