#!/bin/sh

export WOW_PATH=/path/to/World/of/Warcraft/here

#Uncomment this if you run xscreensaver and don’t want it to run in your other X session while you play WoW
#pkill xscreensaver
X :3 -ac -terminate & cd "${WOW_PATH}"
#Takes some time for the X server to get up and running, feel free to lower this if you can get away with it
sleep 5
DISPLAY=:3 /path/to/screenswap &
DISPLAY=:3 wine WoW.exe -opengl &
#If you want to have a terminal up in the other window (so you can launch stuff)
#DISPLAY=:3.1 xterm &
##########
##Need to wait a bit before turning character repeats off so WoW has enough time to get a window up
sleep 10
#I turn character repeats off as I encountered a jitter bug when holding down a key to move
DISPLAY=:3 xset r off
#This is how you turn repeats back on, not needed typically since you will be just leaving the X session
#DISPLAY=:3 xset r on

#If you turned xscreensaver off you probably want to turn it back on
#xscreensaver &


