actiona
actiona copied to clipboard
Allow compatibility with Wayland-based systems
Wayland
is slowly becoming the new thing in Linux-based OSes (and BSD too I would guess). Actiona is currently not compatible with it because it uses a lot of X11 functions, including XTest
to simulate user input.
Here are a list of features used by Actiona and how they may be implemented in Wayland-based systems:
- Mouse/Keyboard input simulation
- Freedesktop's
RemoteDesktop
allows you to move the cursor and press keys, but it's not really made for automation and has limited features. - Wayland's protocol: https://github.com/swaywm/wlr-protocols/blob/master/unstable/wlr-virtual-pointer-unstable-v1.xml Looks promising, but is unstable for now. Will experiment with it though.
-
uinput
is probably the solution here, but that requires access to/dev/uinput
. We will probably have to create a daemon to simulate input, and Actiona would communicate with it using D-Bus or a Unix socket. Not exactly piece of cake. See https://github.com/ReimuNotMoe/ydotool as an example.
- Freedesktop's
- Mouse/Keyboard input recording
-
libevdev
could be a solution, using the same daemon as above.
-
- Taking screenshots
- the D-Bus interface
org.gnome.Shell.Screenshot
allows that, will have to look how to do the same on non-Gnome OSes.
- the D-Bus interface
- Window listing/manipulation
- there seem to be some D-Bus interfaces to list windows on Gnome at least (called
introspection
). - I'm not sure how many window manipulation features via D-Bus are stable and widespread across distributions.
- there seem to be some D-Bus interfaces to list windows on Gnome at least (called
- Hotkeys (global shortcuts)
- maybe a Wayland protocol, like above?
Depends on #143.
Maybe check "grim" to screenshots for wlroots (wlr-screencopy-unstable-v1)