[openbox] script to focus and raise window demanding attention

Vaughn Dickson vaughnd at gmail.com
Wed Feb 24 12:03:23 EST 2010


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 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


More information about the openbox mailing list