-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] support screen rotation #4
Comments
*On Wed, 28 Apr 2021 05:51:38 -0700, Schlomo Schapiro ***@***.***> wrote about "Re: [schlomo/automirror] [Feature] support rotation. (#4)":*
Thanks, an Arch package is cool. Could you please submit a PR to add Arch installation instructions to this repo?
I have no idea how and where to submit a press release. I created the Arch package in the AUR ([→ here](https://aur.archlinux.org/packages/automirror-git/)), and it is findable for everyone who searches the AUR.
Installation instructions would be, for example using `yay` pacman and AUR wrapper:
```
yay -S automirror-git
```
Or manually downloading the `PKGBUILD` from https://aur.archlinux.org/packages/automirror-git/ in a new directory, and issuing `makepkg -si` in that directory.
About rotation: How would you automatically detect which screen needs to be rotated?
In the following `xrandr` output, output `DSI1` is rotated `right`:
```
Screen 0: minimum 8 x 8, current 1680 x 1050, maximum 32767 x 32767
DSI1 connected 1280x720+400+330 right (normal left inverted right x axis y axis) 0mm x 0mm
720x1280 60.08*+
640x480 59.94
720x405 59.51 58.99
360x640 60.00
640x360 59.84 59.32
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 490mm x 320mm
1680x1050 59.88*+ 59.95
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1152x864 75.00
1024x768 75.03 60.00
832x624 74.55
800x600 75.00 60.32 56.25
640x480 75.00 59.94
720x400 70.08
```
→ note that there is the string `right` appearing after the currently set geometry for `DSI1`.
![image](https://user-images.githubusercontent.com/101384/116406375-e2173380-a830-11eb-9c68-bf05bb5d527d.png)
Yes; note the `right` in `DSI1 connected 1280x720+400+330 right`.
I think a test to compare width and height between the screens and applying rotation if the comparison is different, e.g. if on one screen width is bigger than height and on the other screen height is bigger than width. That way automirror would always adapt rectangular screens to match.
I think this should be left to the user with an option; some screens might be physically landscape, some physically portrait, and having the output rotated on them by 90° might be not feasible.
So I suggest the _default_ should be for screens that are already activated to _keep_ the rotation (and to keep it in particular for the screen which acts as the reference for the others), and for screens which are not already activated one can do by default either what you suggested or apply the same rotation as the reference has; I am not quite sure about it but with a tendency to the first. And then there could be a command line option which applies your suggestion to _all_ screens except the reference: To calculate best rotation. But then: How to tell if it should be `right` or `left`?
Thanks for your ideas and investigations!
…--
This email has been sent from a computer.
|
Sorry, "PR" meant GitHub Pull Request on this (my) repo to add Archlinux install instructions to the In general automirror is really meant as an automated tool which is why so far there is only a single ( So to follow your thoughts within the mindset of automirror, there should be two features:
The features should probably be added in this order. I won't have time to implement this myself but I'll be happy to support/coach you through doing it. |
Pull request is too advanced/ much work for me. I don't know git besides It is enough to just link to the package, Arch Linux users who know how to use the AUR have then enough knowledge to go on; those who don't know would need to read the Arch Wiki about AUR anyway. So, regarding the mention of the Arch Linux package in the Regarding the other things (autorotation), I am not going to do anything; I see I don't really use this software. Feel free to close this issue as "not planned" after you have decided about the |
Thanks for the script; I would have just written a similar script (with less elaborate functionality) otherwise. I just made an → Arch Linux package of your script.
I wish to have added support for rotated screens; my laptop monitor needs rotation to work properly (native it is a "portrait" display).
Currently, your script calculates scalings based on the unrotated resolution, but if rotation is applied with 90° or 270° height and width need to be swapped.
Thanks!
The text was updated successfully, but these errors were encountered: