diff options
author | DanielsLPecke <daniel.letsplay007@gmail.com> | 2016-11-16 13:07:05 +0100 |
---|---|---|
committer | DanielsLPecke <daniel.letsplay007@gmail.com> | 2016-11-16 13:07:05 +0100 |
commit | f20e48c671934323a354bbde9377155e1955cf1d (patch) | |
tree | 061a3d99ed5e8f13c9c0b159f80528ea90feca88 | |
parent | d0644b2168075a85884c1faea716fa029081ca22 (diff) | |
download | impressive-display-f20e48c671934323a354bbde9377155e1955cf1d.tar.gz impressive-display-f20e48c671934323a354bbde9377155e1955cf1d.tar.bz2 impressive-display-f20e48c671934323a354bbde9377155e1955cf1d.zip |
Change resolution on script-exit
-rwxr-xr-x | bin/impressive-display | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/impressive-display b/bin/impressive-display index 74921bd..62284c8 100755 --- a/bin/impressive-display +++ b/bin/impressive-display @@ -191,6 +191,10 @@ sleep_hours_start=`echo $SLEEP_HOURS | grep -E '^[0-9]{2}-[0-9]{2}$' | sed -n - sleep_hours_end=`echo $SLEEP_HOURS | grep -E '^[0-9]{2}-[0-9]{2}$' | sed -n -r -e 's/^([0-9]{2})-([0-9]{2})$/\2/p'` function cleanup { + if type -p xrandr xrandr 1>/dev/null; then + $OUTPUT "Info: resetting resolution to $currentResolution" + xrandr -d :0 --output "$(echo $currentDisplay)" --auto + fi if [ -r "$impressive_lock" ]; then impressive_pid=$(cat "$impressive_lock" | sed -e 's/[^0-9]*//g') |