Coder Social home page Coder Social logo

automirror's People

Contributors

norbertwenzel avatar schlomo avatar scottcrossen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

automirror's Issues

Screens without mm

I'm using a projector, which has it's xrandr line like so:

DP1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  50.00    59.94    24.00    23.98
   1920x1080i    60.00    50.00    59.94
   1600x1200     60.00
   1680x1050     59.88
   1280x1024     75.02    60.02
   1440x900      59.90
   1280x960      60.00
   1152x864      75.00
   1280x720     119.99    60.00    50.00    59.94
   1024x768      75.03    70.07    60.00
   832x624       74.55
   800x600       72.19    75.00    60.32    56.25
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    72.81    66.67    60.00    59.94
   720x400       70.08

automirror is unable to detect this screen for some reason. I think it's due to the lack of mm.

[Feature] support screen rotation

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!

spurious `--mid-search` in interactive dialogue window.

When I run your script with -i option on my machine with a connected HDMI monitor, there is a spurious --mid-search in the first Output field. All other entries are moved by one. See screenshot.

Output of automirror -i

My xrandr-output before applying the script mirroring is:

xrandr:

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  

xrandr --verbose:

Screen 0: minimum 8 x 8, current 1680 x 1050, maximum 32767 x 32767
DSI1 connected 1280x720+400+330 (0x46) right (normal left inverted right x axis y axis) 0mm x 0mm
        Identifier: 0x42
        Timestamp:  13921615
        Subpixel:   horizontal rgb
        Gamma:      1.0:1.0:1.0
        Brightness: 0.0
        Clones:    
        CRTC:       1
        CRTCs:      1 0 2
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        BACKLIGHT: 271 
                range: (0, 960)
        Backlight: 271 
                range: (0, 960)
        panel orientation: Right Side Up 
                supported: Normal, Upside Down, Left Side Up, Right Side Up
        scaling mode: Full aspect 
                supported: Full, Center, Full aspect
        link-status: Good 
                supported: Good, Bad
        non-desktop: 0 
                range: (0, 1)
  720x1280 (0x46) 70.000MHz -HSync -VSync *current +preferred
        h: width   720 start  800 end  808 total  888 skew    0 clock  78.83KHz
        v: height 1280 start 1296 end 1298 total 1312           clock  60.08Hz
  640x480 (0x47) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
  720x405 (0x48) 22.500MHz -HSync +VSync
        h: width   720 start  744 end  808 total  896 skew    0 clock  25.11KHz
        v: height  405 start  408 end  413 total  422           clock  59.51Hz
  720x405 (0x49) 21.750MHz +HSync -VSync
        h: width   720 start  768 end  800 total  880 skew    0 clock  24.72KHz
        v: height  405 start  408 end  413 total  419           clock  58.99Hz
  360x640 (0x4a) 18.776MHz -HSync +VSync
        h: width   360 start  376 end  416 total  472 skew    0 clock  39.78KHz
        v: height  640 start  641 end  644 total  663           clock  60.00Hz
  640x360 (0x4b) 18.000MHz -HSync +VSync
        h: width   640 start  664 end  720 total  800 skew    0 clock  22.50KHz
        v: height  360 start  363 end  368 total  376           clock  59.84Hz
  640x360 (0x4c) 17.750MHz +HSync -VSync
        h: width   640 start  688 end  720 total  800 skew    0 clock  22.19KHz
        v: height  360 start  363 end  368 total  374           clock  59.32Hz
DP1 disconnected (normal left inverted right x axis y axis)
        Identifier: 0x43
        Timestamp:  13921615
        Subpixel:   unknown
        Clones:    
        CRTCs:      1 0 2
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        Colorspace: Default 
                supported: Default, RGB_Wide_Gamut_Fixed_Point, RGB_Wide_Gamut_Floating_Point, opRGB, DCI-P3_RGB_D65, BT2020_RGB, BT601_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, BT2020_CYCC, BT2020_YCC
        max bpc: 12 
                range: (6, 12)
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        subconnector: Unknown 
                supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
        link-status: Good 
                supported: Good, Bad
        non-desktop: 0 
                range: (0, 1)
HDMI1 connected primary 1680x1050+0+0 (0x1ef) normal (normal left inverted right x axis y axis) 490mm x 320mm
        Identifier: 0x44
        Timestamp:  13921615
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 0.0
        Clones:    
        CRTC:       0
        CRTCs:      1 0 2
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        EDID: 
                00ffffffffffff001e6d785607dc0000
                09120103ea312078eaaec5a2574a9c25
                125054a76b80950081808140714f0101
                0101010101017c2e90a0601a1e403020
                3600da281100001a21399030621a2740
                68b03600da281100001c000000fd0038
                4b1e530f000a202020202020000000fc
                0057323234320a202020202020200080
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        max bpc: 12 
                range: (8, 12)
        content type: No Data 
                supported: No Data, Graphics, Photo, Cinema, Game
        Colorspace: Default 
                supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
        aspect ratio: Automatic 
                supported: Automatic, 4:3, 16:9
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        link-status: Good 
                supported: Good, Bad
        non-desktop: 0 
                range: (0, 1)
  1680x1050 (0x1ef) 119.000MHz +HSync -VSync *current +preferred
        h: width  1680 start 1728 end 1760 total 1840 skew    0 clock  64.67KHz
        v: height 1050 start 1053 end 1059 total 1080           clock  59.88Hz
  1680x1050 (0x1f0) 146.250MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz
        v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz
  1280x1024 (0x1f1) 135.000MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock  79.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  75.02Hz
  1280x1024 (0x1f2) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1440x900 (0x1f3) 88.750MHz +HSync -VSync
        h: width  1440 start 1488 end 1520 total 1600 skew    0 clock  55.47KHz
        v: height  900 start  903 end  909 total  926           clock  59.90Hz
  1280x960 (0x1f4) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1152x864 (0x1f5) 108.000MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock  67.50KHz
        v: height  864 start  865 end  868 total  900           clock  75.00Hz
  1024x768 (0x1f6) 78.750MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock  60.02KHz
        v: height  768 start  769 end  772 total  800           clock  75.03Hz
  1024x768 (0x1f7) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  832x624 (0x1f8) 57.284MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock  49.73KHz
        v: height  624 start  625 end  628 total  667           clock  74.55Hz
  800x600 (0x1f9) 49.500MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock  46.88KHz
        v: height  600 start  601 end  604 total  625           clock  75.00Hz
  800x600 (0x1fa) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0x1fb) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  640x480 (0x1fc) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0x47) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
  720x400 (0x1fd) 28.320MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock  31.47KHz
        v: height  400 start  412 end  414 total  449           clock  70.08Hz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.