安装
安装必要的函数库和驱动程序
$ sudo pacman -S libinput xf86-input-libinput xorg-xinput编写Shell脚本
$ vim DisableTouchpad.sh
#!/bin/bash
declare -i IDID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`declare -i STATESTATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`if [ $STATE -eq 1 ]then xinput disable $IDelse xinput enable $IDfi赋予脚本读/写/执行权限
$ sudo chmod 0755 DisableTouchpad.shSystemd 自启动
$ cd /usr/lib/systemd/system# 创建Systemd服务$ sudo vim touchpad.service
[Unit]Description=Touchpad control service
[Service]Type=oneshotExecStart=/File/Self-starting/DisableTouchpad.sh
[Install]WantedBy=multi-user.target配置touchpad服务自启动
$ systemctl enable touchpad