fix: touchpad setting document

This commit is contained in:
Klesh Wong 2021-09-27 14:29:05 +08:00
parent ca5636787a
commit d0ef05e4a9
2 changed files with 12 additions and 1 deletions

11
doc/touchpad.md Normal file
View File

@ -0,0 +1,11 @@
# Adjust speed, scrolling direction
1. install `xinput`
2. `xinput list` to find out your touchpad id
3. `xinput list-props <device_id>` to find settings
```sh
libinput Natural Scrolling Enabled (298): 0
libinput Natural Scrolling Enabled Default (299): 0
```
4. `xinput set-prop 298 1` to set Natural Scrolling
4. `xinput set-prop 299 1` to set Natural Scrolling

View File

@ -7,7 +7,7 @@ xrandr | awk '
$2 == "connected" && $3 == "primary" {
if (match($0, / ([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+) (left|right)?/, m1) &&
match($0, / ([0-9]+)mm x ([0-9]+)mm$/, m2)) {
DPI=m1[1]*25.4/m2[m1[5]?2:1]
DPI=m1[1]*25.4/m2[m1[5]?2:1]*0.8
printf "Xft.dpi: %i", DPI
}
}