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

xrandr output does not match awk pattern #37

Open
PostalBear opened this issue Oct 14, 2015 · 1 comment
Open

xrandr output does not match awk pattern #37

PostalBear opened this issue Oct 14, 2015 · 1 comment

Comments

@PostalBear
Copy link

Hi,
First of all thanks for this nice script.

During attempt to make my monitor configuration switching I discovered that xrandr output does not match awk pattern , which leads to creation of incorrect configuration profile.

In my case output of xrandr -q looks like this:

eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm

Which results to corrupted configuration profile:

output eDP1
mode primary
pos x
rotate 1920x1080+0+0  

To provide you with more information:
I'm using Ubuntu 14.04.3 LTS on Lenovo T450s with Intel GPU.
That's output of xrandr --version

xrandr program version       1.4.1
Server reports RandR version 1.4

I was able to fix this problem quite easy by adjusting awk pattern:

    # display is connected and has a mode
    /^[^ ]+ connected [^(]/ {
        split($4, A, "+");
        print "output "$1;
        print "mode "A[1];
        print "pos "A[2]"x"A[3];
        if ($5 !~ /^\(/) {
            print "rotate "$5;
        }
@PostalBear PostalBear changed the title xrandr output is different from autorandr expectation. xrandr output does not match awk pattern Oct 14, 2015
@phillipberndt
Copy link

Have a look at #36

SphericalHam pushed a commit to SphericalHam/autorandr that referenced this issue Nov 30, 2017
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