Skip to content
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

Open
dreirund opened this issue Apr 27, 2021 · 4 comments
Open

[Feature] support screen rotation #4

dreirund opened this issue Apr 27, 2021 · 4 comments

Comments

@dreirund
Copy link

dreirund commented Apr 27, 2021

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!

@schlomo
Copy link
Owner

schlomo commented Apr 28, 2021

Thanks, an Arch package is cool. Could you please submit a PR to add Arch installation instructions to this repo?

About rotation: How would you automatically detect which screen needs to be rotated?

image
Is this your example? The best way to try to improve automirror would be adding a test case with your xrandr output and then twiddling with the script till all the tests pass.

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.

Which laptop model do you use? I have never seen something like this. Or is this a tablet?

@dreirund
Copy link
Author

dreirund commented Apr 29, 2021 via email

@schlomo
Copy link
Owner

schlomo commented Apr 29, 2021

Sorry, "PR" meant GitHub Pull Request on this (my) repo to add Archlinux install instructions to the README.

In general automirror is really meant as an automated tool which is why so far there is only a single (-i) command line argument. It is meant to run via hotkey even in situations where the screen setup prevents regular interaction, e.g. because Linux autoconfigured itself to 640x480.

So to follow your thoughts within the mindset of automirror, there should be two features:

  1. Add logic to automatically decide upon screen rotations under certain circumstances. For that part you would first create a new test case with the desired behavior (xrandr input leading to desired xrandr command line options) and then implement the code for that.
  2. (Optionally) Add a configuration file with custom presets or preferences so that users can direct automirror to correctly handle the specifics of their hardware.
  3. Add ui elements to the interactive mode to change/set screen rotation, overriding the automated decision.

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.

@schlomo schlomo changed the title [Feature] support rotation. [Feature] support screen rotation Apr 29, 2021
@dreirund
Copy link
Author

dreirund commented Apr 15, 2023

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), and it is findable for everyone who searches the AUR.

Sorry, "PR" meant GitHub Pull Request on this (my) repo to add Archlinux install instructions to the README.

Pull request is too advanced/ much work for me. I don't know git besides git clone, git pull, git add, git commit and git push. And it reads like a lot of work compared to a little change, where you are at the source and can simply make the change.

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 README, if you want to have it mentioned I ask you to put it in.

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 README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants