xrandrにモニタ間でマウスを移動するように指示するにはどうすればよいですか?

xrandrにモニタ間でマウスを移動するように指示するにはどうすればよいですか?

カーソルを移動したい内部モニタと外部モニタがあります。外部デバイスが接続されている状態でコンピュータを起動すると、ディスプレイマネージャは無効なDPIで起動し、dpiを修正するには次の4つのコマンドを実行する必要があります。

xrandr --output DP-2 --mode 1920x1200 --dpi 94
xrandr --output LVDS-1-0 --mode 1920x1080 --dpi 147
xrandr --output DP-2 --right-of LVDS-1-0 --dpi 94
xrandr --output DP-2 --primary

ただし、この場合、両方のモニターでカーソルを移動できます。

逆に、外部モニタを接続せずに起動すると dpi の問題はなく、上記のスクリプトを実行して外部モニタを検出すると、マウスが外部モニタ領域にマップされ、内部ディスプレイに移動できなくなります。

カーソルがアクセスできる領域を指定する明示的なオプションはありますか?

また、次のスクリプトを使用して外部モニタのみを使用するようにマップしたグラフィックタブレットもあります。

xsetwacom --set "Wacom Intuos5 touch L Pen stylus" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pen eraser" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pen cursor" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pad pad" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Finger touch" MapToOutput "1920x1200+1920+0"

私のxinput --listもの

xinput --list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Performance MX                   id=10   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=15   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pen stylus          id=16   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pen eraser          id=17   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pen cursor          id=18   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Finger touch        id=19   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pad pad             id=20   [slave  pointer  (2)]
⎜   ↳ Microsoft Natural® Ergonomic Keyboard 4000    id=21   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated Camera                         id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=14   [slave  keyboard (3)]
    ↳ Microsoft Natural® Ergonomic Keyboard 4000    id=22   [slave  keyboard (3)]

私のxrandr結果は次のとおりです

DP-2 connected primary 1920x1200+1920+0 (normal left inverted right x axis y axis) 520mm x 320mm
   1920x1200     59.95*+
   1920x1080     60.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
 [...] 
LVDS-1-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.00*+  50.00  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   800x600       60.00    60.32    56.25  
   700x525       59.98  
   640x512       60.02  
   640x480       60.00    59.94  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
  [...]

ウィンドウをクリックするためにこれに従うとき質問DP-2モニターに表示される結果は次のとおりです。

x:3158 y:1084 screen:0 window:16788951
x:3508 y:1076 screen:0 window:16788951
x:1920 y:740 screen:0 window:801
x:3193 y:986 screen:0 window:16788951
x:3345 y:1066 screen:0 window:16788951
x:3382 y:990 screen:0 window:16788951
x:3363 y:1055 screen:0 window:16788951
x:2806 y:983 screen:0 window:41943171
x:1941 y:48 screen:0 window:41943171
x:3466 y:1060 screen:0 window:16788951
x:3469 y:1117 screen:0 window:16788951

ウィンドウマネージャを使用しherbstluftwmてモニタ設定を教えています。

herbstclient set_monitors "1920x1080+0+0" "1920x1200+1920+0"

構成は次のように表示されます。

$ hc detect_monitors -l
1920x1200+1920+0
1920x1080+0+0

nvidia私はThinkPad W520ノートブックのドライバと一緒にnVidiaグラフィックカードを使用しています。

ベストアンサー1

おすすめ記事