1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-- 输入配置(对应 input.conf)
-- 参考 https://wiki.hypr.land/Configuring/Basics/Variables/#input
hl.config({
input = {
kb_layout = "us",
kb_variant = "",
kb_model = "",
kb_options = "caps:escape",
kb_rules = "",
follow_mouse = 1,
-- 合法范围 -1.0 ~ 1.0,0 表示不修改;旧 conf 中的 -10 已超出(原值被旧解析器忽略校验)
sensitivity = -1.0,
scroll_method = "2fg",
touchpad = {
natural_scroll = false,
scroll_factor = 0.5,
clickfinger_behavior = true,
drag_lock = 0,
tap_to_click = true,
drag_3fg = 2,
},
},
})
-- 触摸板手势(对应 input.conf 中的 gesture)
-- 参考 https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/
hl.gesture({
fingers = 3,
direction = "horizontal",
action = "workspace",
})
hl.gesture({
fingers = 3,
direction = "swipe",
mods = "ALT",
action = "move",
})
-- 每设备配置(对应 input.conf 中的 device 块)
-- 参考 https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/
hl.device({
name = "elan07c8:00-04f3:3298-touchpad",
sensitivity = -0.2,
scroll_factor = 0,
accel_profile = "flat",
clickfinger_behavior = true,
})
|