如何从命令行更改显示器的位置?

Edu*_*rdo 20 xrandr command-line scripts multiple-monitors display-manager

如何使用命令提示符进行如下所示的设置?

在此处输入图片说明

编辑:我需要辅助显示器位于主显示器顶部的左侧和中间,如上所示。

xrandr 的输出是:

        Screen 0: minimum 320 x 200, current 3200 x 1567, maximum 32767 x 32767
    eDP1 connected primary 1920x1080+1280+487 (normal left inverted right x axis y axis) 345mm x 194mm
       1920x1080      60.0*+   59.9  
       1680x1050      60.0     59.9  
       1600x1024      60.2  
       1400x1050      60.0  
       1280x1024      60.0  
       1440x900       59.9  
       1280x960       60.0  
       1360x768       59.8     60.0  
       1152x864       60.0  
       1024x768       60.0  
       800x600        60.3     56.2  
       640x480        59.9  
    VGA1 disconnected (normal left inverted right x axis y axis)
    DP1 disconnected (normal left inverted right x axis y axis)
    HDMI1 disconnected (normal left inverted right x axis y axis)
    HDMI2 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
       1280x1024      60.0*+   75.0  
       1920x1080      60.0     59.9  
       1152x864       75.0  
       1280x720       60.0     59.9  
       1024x768       75.1     60.0  
       800x600        75.0     60.3  
       640x480        75.0     60.0     59.9  
       720x400        70.1  
    VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Run Code Online (Sandbox Code Playgroud)

Ser*_*nyy 22

尝试这个:

xrandr --output eDPI1 --mode 1024x768 --pos 0x0 --rotate normal --output HDMI2 --mode 1366x768 --pos 1024x384 --rotate normal

  • 这比严格需要的要多得多。只需`xrandr --output eDPI1 --pos <x>x<y>` 就可以了:) (12认同)
  • <.< 嘘,我从 lxrandr 复制了设置,我不知道我在做什么 (7认同)
  • 我实际上将您的脚本修改为`xrandr --output HDMI2 --mode 1280x1024 --pos 0x0 --rotate normal --output eDP1 --mode 1920x1080 --pos 1280x512 --rotate normal`。非常感谢! (3认同)
  • @JacobVlijm 我们需要更多咖啡 XD (2认同)