summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielsLPecke <daniel.letsplay007@gmail.com>2016-11-16 13:05:07 +0100
committerDanielsLPecke <daniel.letsplay007@gmail.com>2016-11-16 13:05:07 +0100
commitd0644b2168075a85884c1faea716fa029081ca22 (patch)
tree6944bd6a6f60215df46e814f60138f1e54205f5d
parenta460a4ff0b00583d6a4968c769b71a8d7e4955c3 (diff)
downloadimpressive-display-d0644b2168075a85884c1faea716fa029081ca22.tar.gz
impressive-display-d0644b2168075a85884c1faea716fa029081ca22.tar.bz2
impressive-display-d0644b2168075a85884c1faea716fa029081ca22.zip
Fix bug: resolution doesn't change
-rwxr-xr-xbin/impressive-display8
1 files 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"
}