summaryrefslogtreecommitdiffstats
path: root/remote/modules/beamergui/data/opt/openslx/scripts
diff options
context:
space:
mode:
authorJonathan Bauer2014-04-09 19:20:25 +0200
committerJonathan Bauer2014-04-09 19:20:25 +0200
commitd5c18f49daf7411b99833a338fb9154ae98b0c6d (patch)
tree59ad3bc05724d705bdce8b97cace56086d63a9ea /remote/modules/beamergui/data/opt/openslx/scripts
parent[kdm] fix old hack for kde4/config on suse (diff)
parentMerge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-d5c18f49daf7411b99833a338fb9154ae98b0c6d.tar.gz
tm-scripts-d5c18f49daf7411b99833a338fb9154ae98b0c6d.tar.xz
tm-scripts-d5c18f49daf7411b99833a338fb9154ae98b0c6d.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/beamergui/data/opt/openslx/scripts')
-rwxr-xr-xremote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter11
1 files changed, 10 insertions, 1 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 55474174..d29aa2c1 100755
--- a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter
+++ b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter
@@ -116,7 +116,16 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then
fi
fi
else
- echo "\e[32mNo beamers found.\e[0m"
+ # In case of two monitors just sort the outputa lexicographically and apply
+ # the preffered resolution
+ readarray -t OUTPUTNAMES \
+ < <(for a in "${OUTPUTNAMES[@]}"; do echo "$a"; done | sort)
+ echo ${OUTPUTNAMES[@]}
+ xrandr \
+ --output ${OUTPUTNAMES[0]} --preferred \
+ --primary \
+ --output ${OUTPUTNAMES[1]} --preferred \
+ --right-of ${OUTPUTNAMES[0]}
fi
else
echo "\e[32mMore than 2 outs.\e[0m"