From: Maciej Sitarz Date: Wed, 15 Feb 2012 19:53:13 +0000 (+0100) Subject: Fixed script name and typo in variable name. X-Git-Tag: 1.0~162 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7aed96914fb30dad8e084125f1dda34a5b726718;p=deb_pkgs%2Fautorandr.git Fixed script name and typo in variable name. Renamed according to pm-utils "SLEEP HOOK ORDERING CONVENTION" --- diff --git a/pm-utils/40autorandr b/pm-utils/40autorandr new file mode 100755 index 0000000..60ca9ae --- /dev/null +++ b/pm-utils/40autorandr @@ -0,0 +1,23 @@ +#!/bin/sh +# +# 40autorandr: Change autorandr profile on thaw/resume + +AUTORANDR="autorandr -c" + +detect_display() +{ + for X in /tmp/.X11-unix/X*; do + D="${X##/tmp/.X11-unix/X}" + user=$(who | awk -vD="$D" '$5 ~ "\\(:"D"\\)$" {print $1}') + if [ x"$user" != x"" ]; then + export DISPLAY=":$D" + /bin/su -c "${AUTORANDR}" "$user" + fi + done +} + +case "$1" in + thaw|resume) + detect_display + ;; +esac diff --git a/pm-utils/90autorandr b/pm-utils/90autorandr deleted file mode 100755 index 59992a8..0000000 --- a/pm-utils/90autorandr +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# 90autorandr: Change autorandr profile on thaw/resume - -AUTORANDR="autorandr -c" - -detect_display() -{ - for X in /tmp/.X11-unix/X*; do - D="${X##/tmp/.X11-unix/X}" - user=$(who | awk -vD="$D" '$5 ~ "\\(:"D"\\)$" {print $1}') - if [ x"$user" != x"" ]; then - export DISPLAY=":$displaynum" - /bin/su -c "${AUTORANDR}" "$user" - fi - done -} - -case "$1" in - thaw|resume) - detect_display - ;; -esac