This commit is contained in:
Daniel Langbein 2021-06-17 16:59:44 +02:00
parent cbc4253ca6
commit 743cf91312
4 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
_pkgname=rotate
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.5
pkgver=0.0.6
pkgrel=1
pkgdesc="Scripts to automate screen rotation"
arch=('any')

View File

@ -1,7 +1,7 @@
# The screen to rotate
SCREEN=eDP-1 # other values could be "eDP1" or "HDMI1"
# xrandr devices to rotate together with the screen
# xinput devices to rotate together with the screen
DEVICES=()
#DEVICES+=( 'pointer:Wacom Pen and multitouch sensor Finger touch' ) # LenovoYoga460
#DEVICES+=( 'pointer:Wacom Pen and multitouch sensor Pen stylus' ) # LenovoYoga460

View File

@ -18,10 +18,10 @@ case "${ORIENTATION_STR}" in
ORIENTATION="inverted";
;;
*": right-up"*)
ORIENTATION="left";
ORIENTATION="right";
;;
*": left-up"*)
ORIENTATION="right";
ORIENTATION="left";
;;
*": undefined"*)
echo "The orientation could not yet be determined. Please rotate the device a bit and try again."

View File

@ -25,7 +25,7 @@ xrandr --output "${SCREEN}" --rotate "${ORIENTATION}" || {
for i in "${DEVICES[@]}"; do
xinput --map-to-output "${i}" "${SCREEN}" || {
echo "Could not map device ${i} to screen ${SCREEN}!";
echo "Could not map device ${i} to screen ${SCREEN}! Please check output of 'xinput'.";
FAILURE=true
}
done