From 322110c2dd3d75b942b1122d0ac8f050e1015957 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 29 Sep 2021 10:54:05 +0200 Subject: Add packages, other config and fix script --- scripts/Scripts/xrotate | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') 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}') -- cgit v1.2.3