Difference between revisions of "User:Byte/Wine tricks"
From Worms Knowledge Base
(New page: (My screen resolution is 1024x768 and the available space after title bar/gnome panels is 1024x675.) Set your wine desktop resolution to the maximum available space (you'll need to experi...) |
|||
(One intermediate revision by the same user not shown) | |||
Line 22: | Line 22: | ||
if [ "$WIDTH" = "$FULL_WIDTH" ]; then | if [ "$WIDTH" = "$FULL_WIDTH" ]; then | ||
echo Moving window to full size position | echo Moving window to full size position | ||
− | xlayout --set --name "Wine desktop" --geometry "${FULL_WIDTH}x${FULL_HEIGHT}${FULL_POS_X}${FULL_POS_Y}" | + | xlayout --set --name "Wine desktop" --geometry \ |
+ | "${FULL_WIDTH}x${FULL_HEIGHT}${FULL_POS_X}${FULL_POS_Y}" | ||
elif [ "$WIDTH" = "$NORMAL_WIDTH" ]; then | elif [ "$WIDTH" = "$NORMAL_WIDTH" ]; then | ||
echo Moving window to normal size position | echo Moving window to normal size position | ||
− | xlayout --set --name "Wine desktop" --geometry "${NORMAL_WIDTH}x${NORMAL_HEIGHT}${NORMAL_POS_X}${NORMAL_POS_Y}" | + | xlayout --set --name "Wine desktop" --geometry \ |
+ | "${NORMAL_WIDTH}x${NORMAL_HEIGHT}${NORMAL_POS_X}${NORMAL_POS_Y}" | ||
fi | fi | ||
fi | fi | ||
Line 41: | Line 43: | ||
This will move the WA window to the top left in the exact position needed to see everything, and then move it back again when the game is over! | This will move the WA window to the top left in the exact position needed to see everything, and then move it back again when the game is over! | ||
You'll need to modify the normal/full size and position values yourself. | You'll need to modify the normal/full size and position values yourself. | ||
+ | |||
+ | <pre>killall _xlayout_wine &>/dev/null; _xlayout_wine &</pre> |
Latest revision as of 14:10, 9 September 2007
(My screen resolution is 1024x768 and the available space after title bar/gnome panels is 1024x675.)
Set your wine desktop resolution to the maximum available space (you'll need to experiment - WA handles variable height but is picky about width).
Get xlayout and run this script just before running WA:
#!/bin/bash FULL_WIDTH=1024 FULL_HEIGHT=675 FULL_POS_X=-1 FULL_POS_Y=+0 NORMAL_WIDTH=640 NORMAL_HEIGHT=480 NORMAL_POS_X=+144 NORMAL_POS_Y=+112 LAST=0 LOST=0 while true; do DATA="`xlayout --show --name "Wine desktop"`" if [ $? -eq 0 ]; then WIDTH="`echo "$DATA"|grep "Window Width:"|awk '{print $3}'`" if [ "$WIDTH" != "$LAST" ]; then if [ "$WIDTH" = "$FULL_WIDTH" ]; then echo Moving window to full size position xlayout --set --name "Wine desktop" --geometry \ "${FULL_WIDTH}x${FULL_HEIGHT}${FULL_POS_X}${FULL_POS_Y}" elif [ "$WIDTH" = "$NORMAL_WIDTH" ]; then echo Moving window to normal size position xlayout --set --name "Wine desktop" --geometry \ "${NORMAL_WIDTH}x${NORMAL_HEIGHT}${NORMAL_POS_X}${NORMAL_POS_Y}" fi fi LAST="$WIDTH" LOST=10 else LOST=$(($LOST + 1)) if [ $LOST -ge 10 ]; then exit 0 fi fi sleep 2 done
This will move the WA window to the top left in the exact position needed to see everything, and then move it back again when the game is over! You'll need to modify the normal/full size and position values yourself.
killall _xlayout_wine &>/dev/null; _xlayout_wine &