Skip to content

Instantly share code, notes, and snippets.

@albertohm
Created March 3, 2012 01:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertohm/1963278 to your computer and use it in GitHub Desktop.
Save albertohm/1963278 to your computer and use it in GitHub Desktop.
Launch XBMC adjusting screen
#! /bin/bash
STATUS=0
WINCLASS=xbmc.bin.xbmc.bin
DISPLAY=:0.0
SLEEPDELAY=1
/usr/bin/xbmc "$@" &
while [ $STATUS -eq 0 ]
do
sleep $SLEEPDELAY
STATUS=`wmctrl -x -l | grep $WINCLASS | wc -l | awk '{print $1}'`
done
## move to plasma (left)
wmctrl -x -r $WINCLASS -e 0,0,0,1280,720
## move back to projector (right)
wmctrl -x -r $WINCLASS -e 0,1280,0,800,600
wmctrl -x -r $WINCLASS -b toggle,fullscreen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment