summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielsLPecke <daniel.letsplay007@gmail.com>2016-11-16 13:47:23 +0100
committerDanielsLPecke <daniel.letsplay007@gmail.com>2016-11-16 13:47:23 +0100
commitedb31dd0a5f7d3c2daba3c8a327a6aa91d9884a1 (patch)
treef2f6373215c1bf031f064767831fc5fbe3b80c0b
parent22f9ab3a52c3427cda93f8ea291d2c49723c102d (diff)
downloadimpressive-display-edb31dd0a5f7d3c2daba3c8a327a6aa91d9884a1.tar.gz
impressive-display-edb31dd0a5f7d3c2daba3c8a327a6aa91d9884a1.tar.bz2
impressive-display-edb31dd0a5f7d3c2daba3c8a327a6aa91d9884a1.zip
Change Output message. Remove unnecessary 'xrandr's
-rwxr-xr-xbin/impressive-display12
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/impressive-display b/bin/impressive-display
index 799da03..9bd3641 100755
--- a/bin/impressive-display
+++ b/bin/impressive-display
@@ -173,10 +173,8 @@ else
fi
if [ -n "${RESOLUTION}" ]; then
- 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
+ if type -p xrandr 1>/dev/null; then
+ xrandr -d :0 --output "$(echo $currentOutput)" --mode $RESOLUTION
fi
fi
@@ -198,9 +196,9 @@ 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
+ if type -p xrandr 1>/dev/null; then
+ $OUTPUT "Info: resetting resolution"
+ xrandr -d :0 --output "$(echo $currentOutput)" --auto
fi
if [ -r "$impressive_lock" ]; then