#!/usr/bin/env python

import subprocess
import common
import time

common.xbmc("GUI.ShowNotification", {"title":"Powering Off!","message":"See you next time..."})
common.xbmc("GUI.ActivateWindow", {"window":"screensaver"})
common.xbmc("Player.Stop", {"playerid": 1})
time.sleep(1)
subprocess.call( "xrandr --output VGA-0 --off", shell=True )
#!/usr/bin/env python

import subprocess
import common

subprocess.call( "xrandr --output VGA-0 --auto", shell=True )
common.xbmc("GUI.ActivateWindow", {"window":"home"})
#!/usr/bin/env python

import common
import sys

if len(sys.argv) < 2:
	print "Usage: watch_channel.py <channel>"
        sys.exit()
        
channel = sys.argv[1]
print "Changing channel to: " + channel

common.xbmc("GUI.ShowNotification", {"title":"Live TV","message":"Starting live tv..."})
common.xbmc("Player.Open", {"item":{"channelid":channel}})