diff options
| author | DanielsLPecke <daniel.letsplay007@gmail.com> | 2016-11-16 13:05:07 +0100 |
|---|---|---|
| committer | DanielsLPecke <daniel.letsplay007@gmail.com> | 2016-11-16 13:05:07 +0100 |
| commit | d0644b2168075a85884c1faea716fa029081ca22 (patch) | |
| tree | 6944bd6a6f60215df46e814f60138f1e54205f5d /bin | |
| parent | a460a4ff0b00583d6a4968c769b71a8d7e4955c3 (diff) | |
| download | impressive-display-d0644b2168075a85884c1faea716fa029081ca22.tar.gz impressive-display-d0644b2168075a85884c1faea716fa029081ca22.tar.bz2 impressive-display-d0644b2168075a85884c1faea716fa029081ca22.zip | |
Fix bug: resolution doesn't change
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/impressive-display | 8 |
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" } |
