From f1315852bec78b8a114dca29721f6f8e9b0c0400 Mon Sep 17 00:00:00 2001 From: Tray Torrance Date: Mon, 30 Dec 2013 13:18:32 -0800 Subject: [PATCH] Add support for "preswitch" scripts --- autorandr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autorandr b/autorandr index c2c3384..e77aeb7 100755 --- a/autorandr +++ b/autorandr @@ -178,6 +178,11 @@ load() { local PROFILE="$1" local CONF="$PROFILES/$PROFILE/config" if [ -e "$CONF" ] ; then + [ -x "$PROFILES/preswitch" ] && \ + "$PROFILES/preswitch" "$PROFILE" + [ -x "$PROFILES/$PROFILE/preswitch" ] && \ + "$PROFILES/$PROFILE/preswitch" "$PROFILE" + echo " -> loading profile $PROFILE" $LOAD_METHOD "$CONF"