From b279bf161d024fc24e709a1e4c068867a2fe7632 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 17 Jun 2021 19:38:44 +0200 Subject: [PATCH] further work on de-p1st-rotate (4) --- pkg/de-p1st-rotate/PKGBUILD | 11 +++++-- pkg/de-p1st-rotate/README.md | 32 +++++++++++++++++++ .../share/de-p1st-rotate/examples/rotate} | 0 .../de-p1st-rotate/examples/rotate-inverted} | 0 .../de-p1st-rotate/examples/rotate-left} | 0 .../de-p1st-rotate/examples/rotate-normal} | 0 6 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 pkg/de-p1st-rotate/README.md rename pkg/de-p1st-rotate/{examples/rotate.sh => usr/share/de-p1st-rotate/examples/rotate} (100%) rename pkg/de-p1st-rotate/{examples/rotate-inverted.sh => usr/share/de-p1st-rotate/examples/rotate-inverted} (100%) rename pkg/de-p1st-rotate/{examples/rotate-left.sh => usr/share/de-p1st-rotate/examples/rotate-left} (100%) rename pkg/de-p1st-rotate/{examples/rotate-normal.sh => usr/share/de-p1st-rotate/examples/rotate-normal} (100%) diff --git a/pkg/de-p1st-rotate/PKGBUILD b/pkg/de-p1st-rotate/PKGBUILD index 6fa9331..083e97f 100644 --- a/pkg/de-p1st-rotate/PKGBUILD +++ b/pkg/de-p1st-rotate/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=rotate _reponame=arch pkgname="de-p1st-$_pkgname" -pkgver=0.0.10 +pkgver=0.0.11 pkgrel=1 pkgdesc="Scripts to automate screen rotation" arch=('any') @@ -16,8 +16,13 @@ sha256sums=('SKIP') # 'SKIP' for git sources; Otherwise: autofill using updpkgsu package() { cd "${_reponame}/pkg/${pkgname}" - install -Dm0555 usr/bin/de-p1st-rotate-screen "$pkgdir"/usr/bin/de-p1st-rotate-screen - install -Dm0555 usr/lib/de-p1st-rotate/get-orientation "$pkgdir"/usr/lib/de-p1st-rotate/get-orientation + install -Dm0555 usr/bin/de-p1st-rotate-screen "$pkgdir"/usr/bin/de-p1st-rotate-screen + install -Dm0555 usr/lib/de-p1st-rotate/get-orientation "$pkgdir"/usr/lib/de-p1st-rotate/get-orientation + + install -Dm0555 usr/share/de-p1st-rotate/rotate "$pkgdir"/usr/share/de-p1st-rotate/rotate + install -Dm0555 usr/share/de-p1st-rotate/rotate-inverted "$pkgdir"/usr/share/de-p1st-rotate/rotate-inverted + install -Dm0555 usr/share/de-p1st-rotate/rotate-left "$pkgdir"/usr/share/de-p1st-rotate/rotate-left + install -Dm0555 usr/share/de-p1st-rotate/rotate-normal "$pkgdir"/usr/share/de-p1st-rotate/rotate-normal install -Dm0644 -o0 etc/de-p1st-rotate/config.cfg "$pkgdir"/etc/de-p1st-rotate/config.cfg } diff --git a/pkg/de-p1st-rotate/README.md b/pkg/de-p1st-rotate/README.md new file mode 100644 index 0000000..536394f --- /dev/null +++ b/pkg/de-p1st-rotate/README.md @@ -0,0 +1,32 @@ +# Screen rotation scripts + +* https://kevinbecker.org/blog/2019/11/21/dell-venue-10-pro-5055-screen-rotation-in-gnome + +## usage + +In xfce4 one can create shortcuts on their desktop to rotate the screen, +e.g., left or automatically depending on the device orientation: + +```shell +ln -s /usr/share/de-p1st-rotate/rotate-left ~/Desktop/rotate-left +ln -s /usr/share/de-p1st-rotate/rotate ~/Desktop/rotate +``` + +## inotifywait + +**TODO**: Use `ionotifywait` to periodically call the rotation script. + +See: https://linuxappfinder.com/blog/auto_screen_rotation_in_ubuntu + +## Surface Go 2 + +```shell +monitor-sensor --accell +``` + +just returns `orientation: undefined`. + +After I switched to `iio-sensor-proxy-git` it was **working** until I rebooted. +Since then it does not work as well ... + +**TODO**: Open an issue here: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy \ No newline at end of file diff --git a/pkg/de-p1st-rotate/examples/rotate.sh b/pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate similarity index 100% rename from pkg/de-p1st-rotate/examples/rotate.sh rename to pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate diff --git a/pkg/de-p1st-rotate/examples/rotate-inverted.sh b/pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate-inverted similarity index 100% rename from pkg/de-p1st-rotate/examples/rotate-inverted.sh rename to pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate-inverted diff --git a/pkg/de-p1st-rotate/examples/rotate-left.sh b/pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate-left similarity index 100% rename from pkg/de-p1st-rotate/examples/rotate-left.sh rename to pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate-left diff --git a/pkg/de-p1st-rotate/examples/rotate-normal.sh b/pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate-normal similarity index 100% rename from pkg/de-p1st-rotate/examples/rotate-normal.sh rename to pkg/de-p1st-rotate/usr/share/de-p1st-rotate/examples/rotate-normal