xinput을 통해 터치패드 감도를 변경하기 위해 .profile에 xinput set-prop 11 346 50 명령을 등록해뒀는데, 부팅 시마다 id가 변경되어서 계속 오류가 발생하는 것 같아. 동적으로 prop을 찾아 변경하는 스크립트를 작성해보자.

우선 다음은 xinput의 실행 결과야.

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Lenovo Laser Wireless Mouse id=9 [slave pointer (2)]
⎜ ↳ Generic ThinkPad Dock USB Audio Consumer Control id=16 [slave pointer (2)]
⎜ ↳ Elan Touchpad id=18 [slave pointer (2)]
⎜ ↳ Elan TrackPoint id=19 [slave pointer (2)]
⎜ ↳ Logitech G304 id=10 [slave pointer (2)]
⎜ ↳ Lenovo TrackPoint Keyboard II id=13 [slave pointer (2)]
⎜ ↳ 2.4G RF Keyboard & Mouse id=22 [slave pointer (2)]
⎜ ↳ 2.4G RF Keyboard & Mouse Keyboard id=23 [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)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ Generic ThinkPad Dock USB Audio id=17 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=20 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=21 [slave keyboard (3)]
↳ Generic ThinkPad Dock USB Audio Consumer Control id=25 [slave keyboard (3)]
↳ Logitech G304 id=11 [slave keyboard (3)]
↳ Lenovo TrackPoint Keyboard II id=12 [slave keyboard (3)]
↳ Lenovo TrackPoint Keyboard II id=14 [slave keyboard (3)]
↳ 2.4G RF Keyboard & Mouse id=15 [slave keyboard (3)]
↳ 2.4G RF Keyboard & Mouse Keyboard id=24 [slave keyboard (3)]

여기서 Elan Touchpad의 옵션을 변경할거야.

다음은 xinput list-props 18의 결과야

Device ‘Elan Touchpad’:
Device Enabled (188): 1
Coordinate Transformation Matrix (190): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (349): 1
libinput Tapping Enabled Default (350): 0
libinput Tapping Drag Enabled (351): 1
libinput Tapping Drag Enabled Default (352): 1
libinput Tapping Drag Lock Enabled (353): 0
libinput Tapping Drag Lock Enabled Default (354): 0
libinput Tapping Button Mapping Enabled (355): 1, 0
libinput Tapping Button Mapping Default (356): 1, 0
libinput Natural Scrolling Enabled (326): 1
libinput Natural Scrolling Enabled Default (327): 0
libinput Disable While Typing Enabled (357): 1
libinput Disable While Typing Enabled Default (358): 1
libinput Scroll Methods Available (328): 1, 1, 0
libinput Scroll Method Enabled (329): 1, 0, 0
libinput Scroll Method Enabled Default (330): 1, 0, 0
libinput Click Methods Available (359): 1, 1
libinput Click Method Enabled (360): 0, 1
libinput Click Method Enabled Default (361): 1, 0
libinput Middle Emulation Enabled (335): 0
libinput Middle Emulation Enabled Default (336): 0
libinput Accel Speed (337): -0.080882
libinput Accel Speed Default (338): 0.000000
libinput Accel Profiles Available (339): 1, 1
libinput Accel Profile Enabled (340): 1, 0
libinput Accel Profile Enabled Default (341): 1, 0
libinput Left Handed Enabled (342): 0
libinput Left Handed Enabled Default (343): 0
libinput Send Events Modes Available (311): 1, 1
libinput Send Events Mode Enabled (312): 0, 0
libinput Send Events Mode Enabled Default (313): 0, 0
Device Node (314): “/dev/input/event11”
Device Product ID (315): 1267, 32
libinput Drag Lock Buttons (344): <no items>
libinput Horizontal Scroll Enabled (345): 1
libinput Scrolling Pixel Distance (346): 15
libinput Scrolling Pixel Distance Default (347): 15
libinput High Resolution Wheel Scroll Enabled (348): 1

여기서 libinput Scrolling Pixel Distance (346): 15 이 옵션을 찾아서 값을 변경할거야.

해당 값을 50으로 변경하면 돼. .profile 파일에 등록할 수 있도록 스크립트를 작성해줄래?