All pastes #797916 Raw Edit

Unnamed

public text v1 · immutable
#797916 ·published 2007-11-26 12:24 UTC
rendered paste body
while xprop -display :0.1 -root | grep mythfrontend ; do
#active window doesn't exist in 0.1 :((
  if ! xprop -display :0.1 -id `xprop -display :0.1 -root _NET_ACTIVE_WINDOW | cut -c 41-` ; then
     echo "Selecting the right window!"
     if xprop -display :0.1 -root | grep xine ; then
       DISPLAY=:0.1 wmctrl -a xine
     elif xprop -display :0.1 -root | grep mplayer ; then
        DISPLAY=:0.1 wmctrl -a mplayer
     else
       DISPLAY=:0.1 wmctrl -a mythfrontend
     fi
  fi
done