SELECTIONS="`echo "$RESCHOICES" | tr "\n" "X" | sed -e 's/X/ off /g'`"
#echo "$SELECTIONS"
TESTINDEX="`Xdialog --left --title "Xorg Resolution Changer" --stdout --no-tags --radiolist "Please choose a resolution to test.\n\nNote: After testing a resolution, you\nwill be given the opportunity to make\nit permanent if you wish.\nIF THE NEW RESOLUTION DOES NOT WORK, WAIT\n60 SECONDS OR PRESS CTRL-ALT-BACKSPACE" 0 0 8 $SELECTIONS 2> /dev/null `"
xmessage -bg "violet" -center -timeout 60 -title "Xorg Resolution Changer" -buttons Permanent:12,Session:11,RESTORE_DEFAULT:10 "X is now running at a resolution of ${TESTX}x${TESTY}
at a vertical refresh frequency of ${TESTVR} Hz.
Note:
some window managers, such as JWM, do not work
properly after a resolution change, however they
do work properly after the w.m. is restarted with
the new resolution (see Shutdown menu).
Do you want to make this permanent?...
Or, just keep this resolution for current session?...
Or, go back to default resolution?...
IF YOU DO NOT CHOOSE IN 60 SECONDS, X
WILL RESTORE TO PREVIOUS RESOLUTION"
RETVAL=$?
if [ $RETVAL -lt 11 ];then
rm -f /etc/xrandrindex
xrandr -s 0
exit
fi
if [ $RETVAL -eq 11 ];then #keep current session only.
rm -f /etc/xrandrindex
exit
fi
echo -n "$TESTINDEX" > /etc/xrandrindex
Xdialog --title "Xorg Resolution Changer" --msgbox "The next time you boot Puppy, X will start\nwith a screen resolution of ${TESTX}x${TESTY}" 0 0