[openbox] script to focus and raise window demanding attention

Vaughn Dickson vaughnd at gmail.com
Sun Feb 28 01:52:24 EST 2010


Bound to W-r:

#!/bin/bash
activeWinIdLine=`xprop -root | grep _NET_ACTIVE_WINDOW\(WINDOW\) `
activeWinId="${activeWinIdLine:40}"

echo $activeWinId > ~/activeWinId
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


Bound to W-S-r:

#!/bin/bash
if [ -f ~/activeWinId ]; then
	origWinId=`cat ~/activeWinId`
	wmctrl -i -a $origWinId
fi



On 27 February 2010 22:40, John Eikenberry <jae at zhar.net> wrote:

> Vaughn Dickson wrote:
>
> > Thanks, I'll check them out. The script actually isn't that slow in daily
> > use, so I'm happy with it. Plus I've added on some extra tweaks so I can
> hit
> > W-r to go to the window needing attention, and then W-S-r to go back to
> the
> > original, even if I've viewed other windows in between.
>
> Mind posting your set of scripts/bindings? I probably won't use them at the
> moment but I'm curious how you implemented them. Thanks.
>
> --
>
> 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
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkuJg04ACgkQMVBeMLjc14Jo2ACg2AllG0TXRmawfr5hgEDN90+X
> dAgAoNpCNthnxEBZQuQ3O6CfQvP+WwDu
> =ZnuW
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20100228/f186f593/attachment.htm>


More information about the openbox mailing list