Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

r0chd/whydotool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whydotool

A Wayland-native command-line automation tool.

Inspired by ydotool, it simulates keyboard and mouse input using native Wayland protocols.

Features

  • click - simulate mouse button presses
  • mousemove - Move the pointer (relative or absolute)
  • type - type strings of text
  • key- press and release individual keys
  • stdin - stream key events from standard input in real time
  • no root required
  • no daemon required

Requirements

whydotool works on most major Wayland compositors via either:

  • Native Wayland protocols

  • xdg-desktop-portal RemoteDesktop interface

Protocol Support

Keyboard input (key, type, stdin):

Pointer input (click, mousemove):

Universal alternative: If your compositor doesn’t support the above protocols, whydotool can use the xdg-desktop-portal RemoteDesktop interface. See the list of supported backends

If your compositor doesn't support the specific protocols above, it will likely work through the portal interface. Check the linked compatibility tables to verify support for your compositor.

Build

Clone the repository and enter it:

git clone https://forgejo.r0chd.pl/r0chd/whydotool
cd whydotool

To build with the default configuration:

cargo build --release

To explicitly disable portal support:

cargo build --no-default-features --release

Disabling portal support reduces dependencies and binary size, but limits compatibility to compositors that implement the native virtual input protocols.

After building binary can be found at ./target/release/whydotool

Examples

Type text:

whydotool type "Hello Wayland"

Press a key:

whydotool key 56:1 62:1 62:0 56:0

Relatively move mouse pointer by -100,100:

whydotool mousemove -x -100 -y 100

Move mouse pointer to 100,100:

whydotool mousemove --absolute -x 100 -y 100

Mouse right click:

whydotool click 0xC1

Mouse repeating left click:

whydotool click --repeat 5 --next-delay 25 0xC0

whydotool vs. ydotool

Feature whydotool ydotool
Compatibility Wayland only Runs everywhere
Security Model Uses compositor-granted Wayland protocols or xdg-desktop-portal Writes directly to uinput
Privileges Does not require root Requires root privileges
Daemon Daemonless Requires a running daemon

About

Wayland-native command-line automation tool

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors