2022-10-20 15:21:20 +02:00
|
|
|
# dotool
|
|
|
|
|
|
|
|
dotool reads commands from stdin and simulates keyboard and mouse events.
|
|
|
|
It works everywhere on Linux, including in X11, Wayland and TTYs.
|
|
|
|
|
2022-10-24 11:29:35 +02:00
|
|
|
## Install From Source
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
With `go` installed, run:
|
2023-01-07 00:03:48 +01:00
|
|
|
|
|
|
|
sudo ./install.sh
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
## Permission
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
dotool requires permission to `/dev/uinput` to create the virtual input
|
|
|
|
devices, and a udev rule grants this to users in group input.
|
2023-01-07 00:03:48 +01:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
You could try:
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
echo type hello | dotool
|
2023-01-07 00:03:48 +01:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
and if need be, you can run:
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
sudo groupadd -f input
|
|
|
|
sudo usermod -a -G input $USER
|
2023-01-07 00:03:48 +01:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
and re-login and trigger the udev rule or just reboot.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
See `dotool --help`, but this greets the world:
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
echo 'type Sup, Lads!' | dotool
|
2023-01-07 00:03:48 +01:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
and this screams for three seconds:
|
|
|
|
|
|
|
|
{ echo keydown A; sleep 3; echo key H shift+1; } | dotool
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-03-05 16:08:52 +01:00
|
|
|
Each instance takes about half a second to register the virtual input devices,
|
|
|
|
but you can keep writing commands to one instance or use the daemon and client,
|
|
|
|
`dotoold` and `dotoolc`:
|
2023-01-07 00:03:48 +01:00
|
|
|
|
|
|
|
dotoold &
|
|
|
|
echo 'type super' | dotoolc
|
|
|
|
echo 'type speedy' | dotoolc
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-04-21 12:08:12 +02:00
|
|
|
## Numen and Contact
|
2022-10-20 15:21:20 +02:00
|
|
|
|
2023-04-21 12:08:12 +02:00
|
|
|
dotool was written for [Numen](https://numenvoice.org), which has a
|
|
|
|
[chat on Matrix](https://matrix.to/#/#numen:matrix.org) you're welcome to join.
|
2023-01-06 23:58:41 +01:00
|
|
|
|
|
|
|
You can also send questions, thoughts or patches by composing an email to
|
2022-12-12 19:27:10 +01:00
|
|
|
[~geb/public-inbox@lists.sr.ht](https://lists.sr.ht/~geb/public-inbox).
|
|
|
|
|
|
|
|
## Support Me
|
|
|
|
|
|
|
|
[Thank you!](https://liberapay.com/geb)
|
2022-11-19 11:08:08 +01:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
GPLv3 only, see [LICENSE](./LICENSE).
|
|
|
|
|
2023-01-09 14:28:39 +01:00
|
|
|
Copyright (c) 2022-2023 John Gebbie
|