Give Input keycaps, a shortcut search, and the missing pointer basics

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-24 15:21:01 -04:00
parent b8f88a91f3
commit aba2d16ffa
25 changed files with 2346 additions and 191 deletions
+46
View File
@@ -35,6 +35,13 @@ hl.config({
-- Still focus-follows-pointer, just less twitchy.
mouse_refocus = false,
-- 0 = NEXT, the compositor's own default: focus goes to the next window
-- in the layout order. `hyprctl descriptions` publishes
-- map: [{"mru":2},{"cursor":1},{"next":0}], and Settings offers all
-- three; 0 is repeated here so nothing changes on a machine with no
-- settings file.
focus_on_close = prefs.getInt("focusOnClose", 0),
-- Flat pointer response by default, no acceleration. Matters for
-- gaming; Settings offers adaptive for people who want it back.
sensitivity = prefs.get("pointerSensitivity", 0),
@@ -44,6 +51,21 @@ hl.config({
scroll_factor = prefs.get("scrollFactor", 1.0),
left_handed = prefs.get("leftHanded", false),
-- Empty is a value, not an omission: it is what `hyprctl getoption`
-- reports as "[[EMPTY]]" before anything writes the option, and it means
-- "let libinput pick per device" -- two fingers on a touchpad, the wheel
-- on a mouse. Writing it back explicitly is the same branch a stock
-- Hyprland takes, and it keeps the setting reversible: without an empty
-- choice in the schema there would be no way back from a scroll method
-- once one was picked. Settings offers 2fg / edge / on_button_down /
-- no_scroll alongside it, the four words the option's own description
-- names (it publishes no map).
scroll_method = prefs.get("scrollMethod", ""),
-- Only consulted while scroll_method is on_button_down. 0 means the
-- device's own middle button.
scroll_button = prefs.get("scrollButton", 0),
-- Clicking a floating window raises and focuses it.
float_switch_override_focus = 2,
@@ -61,9 +83,33 @@ hl.config({
scroll_factor = prefs.get("touchpadScrollFactor", 1.0),
drag_lock = prefs.getInt("touchpadDragLock", 0),
middle_button_emulation = prefs.get("touchpadMiddleButtonEmulation", false),
clickfinger_behavior = prefs.get("touchpadClickfinger", false),
-- Underscores here, hyphens in the option name getoption answers to
-- (input:touchpad:tap-and-drag) -- the same split tap_to_click has
-- at the top of this table. Hyprland's own default is true; it is
-- repeated rather than omitted so the schema, the Lua, and the
-- compositor all state the same value.
tap_and_drag = prefs.get("touchpadTapAndDrag", true),
},
},
-- Pointer BEHAVIOUR, as opposed to pointer appearance: how the cursor reacts
-- to typing and to workspace switches. The cursor's looks -- theme, size,
-- hardware cursors, the inactivity fade -- are a separate cursor table in
-- looks.lua. hl.config calls are additive per option, so the two tables
-- coexist; they are split by what a person would go looking for, and these
-- two appear on Settings' Mouse & Touchpad page rather than in Appearance.
cursor = {
hide_on_key_press = prefs.get("cursorHideWhileTyping", false),
-- An integer with three states, written from a switch: disable = 0,
-- enable = 1, force = 2. Settings offers the first two, so getInt is
-- what bridges a stored boolean to the number Hyprland wants -- the same
-- pairing render.cm_auto_hdr uses in looks.lua.
warp_on_change_workspace = prefs.getInt("cursorWarpOnWorkspaceChange", 0),
},
-- Tuning for the three-finger gestures registered below.
gestures = {
workspace_swipe_distance = prefs.getInt("swipeDistance", 300),