diff options
Diffstat (limited to 'remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter')
| -rwxr-xr-x | remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter index f58933e2..336cafc6 100755 --- a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter +++ b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter @@ -2,7 +2,7 @@ # This script explicitely needs bash for the arrays ## This script adds the common resolutions to the Xserver if and only if there -## is a beamer connected. If additionally the preferred resolution is known +## is a beamer connected. Additionally if the preferred resolution is known ## (i.e. the Xserver received a proper EDID) the latter will be applied. ################################################################################ @@ -32,10 +32,10 @@ declare -a OUTPUTNAMES while read line; do OUTPUTNAMES+=("$(echo "$line" | grep -o "^\S*" )") done < <( echo "$XRANDR" | grep -i " connected" ) -echo -e "Connected outputs: \e[32m${OUTPUTNAMES[@]}\e[0m" +#echo -e "Connected outputs: \e[32m${OUTPUTNAMES[@]}\e[0m" ## The goal is to add more modelines to the X server. While this is done the -# screen is flickering. Hence this is just necessary if there is a beamer, do +# screen is flickering. Hence this is just necessary if there is a beamer. Do # the flickering magic only if there are two outputs and one is a projector. if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then if ! ( echo "$XRANDR" | egrep \ @@ -57,7 +57,7 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then done done - # Check which of the outputs is the beamer. Just for reference. + # Check which of the outputs is the beamer. if [[ -z "$(echo "$XRANDR" | egrep \ "^${OUTPUTNAMES[0]}.*[[:digit:]]{2,}mm x [[:digit:]]{2,}mm")" ]]; then BEAMER=0; @@ -66,16 +66,14 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then fi # echo -ne "${OUTPUTNAMES[$BEAMER]} is a beamer. " - ## Finally if the EDID is present apply a proper resolution. - # Find out, if the beamer transmits reliable EDID data. The data in xrandr - # should be reliable if the EDID is present. + # Finally, if the EDID is present, apply a proper resolution. + # Find out whether the beamer transmits reliable EDID data. + # The data in xrandr should be reliable if the EDID is present. if echo "$XRANDRV" | grep -Pzo \ "^${OUTPUTNAMES[$BEAMER]}\N*\n((\ |\t)+\N*\n)+" \ | grep EDID > /dev/null ; then - #echo "EDID present" - # If the breamer transmits the EDID there shall be a preferred resolution. OPTIMALRES=$(echo "$XRANDRV" \ | grep -Pzo "^${OUTPUTNAMES[$BEAMER]}\N*\n((\ |\t)+\N*\n)+" \ |
