Configure Surface Touchpad by default
This commit is contained in:
parent
a3421d4e37
commit
1cfd450bd0
3 changed files with 32 additions and 0 deletions
|
@ -16,6 +16,7 @@ begin
|
||||||
"MODULES+=(pinctrl_sunrisepoint surface_dtx)"
|
"MODULES+=(pinctrl_sunrisepoint surface_dtx)"
|
||||||
end | sudo tee /etc/mkinitcpio.conf.d/surface-book-2.conf > /dev/null
|
end | sudo tee /etc/mkinitcpio.conf.d/surface-book-2.conf > /dev/null
|
||||||
|
|
||||||
|
fish "$dir/../../../Common/Drivers/SurfaceBook2/main.fish" configure
|
||||||
sudo systemctl enable surface-dtx-daemon.service
|
sudo systemctl enable surface-dtx-daemon.service
|
||||||
sudo systemctl enable --global surface-dtx-userd.service
|
sudo systemctl enable --global surface-dtx-userd.service
|
||||||
end
|
end
|
||||||
|
|
12
scripts/Common/Drivers/SurfaceBook2/main.fish
Normal file
12
scripts/Common/Drivers/SurfaceBook2/main.fish
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/env fish
|
||||||
|
begin
|
||||||
|
set -l dir (status dirname)
|
||||||
|
source "$dir/../../Scripts/software.fish"
|
||||||
|
|
||||||
|
function configureSW -V dir
|
||||||
|
. "$dir/../../Software/KDE/input.fish"
|
||||||
|
addInputConfig 1118 2338 "Microsoft Surface Keyboard Touchpad" "NaturalScroll=true"
|
||||||
|
end
|
||||||
|
|
||||||
|
runInstaller $argv
|
||||||
|
end
|
19
scripts/Common/Software/KDE/input.fish
Normal file
19
scripts/Common/Software/KDE/input.fish
Normal 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
|
Loading…
Reference in a new issue