OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
wayland-compat medium common DISPUTE

Replace xdotool in scripts that do nothing on Hyprland

omarchyarchendeavouroscachyosmanjarohyprlandwayland
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

wtype is line 140 of /usr/share/omarchy/install/omarchy-base.packages and ydotool is in neither Omarchy package list. Migration /usr/share/omarchy/migrations/1787865477.sh removes the user from input unless xpadneo-dkms or ydotool is installed, as the cause says. ydotool 1.0.4 ships /usr/lib/systemd/user/ydotool.service and /usr/lib/udev/rules.d/80-uinput.rules setting GROUP="input", MODE="0660", and its click and mousemove -x -y help output matches the commands. Omarchy's paste script uses wtype -M shift -k Insert -m shift. The Arch Wayland page lists wtype and ydotool (with the ydotool.service user unit). One omission matters for the danger: on this machine the user is not in input, yet getfacl /dev/uinput shows user:techluddite:rw-, granted by TAG+="uaccess" in /usr/lib/udev/rules.d/60-steam-input.rules from steam-devices. Anyone with Steam installed already has uinput access and should not add the keylogging-capable group. Added that check to the fix. Source defect: https://wiki.hypr.land/Configuring/Dispatchers/ returns 404 and dispatchers are not what the record relies on, so it is removed. Not exercised: I did not run wtype or ydotool.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Membership of the input group gives every process you run raw read and write access to /dev/input/event*, so any of them can log keystrokes or inject input. Omarchy's migration removed that grant for this reason. Prefer wtype and add the group only if you need mouse automation.

Symptom

My scripts and hotkey tools that use xdotool type, xdotool key or xdotool click do nothing on Hyprland. They only work when an X11 app is focused. Text expanders and macro tools built on xdotool are dead in the browser and the terminal.

Cause

xdotool drives the X server through XTest, and under Wayland the only X server is XWayland, so its events only reach XWayland windows. Native Wayland apps need input injected through a Wayland protocol or the kernel. wtype types through the Wayland virtual-keyboard protocol with no root, and Omarchy 4 installs it by default (it is in omarchy-base.packages). ydotool writes to /dev/uinput, so it also handles the mouse, but needs its daemon and access to that device. Omarchy does not install ydotool, and an Omarchy migration removes the user from the input group unless ydotool or xpadneo-dkms was already installed when it ran.

Fix

**Keyboard: use wtype.**


wtype 'hello world'                    # type text
wtype -M ctrl -k v -m ctrl             # Ctrl+V
wtype -M shift -k Insert -m shift      # Shift+Insert (what Omarchy itself uses)
wtype -s 200 'after 200 ms'            # sleep before typing

Omarchy 4 installs wtype by default. On plain Arch install it first with sudo pacman -S --needed wtype.

**Mouse: use ydotool.**


sudo pacman -S --needed ydotool
systemctl --user enable --now ydotool.service
ydotool click 0xC0                      # left click (down then up)
ydotool mousemove -x 100 -y 50          # relative move
ydotool type 'hello'

The package's udev rule makes /dev/uinput root:input 0660. If journalctl --user -u ydotool shows ydotoold cannot open /dev/uinput, check access first:


ls -l /dev/uinput
getfacl /dev/uinput
id -nG

If getfacl already lists user:<you>:rw-, you have access through a uaccess ACL (Steam's steam-devices package adds one) and need nothing more. Only otherwise add yourself to input, then log out and back in:


sudo usermod -aG input "$USER"

Verify

Focus a native Wayland window such as the terminal, run sleep 2; wtype test and switch focus within two seconds: test appears. For ydotool, systemctl --user is-active ydotool prints active and ydotool click 0xC0 clicks.

Sources

xdotool-scripts-do-nothing-on-wayland