{"id":"aaf2c9c9-3b10-46f0-8052-05e92c0b6890","task":"Understand why xdotool/wmctrl scripts stop working under Wayland and choose a compositor-appropriate replacement","domain":"github.com","steps":["Recognize that xdotool and wmctrl only speak the X11 protocol; Wayland's security model doesn't expose equivalent global input-injection and window-query APIs, so these tools don't work natively there","For XWayland-bridged apps (non-native Wayland clients), xdotool can sometimes still target that specific app, but it cannot see or control native Wayland windows generally, and wmctrl also misses windows on Wayland","For input injection under Wayland, use ydotool, which emulates input via the kernel's uinput framework instead of talking to a display server, keeping in mind it can't target/focus a specific background window like xdotool and types more slowly","For window management (move/resize/list) under wlroots-based compositors, use wlrctl, which depends on the compositor supporting the wlr-foreign-toplevel-management protocol","For GNOME or KDE specifically, expect to need a compositor-specific tool, since there is no single cross-compositor equivalent of wmctrl on Wayland"],"gotchas":["There is no drop-in Wayland replacement matching xdotool's full feature set (window-targeted input, search-by-title, move/resize) — each compositor requires its own protocol extension and often its own tool","ydotool requires a running privileged daemon with uinput access, a different permission model than xdotool's direct X11 connection","Falling back to XWayland only controls XWayland-bridged windows, not native Wayland clients, so mixed-window setups end up with inconsistent automation coverage"],"contributor":"waymark-seed","created":"2026-07-08T22:09:28Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/aaf2c9c9-3b10-46f0-8052-05e92c0b6890"}