summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/Scripts/xrotate9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/Scripts/xrotate b/scripts/Scripts/xrotate
index fabe98b..5518df3 100755
--- a/scripts/Scripts/xrotate
+++ b/scripts/Scripts/xrotate
@@ -11,9 +11,6 @@ function help() {
echo " -h, --help this help message"
}
-# Fix hardcode
-DISP=LVDS1
-
BINNAME="xrotate"
# Parse some args
@@ -39,6 +36,12 @@ while [[ $# -gt 0 ]]; do
esac
done
+if [ -z "${DISP}" ]; then
+ # TODO, this will break with more displays
+ DISP=$(xrandr | awk -F ' ' '/ connected/ {print $1}')
+fi
+
+
O=$1
MOUSE=$(xinput list | grep "slave pointer" | awk '{print $6}' | awk -F '=' '{print $2}')