我试图弄清楚使用 xdotool 时 --screen 的值来自哪里,但我似乎无法使用 xrandr 找到该值。
我将在下面粘贴 xrandr 的输出,但“HDMI-0”实际上是 xdotool 的“--screen 2”,而“DP-0”是“--screen 0”。我猜 X 是按照 DP-0、DP-1、HDMI-0 然后是 DVI-D-0 的顺序进行轮询的……但我不知道 X 将这些关联存储在哪里(或者即使 X 以这种方式进行轮询是正确的)。
“HDMI-0”的工作示例:xdotool mousemove --screen 2 50 50 click 1
Screen 0: minimum 8 x 8, current 3600 x 3840, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1440x2560+2160+1200 left (normal left inverted right x axis y axis) 596mm x 335mm
1920x1080 60.00 + 59.94 50.00
2560x1440 29.95*
1920x1200 59.95
1600x1200 60.00
1600x900 60.00
1440x1280 59.91
1440x900 59.89
1400x1050 59.98
1360x765 60.00
1280x1440 59.90
1280x1024 75.02 60.02
1280x720 60.00 59.94 50.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94
DP-0 connected 2160x3840+0+0 right (normal left inverted right x axis y axis) 600mm x 340mm
3840x2160 60.00*+ 30.00
2560x1440 59.95
1920x1080 60.00 59.94
1600x900 60.00
1280x1024 60.02
1280x800 59.81
1280x720 60.00 59.94
1152x864 59.96
1024x768 60.00
800x600 60.32
720x480 59.94
640x480 59.94 59.93
DP-1 disconnected (normal left inverted right x axis y axis)