Pin a touchscreen or drawing tablet to the right monitor in Hyprland
Fix confirmed against the hyprland-wiki repo (content/configuring/core/config-options.md and devices.md, main branch): input.touchdevice.output defaults to auto-detection, input.tablet.output accepts "current" or a monitor name and defaults to empty (all monitors), transform takes 0 to 6 in both, and hl.device() takes a name plus output for tablets, with the warning to use the Tablet device rather than Tablet Pad or Tablet Tool. On this workstation hyprctl devices -j has the keys touch and tablets, so the jq filter is right, and ~/.config/hypr/input.lua is a real Omarchy 4 override file loaded after the defaults (/usr/share/omarchy/config/hypr/hyprland.lua requires hypr.input). The cause overstates the re-enable defect. Both cited Omarchy issues (#5903 on Omarchy 3.8.0, #5324 on 3.5.0) predate Hyprland 0.55, a commenter on #5903 says 0.55 fixed it, and the Hyprland v0.55.0 release notes list three multi-monitor touch fixes (#13764, #13819, #14310). Whether the re-enable case still happens on 0.56.2 is not confirmed, so the cause now says that instead of presenting it as current behaviour. Hyprland discussion #12308 is about a touchscreen pen being treated as a tablet and mapped to the primary display, which supports pinning input.tablet.output for pens too. Nothing was exercised: no reload or keyword was run.
Symptom
On a 2-in-1 laptop with an external monitor, touching the laptop screen moves the cursor on the external display instead, "almost like a graphics tablet". It often starts after turning the laptop panel off and on again. Or a Wacom/Huion/XP-Pen tablet is stretched across both monitors so circles draw as ovals.
Cause
Hyprland maps touch devices to an output by auto-detection (input.touchdevice.output defaults to auto) and maps tablets across all monitors unless input.tablet.output is set (an empty value means "map across all monitors"). A touchscreen's pen usually registers as a tablet device, so it follows the tablet rule, not the touch rule (Hyprland discussion #12308). The two Omarchy reports, touch landing on the external monitor after the laptop panel was turned off and on (#5903) and touch spread across every monitor (#5324), were filed on Omarchy 3.8.0 and 3.5.0, before Hyprland 0.55. Hyprland 0.55.0 shipped several multi-monitor touch fixes (#13764, #13819, #14310), and a commenter on #5903 says the re-enable case is fixed there. Whether it still happens on Omarchy 4's Hyprland 0.56 is not confirmed. Pinning the output removes the dependence on auto-detection either way. On Wayland xsetwacom does not apply, so the mapping has to be set in the compositor.
Fix
Find the names:
hyprctl monitors | grep ^Monitor # e.g. eDP-1, DP-2
hyprctl devices -j | jq -r '.touch[]?.name, .tablets[]?.name'
Pin them. On Omarchy 4 put this in ~/.config/hypr/input.lua, on plain Hyprland in ~/.config/hypr/hyprland.lua:
hl.config({
input = {
touchdevice = {
output = "eDP-1",
},
tablet = {
output = "DP-2", -- or "current" to follow the focused monitor
},
},
})
Per device instead (use the Tablet device name, not Tablet Pad or Tablet Tool):
hl.device({ name = "wacom-intuos-s-pen", output = "DP-2" })
If the panel is rotated, match it with transform (same values as monitor rotation, 0 to 6) in the same touchdevice or tablet table.
hyprctl reload
Verify
Touch each corner of the laptop panel and the cursor lands under your finger, also after toggling the panel off and on. A tablet stroke from corner to corner spans only the chosen monitor.
Sources
- https://github.com/omacom/omarchy/issues/5903
- https://wiki.hypr.land/configuring/core/config-options/
- https://wiki.hypr.land/configuring/core/devices/
- https://wiki.archlinux.org/title/Graphics_tablet
- https://github.com/omacom/omarchy/issues/5324
- https://github.com/hyprwm/hyprland-wiki/blob/main/content/configuring/core/config-options.md
- https://github.com/hyprwm/hyprland-wiki/blob/main/content/configuring/core/monitors/positioning.md
- https://github.com/hyprwm/Hyprland/discussions/12308
- https://github.com/hyprwm/hyprland-wiki/blob/main/content/configuring/core/devices.md
- https://github.com/hyprwm/Hyprland/releases/tag/v0.55.0