XBMC Community Forum
[Mac OS X] Shortcut for different display modes - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Kodi General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Mac OS X support (/forumdisplay.php?fid=56)
+---- Thread: [Mac OS X] Shortcut for different display modes (/showthread.php?tid=190695)



Shortcut for different display modes - teemue - 2014-03-29 11:17

Is it possible to create a shortcut for XBMC to start it in different display mode than it's supposed to normally use? I'm asking this because I have XBMC running fullscreen on my second monitor but configuration could be done easier in primary monitor with windowed mode. The only option I know is to manually switch display modes through XBMC settings and i'm too lazy to do it every time. Perhaps someone has guts to do some kind of script? Big Grin


RE: Shortcut for different display modes - Ned Scott - 2014-03-30 04:34

In the back of my head I want to say that this is now possible in XBMC v13, but I can't remember for sure, or what the command would look like. I will ask around.


RE: Shortcut for different display modes - teemue - 2014-03-30 12:29

(2014-03-30 04:34)Ned Scott Wrote:  In the back of my head I want to say that this is now possible in XBMC v13, but I can't remember for sure, or what the command would look like. I will ask around.

Thanks, I'm looking forward to it Smile


RE: Shortcut for different display modes - teemue - 2014-04-20 08:18

Any news?


RE: Shortcut for different display modes - Ned Scott - 2014-04-21 06:47

Something like this, I think: http://forum.stmlabs.com/showthread.php?tid=13075&pid=95620#pid95620


RE: Shortcut for different display modes - teemue - 2014-04-21 11:33

I managed to create a little python script to change display mode. The script must be run before running XBMC. Just grab working resolution, screen and screenmode values out of guisettings.xml and toggle them. This example is for my windowed setup, I use another script for fullscreen mode.

Code:
import os
from xml.etree import ElementTree as ET
xfile = os.path.expanduser("~/Library/Application Support/XBMC/userdata/guisettings.xml")
tree = ET.parse(xfile)

#WINDOWED
tree.find('videoscreen/resolution').text = "15"
tree.find('videoscreen/screen').text = "-1"
tree.find('videoscreen/screenmode').text = "WINDOW"

tree.write (xfile)