monitors.lua picks the main external (Studio Display, else the Samsung S34CG50 ultrawide, matched on EDID) and reloads the config when it changes. Workspaces 1-4, the Wacom mapping, and its active-area aspect follow it. eDP-1 uses auto-right so it sits beside whichever external is connected. Also unbinds SUPER+RETURN / SUPER+SHIFT+RETURN (terminal and browser live on SUPER+CTRL+ALT+J/K) and pins the Fastmail/Beeper scratch workspaces' comments to eDP-1.
138 lines
6.0 KiB
Lua
138 lines
6.0 KiB
Lua
-- Keep only your personal input overrides here. Uncommented settings below
|
|
-- replace Omarchy's defaults.
|
|
|
|
-- Key repeat: Omarchy's 250ms delay kept, rate raised 40 -> 50Hz. 200 / 50 was
|
|
-- tried and felt too fast; the "typing lag" it was meant to fix turned out to be the
|
|
-- Pilot W-Corne's firmware (55d4:0461, Vial/QMK over a 2.4GHz dongle)
|
|
-- resolving its MT(LGUI,SPC) / MT(LCTL,SPC) thumb keys as holds the moment
|
|
-- another key went down. Fixed on the board itself: Vial QMK Settings ->
|
|
-- Tap-Hold -> "Ignore Mod Tap Interrupt" (qsid 8 bit 1), tapping term 150ms.
|
|
--
|
|
-- The rest of the keystroke path was checked and is already optimal: the
|
|
-- dongle advertises bInterval=1 (1000Hz polling), udev pins power/control=on
|
|
-- (no USB autosuspend), nothing polls its raw-HID interface, WiFi sits on
|
|
-- 5GHz, and render:new_render_scheduling is off (no triple-buffer frame).
|
|
-- Remaining latency is the 60Hz Studio Display refresh and the fcitx5
|
|
-- input-method hop (see omarchy-fcitx5.service), neither an input option.
|
|
hl.config({
|
|
input = {
|
|
repeat_delay = 250,
|
|
repeat_rate = 50,
|
|
|
|
-- niri has no focus-follows-mouse: hovering gives a window pointer focus
|
|
-- (scroll goes there) but keyboard focus moves only on click. Also keeps
|
|
-- the scrolling tape from jumping when the cursor brushes a neighbour.
|
|
follow_mouse = 2,
|
|
|
|
-- niri: touchpad { natural-scroll; tap; }. Tap-to-click is libinput's
|
|
-- default already.
|
|
touchpad = {
|
|
natural_scroll = true,
|
|
},
|
|
},
|
|
})
|
|
|
|
-- niri's built-in touchpad gestures: three fingers sideways scroll the tape,
|
|
-- up/down switch workspace.
|
|
hl.gesture({ fingers = 3, direction = "horizontal", action = "scroll_move" })
|
|
hl.gesture({ fingers = 3, direction = "vertical", action = "workspace" })
|
|
|
|
-- Keyboard layout and options.
|
|
-- See https://wiki.hypr.land/Configuring/Basics/Variables/#input
|
|
-- hl.config({
|
|
-- input = {
|
|
-- -- Use multiple keyboard layouts and switch between them with Left Alt + Right Alt.
|
|
-- kb_layout = "us,dk,eu",
|
|
-- kb_options = "compose:caps,shift:both_capslock_cancel,grp:alts_toggle",
|
|
--
|
|
-- -- Use a specific keyboard variant if needed (e.g. intl for international keyboards).
|
|
-- kb_variant = "intl",
|
|
--
|
|
-- -- Change speed of keyboard repeat.
|
|
-- repeat_rate = 40,
|
|
-- repeat_delay = 250,
|
|
--
|
|
-- -- Start with numlock on by default.
|
|
-- numlock_by_default = true,
|
|
--
|
|
-- -- Increase sensitivity for mouse/trackpad (default: 0).
|
|
-- sensitivity = 0.35,
|
|
--
|
|
-- -- Turn off mouse acceleration (default: adaptive).
|
|
-- accel_profile = "flat",
|
|
--
|
|
-- touchpad = {
|
|
-- -- Use natural (inverse) scrolling.
|
|
-- natural_scroll = true,
|
|
--
|
|
-- -- Use two-finger clicks for right-click instead of lower-right corner.
|
|
-- clickfinger_behavior = true,
|
|
--
|
|
-- -- Control the speed of your scrolling.
|
|
-- scroll_factor = 0.4,
|
|
--
|
|
-- -- Enable the touchpad while typing.
|
|
-- disable_while_typing = false,
|
|
--
|
|
-- -- Left-click-and-drag with three fingers.
|
|
-- drag_3fg = 1,
|
|
-- },
|
|
-- },
|
|
-- })
|
|
|
|
-- App-specific touchpad scroll speeds.
|
|
-- o.window("(Alacritty|kitty|foot)", { scroll_touchpad = 1.5 })
|
|
-- o.window("com.mitchellh.ghostty", { scroll_touchpad = 0.2 })
|
|
|
|
-- Touchpad gestures live in the override block at the top of this file.
|
|
|
|
-- Tablets / pens.
|
|
-- Hyprland maps a tablet across the *whole* monitor layout by default
|
|
-- (input.tablet.output is empty), so a pen stretches over eDP-1 + the external
|
|
-- display at once. Pin each tablet to a single output instead.
|
|
-- Device names come from `hyprctl devices` (the "Tablet" entry, not "Tablet Pad").
|
|
|
|
-- Built-in digitizer of the Flow Z13: it physically *is* the laptop panel.
|
|
-- Pen and finger are separate devices; the finger one is the "Touch" entry.
|
|
hl.device({ name = "elan9008:00-04f3:43c7-stylus", output = "eDP-1" })
|
|
-- Unbound, Hyprland maps a touch onto whichever monitor is *focused*
|
|
-- (onTouchDown falls back to the focused monitor when the device has no
|
|
-- output), so a tap on the panel landed on the Studio Display. Bound, the tap
|
|
-- focuses eDP-1 and then the window under the finger.
|
|
hl.device({ name = "elan9008:00-04f3:43c7", output = "eDP-1" })
|
|
--
|
|
-- Palm rejection while writing is libinput's job, not Hyprland's: with the
|
|
-- pen in proximity it drops touches on the paired touchscreen (same
|
|
-- LIBINPUT_DEVICE_GROUP) -- *all* of them only if the pen reports no tilt;
|
|
-- with tilt it drops just a 200x250mm rectangle whose side is guessed from
|
|
-- the tilt sign, and this pen reports ABS_TILT_X/Y, so a resting palm kept
|
|
-- landing as taps and scrolls. /etc/libinput/local-overrides.quirks (not
|
|
-- chezmoi-managed; the Flow Z13 stylus section) strips the tilt axes, which
|
|
-- flips arbitration to ignore-all. Cost: no tilt in drawing apps. The 90ms
|
|
-- re-enable after the pen leaves proximity is hard-coded in libinput.
|
|
|
|
-- Wacom Intuos BT S: pinned to the main external display (Studio Display or
|
|
-- Samsung ultrawide, see hypr/monitors.lua, which reloads the config when it
|
|
-- changes). With neither connected it keeps the Studio Display selector,
|
|
-- which matches nothing, so Hyprland maps across the whole layout
|
|
-- (undocked: just eDP-1).
|
|
--
|
|
-- The tablet is 152x95mm (16:10). The active area is cropped to a full-width
|
|
-- band with the display's aspect ratio (152x85.5mm for the 16:9 Studio
|
|
-- Display, 152x63.6mm for the 3440x1440 ultrawide) to keep strokes
|
|
-- undistorted while still reaching every pixel. The band starts at the top
|
|
-- edge; below it is dead space (the pen there parks at the screen bottom).
|
|
local monitors = require("hypr.monitors")
|
|
local external, monitor = monitors.external()
|
|
hl.device({
|
|
name = "wacom-intuos-bt-s-pen",
|
|
output = external or monitors.externals[1],
|
|
active_area_size = { 152, monitor and 152 * monitor.height / monitor.width or 85.5 },
|
|
active_area_position = { 0, 0 },
|
|
})
|
|
|
|
-- Left-handed use rotates the tablet 180 degrees: left_handed = true
|
|
|
|
-- The 4 ExpressKeys ("Tablet Pad") cannot be bound from Hyprland; only apps
|
|
-- that implement the tablet-v2 pad protocol (e.g. Krita) see them.
|