Last active
August 29, 2015 14:14
-
-
Save robertely/82d288f83d08916200cf to your computer and use it in GitHub Desktop.
Plex: Actually shut down when shutdown is issued.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export XBMC_HOME=/opt/plexhometheater/share/XBMC | |
#Use export AE_ENGINE=SOFT to disable pulse audio | |
#export AE_ENGINE=SOFT | |
# VERY STUPID HACK TO MAKE SURE IT STARTS ON THE SECOND SCREEN. | |
wmctrl -k on | |
xdotool mousemove 2823 849 click 1 | |
#Stupid hack for non-fucking-up-dual-screens full screen. | |
(sleep 1; wmctrl -r "XBMC Media Center" -e '0,1920,0,1920,1080') & | |
(sleep 2; wmctrl -r "XBMC Media Center" -b toggle,fullscreen) & | |
/opt/plexhometheater/bin/plexhometheater | |
#Stupid hack to make sure plex actually shuts down the machine. | |
if [ $? -eq 64 ]; then | |
/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added boarder-less full screen start to prevent it fucking up my display setup.