| 1 | -- source/input.lua |
| 2 | |
| 3 | -------------------------------------------------- |
| 4 | -- Global Input |
| 5 | -------------------------------------------------- |
| 6 | |
| 7 | hl.config({ |
| 8 | input = { |
| 9 | kb_layout = "us", |
| 10 | kb_variant = "", |
| 11 | kb_model = "", |
| 12 | kb_options = "", |
| 13 | kb_rules = "", |
| 14 | |
| 15 | follow_mouse = 1, |
| 16 | |
| 17 | -- -1.0 .. 1.0 |
| 18 | sensitivity = 0, |
| 19 | |
| 20 | touchpad = { |
| 21 | natural_scroll = false, |
| 22 | }, |
| 23 | |
| 24 | repeat_delay = 300, |
| 25 | repeat_rate = 50, |
| 26 | }, |
| 27 | }) |
| 28 | |
| 29 | -------------------------------------------------- |
| 30 | -- Gestures |
| 31 | -------------------------------------------------- |
| 32 | |
| 33 | hl.config({ |
| 34 | gestures = { |
| 35 | -- swiping past the last workspace would create the next monitor's (11, 21, ...) |
| 36 | workspace_swipe_create_new = false, |
| 37 | }, |
| 38 | }) |
| 39 | |
| 40 | -- 3-finger horizontal swipe: previous/next workspace on the focused monitor |
| 41 | hl.gesture({ |
| 42 | fingers = 3, |
| 43 | direction = "horizontal", |
| 44 | action = "workspace", |
| 45 | }) |
| 46 | |
| 47 | -- 4-finger horizontal swipe: drag the focused window to the previous/next workspace |
| 48 | hl.gesture({ |
| 49 | fingers = 4, |
| 50 | direction = "horizontal", |
| 51 | action = "move", |
| 52 | }) |
| 53 | |
| 54 | -- 3-finger up: aurora's workspace overview |
| 55 | hl.gesture({ |
| 56 | fingers = 3, |
| 57 | direction = "up", |
| 58 | action = function() |
| 59 | hl.dispatch(hl.dsp.exec_cmd("qs -c aurora ipc call shell overview")) |
| 60 | end, |
| 61 | }) |
| 62 | |
| 63 | -- 3-finger down: scratchpad (same special workspace as SUPER+S) |
| 64 | hl.gesture({ |
| 65 | fingers = 3, |
| 66 | direction = "down", |
| 67 | action = "special", |
| 68 | workspace_name = "magic", |
| 69 | }) |
| 70 | |
| 71 | -- 3-finger pinch: zoom around the cursor |
| 72 | hl.gesture({ |
| 73 | fingers = 3, |
| 74 | direction = "pinch", |
| 75 | action = "cursorZoom", |
| 76 | zoom_level = 2, |
| 77 | mode = "live", |
| 78 | }) |
| 79 | |
| 80 | -------------------------------------------------- |
| 81 | -- Per-device Configuration |
| 82 | -------------------------------------------------- |
| 83 | |
| 84 | hl.device({ |
| 85 | name = "epic-mouse-v1", |
| 86 | sensitivity = -0.5, |
| 87 | }) |