From bc8a5889c4bb52405f2ac73d18a42ab43e93e867 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 14 Aug 2026 05:17:54 +0800 Subject: feat: add Lua config modules for Hyprland Split the monolithic Hyprland config into modular Lua files covering appearance, input, keybindings, monitors, startup, window rules, and workspace settings. --- input.lua | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 input.lua (limited to 'input.lua') diff --git a/input.lua b/input.lua new file mode 100644 index 0000000..81e63b4 --- /dev/null +++ b/input.lua @@ -0,0 +1,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, +}) -- cgit