Add script for configuring Surface Book touchpad
This commit is contained in:
parent
7930880ac1
commit
ab9141cbdf
2 changed files with 31 additions and 0 deletions
26
scripts/Unix/Config/KDE/input.sh
Normal file
26
scripts/Unix/Config/KDE/input.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
function addInputConfig() {
|
||||
local configFile=/etc/xdg/kcminputrc;
|
||||
local id1="$1";
|
||||
local id2="$2";
|
||||
local deviceName="$3";
|
||||
local statements="${@:4}";
|
||||
|
||||
if [ -z "$statements" ]
|
||||
then
|
||||
statements="$(cat)";
|
||||
fi;
|
||||
|
||||
if ! { cat "$configFile" | grep "\\[$deviceName\\]"; } > /dev/null 2>&1
|
||||
then
|
||||
{
|
||||
if [ -f "$configFile" ] && [ -n "$(cat "$configFile")" ]
|
||||
then
|
||||
echo "";
|
||||
fi;
|
||||
|
||||
echo "[Libinput][$id1][$id2][$deviceName]";
|
||||
echo "$statements";
|
||||
} | sudo tee "$configFile" > /dev/null;
|
||||
fi;
|
||||
}
|
5
scripts/Unix/Devices/Surface Book 2/install.sh
Normal file
5
scripts/Unix/Devices/Surface Book 2/install.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "../../Config/KDE/input.sh";
|
||||
addInputConfig "1118" "2338" "Microsoft Surface Keyboard Touchpad" "NaturalScroll=true";
|
||||
popd > /dev/null;
|
Loading…
Reference in a new issue