Browse Source

Add snippets from xinput devices mapping to xrandr outputs

master
NaiJi ✨ 8 months ago
parent
commit
6dc2352b0e
  1. 15
      xinputmapping.sh

15
xinputmapping.sh

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
#!/bin/bash
# Gathering IDs of input devices
pointer_ids="$(xinput --list | sed -n '/slave.*pointer/p' | cut -f 2 -d '=' | cut -f 1 -d '[')"
# Get all outputs except for eDP1
connected_screens="$(xrandr | grep connected | sed '/disconnected/d' | sed '/eDP1/d' | cut -f 1 -d ' ')"
# Trying to map all the input devices to all the outputs
for screen in $connected_screens; do
for pointer in $pointer_ids; do
/usr/bin/xterm -e /bin/bash -c "/usr/bin/xinput --map-to-output $pointer $screen"
/usr/bin/xterm -e /bin/bash -c "/usr/bin/xinput set-props $pointer --type=float 'Coordinate Transformation Matrix' 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0"
/usr/bin/xterm -e /bin/bash -c "/usr/bin/xinput list-props $pointer > /tmp/input-xinput-listprops.log 2>/tmp/input-xinput-listprops.err.log"
/usr/bin/xterm -e /bin/bash -c "/usr/bin/xinput list > /tmp/xinput.log"
done
done
Loading…
Cancel
Save