de-p1st-rotate

This commit is contained in:
Daniel Langbein 2021-06-17 20:03:06 +02:00
parent f764f1dc38
commit d147afb49d
6 changed files with 28 additions and 24 deletions

View File

@ -2,7 +2,7 @@
_pkgname=rotate
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.12
pkgver=0.1.0
pkgrel=1
pkgdesc="Scripts to automate screen rotation"
arch=('any')
@ -19,10 +19,5 @@ package() {
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/examples/rotate "$pkgdir"/usr/share/de-p1st-rotate/examples/rotate
install -Dm0555 usr/share/de-p1st-rotate/examples/rotate-inverted "$pkgdir"/usr/share/de-p1st-rotate/examples/rotate-inverted
install -Dm0555 usr/share/de-p1st-rotate/examples/rotate-left "$pkgdir"/usr/share/de-p1st-rotate/examples/rotate-left
install -Dm0555 usr/share/de-p1st-rotate/examples/rotate-normal "$pkgdir"/usr/share/de-p1st-rotate/examples/rotate-normal
install -Dm0644 -o0 etc/de-p1st-rotate/config.cfg "$pkgdir"/etc/de-p1st-rotate/config.cfg
}

View File

@ -2,16 +2,37 @@
* https://kevinbecker.org/blog/2019/11/21/dell-venue-10-pro-5055-screen-rotation-in-gnome
## usage
## Usage - XFCE4
In xfce4 one can create shortcuts on their desktop to rotate the screen,
e.g., left or automatically depending on the device orientation:
Create a launcher with an icon symbolising "screen rotation" and use the following command:
```shell
ln -s /usr/share/examples/de-p1st-rotate/rotate-left ~/Desktop/rotate-left
ln -s /usr/share/examples/de-p1st-rotate/rotate ~/Desktop/rotate
de-p1st-rotate-screen
```
Every time you click on the launcher, the screen gets rotated to the current device orientation.
## Usage without acceleration sensor - XFCE4
Create two launchers, one with icon "arrow left" the other one with "arrow right"
and use the following commands:
```shell
de-p1st-rotate-screen "left"
```
```shell
de-p1st-rotate-screen "normal"
```
With these two launchers rotating the scren left into portrait mode or back to landscape mode
is just one quick click away.
## inotifywait
**TODO**: Use `ionotifywait` to periodically call the rotation script.
@ -29,4 +50,4 @@ 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
**TODO**: Open an issue here: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy

View File

@ -1,3 +0,0 @@
#!/bin/bash
de-p1st-rotate-screen

View File

@ -1,3 +0,0 @@
#!/bin/bash
de-p1st-rotate-screen "inverted"

View File

@ -1,3 +0,0 @@
#!/bin/bash
de-p1st-rotate-screen "left"

View File

@ -1,3 +0,0 @@
#!/bin/bash
de-p1st-rotate-screen "normal"