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 _pkgname=rotate
_reponame=arch _reponame=arch
pkgname="de-p1st-$_pkgname" pkgname="de-p1st-$_pkgname"
pkgver=0.0.12 pkgver=0.1.0
pkgrel=1 pkgrel=1
pkgdesc="Scripts to automate screen rotation" pkgdesc="Scripts to automate screen rotation"
arch=('any') 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/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/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 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 * 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, Create a launcher with an icon symbolising "screen rotation" and use the following command:
e.g., left or automatically depending on the device orientation:
```shell ```shell
ln -s /usr/share/examples/de-p1st-rotate/rotate-left ~/Desktop/rotate-left de-p1st-rotate-screen
ln -s /usr/share/examples/de-p1st-rotate/rotate ~/Desktop/rotate
``` ```
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 ## inotifywait
**TODO**: Use `ionotifywait` to periodically call the rotation script. **TODO**: Use `ionotifywait` to periodically call the rotation script.

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"