Configure Surface Touchpad by default

This commit is contained in:
Manuel Thalmann 2024-09-20 02:23:09 +02:00
parent a3421d4e37
commit 1cfd450bd0
3 changed files with 32 additions and 0 deletions
scripts/Common/Software/KDE

View file

@ -0,0 +1,19 @@
function addInputConfig -a vendorID productID name
set -l file /etc/xdg/kcminputrc
set -l statements $argv[4..]
if [ -z "$statements" ]
set statements (cat)
end
if not cat $file | grep "\\[$name\\]" > /dev/null 2>&1
begin
printf %s\n \
(if [ -f $file ] && [ -n (cat $file) ]
echo ""
end) \
"[Libinput][$vendorID][$productID][$name]" \
"$statements"
end | sudo tee $file > /dev/null
end
end