Created
September 26, 2014 10:58
-
-
Save vittorioromeo/2d855f06d16f850e492e to your computer and use it in GitHub Desktop.
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/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