diff options
author | Manuel Schneider | 2014-04-08 12:04:43 +0200 |
---|---|---|
committer | Manuel Schneider | 2014-04-08 12:04:43 +0200 |
commit | 19a4c7ef9f29bc992c0cf09d5c8bb88ebe26a808 (patch) | |
tree | 2f9cd85c2fea29af6b9e30bfd08fa2fbfeefc3f4 /remote/modules/beamergui | |
parent | [beamerui] xrandr output changed in 13.10. Now the hardware has to be polled,... (diff) | |
download | tm-scripts-19a4c7ef9f29bc992c0cf09d5c8bb88ebe26a808.tar.gz tm-scripts-19a4c7ef9f29bc992c0cf09d5c8bb88ebe26a808.tar.xz tm-scripts-19a4c7ef9f29bc992c0cf09d5c8bb88ebe26a808.zip |
[beamergui] Modes from config is now applied at Xsetup-time
Diffstat (limited to 'remote/modules/beamergui')
-rwxr-xr-x | remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter | 25 |
1 files changed, 22 insertions, 3 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 96f3d5b0..c7469a4d 100755 --- a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter +++ b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter @@ -95,11 +95,30 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then --output ${OUTPUTNAMES[$((1-$BEAMER))]} --mode $OPTIMALRES \ --primary \ --output ${OUTPUTNAMES[$BEAMER]} --mode $OPTIMALRES \ - --same-as ${OUTPUTNAMES[$((1-$BEAMER))]} + --same-as ${OUTPUTNAMES[$((1-$BEAMER))]}A + else + if [[ -f "$CONFIGFILE" ]]; then + # Try to get a probed mode + PROBEDMODE=$(cat $CONFIGFILE | awk -F "=" '/132.230.4.156/ {print $2}') + + # If a probed mode was found, .. + if [[ -n "$PROBEDMODE" ]]; then + # Apply the probed mode from the config file + xrandr \ + --output ${OUTPUTNAMES[$((1-$BEAMER))]} --mode $PROBEDMODE \ + --primary \ + --output ${OUTPUTNAMES[$BEAMER]} --mode $PROBEDMODE \ + --same-as ${OUTPUTNAMES[$((1-$BEAMER))]} + else + echo -e "\e[31mNo probed mode found in $CONFIGFILE.\[e0m" + fi + else + echo "\e[31mNo config file found at $CONFIGFILE.\e[0m" + fi fi else - echo "No beamers found." + echo "\e[32mNo beamers found.\e[0m" fi else - echo "More than 2 outs." + echo "\e[32mMore than 2 outs.\e[0m" fi |