From d0644b2168075a85884c1faea716fa029081ca22 Mon Sep 17 00:00:00 2001 From: DanielsLPecke Date: Wed, 16 Nov 2016 13:05:07 +0100 Subject: Fix bug: resolution doesn't change --- bin/impressive-display | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/impressive-display b/bin/impressive-display index 7db3d11..74921bd 100755 --- a/bin/impressive-display +++ b/bin/impressive-display @@ -166,8 +166,10 @@ else fi if [ -n "${RESOLUTION}" ]; then - if which xrandr 1>/dev/null; then - xrandr -d :0 --output default --mode ${RESOLUTION} + if type -p xrandr xrandr 1>/dev/null; then + currentDisplay=`echo "$(xrandr)" | grep -w 'connected' | sed -r -e 's/connected.*//' | head -n 1` + xrandr -d :0 --output "$(echo $currentDisplay)" --mode $RESOLUTION + trap "cleanup" SIGINT SIGTERM ERR EXIT fi fi @@ -430,8 +432,6 @@ function reloadable_impressive { function create_lock { - trap "cleanup" SIGINT SIGTERM ERR - touch "$session_lock" } -- cgit v1.2.3