Skip to content

Instantly share code, notes, and snippets.

@vittorioromeo
Created September 26, 2014 10:58
Show Gist options
  • Save vittorioromeo/2d855f06d16f850e492e to your computer and use it in GitHub Desktop.
Save vittorioromeo/2d855f06d16f850e492e to your computer and use it in GitHub Desktop.
#!/bin/bash
function finish
{
xrandr --output HDMI-0 --off
xrandr --output DVI-I-0 --off
xrandr --output HDMI-0 --primary --mode 1920x1080 --pos 0x0
xrandr --output DVI-I-0 --mode 1680x1050 --pos -1920x0
}
trap finish EXIT
xrandr --output HDMI-0 --off
xrandr --output DVI-I-0 --off
xrandr --output DVI-I-0 --off
xrandr --output HDMI-0 --primary --mode 640x480
export WINEDEBUG=-all
WINEDEBUG=-all wine "$@"
sleep 2
processes=( $(ps -A | grep -P "((th|TH)[0-9]+.*)|vpatch.*" | sed 's/^ *//' | cut -d' ' -f1) )
for i in "${processes[@]}"
do
while [ -e "/proc/$i" ]; do sleep 1; done
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment