Skip to main content

Just like AutoHotKey, on Wayland (and probably X)

Project description

TotoBotKey

Just like AutoHotKey !*

*with a $0 budget and 8 hours of work

What is this ?

A scripting macro tool written in Python, mainly destined to Wayland (but it might work with Xorg too, ig ?). The inputs are simulated using ydotool, whereas the events are managed simply by reading udev's input files.

It work not unsimilarly to AutoHotKey, which I've yet to find a satisfying replacement on Linux, and more specifically on Wayland.

Why tho ?

I've yet to find a satisfying replacement on Linux, and more specifically on Wayland. Apparently, KDE's macro tool is complete enough to do most stuff, but I believe that a single script to rule them all that handles everything feels easier to use and manage. Also, versioning™-capable !

What do I need ?

  • A computer and an OS that uses Wayland
  • Python 3.9+
  • ydotool, which also includes ydotoold

Quick note on ydotoold : (I AM NOT A SYSADMIN, DON'T TAKE THIS AS A GOOD SECURITY MEASURE)
It is recommended to run it as root user, but by doing so, ydotoold will create a socket file that's unreadable by a normal user.

The way I am running ydotoold right now is the following :

  • Added myself to input group
  • Added export YDOTOOL_SOCKET='/tmp/.ydotool_socket' in my ~.bashrc
  • A service runs ydotoold -P 660 -o 0:<input GID>

To-do List

By order of priority :

  • Refactor and clean codebase (lmao)
  • Add support for each ydotool command options (delaying keys, sending keydown/up, etc.)
  • Add keydown/keyup events
    • i'm starting to think that it doesn't make much sense
  • Encapsulate decorations into a class
  • Better handling of keyboard layout
    • Current solution : "you figure out your own keys dictionary"
    • Final solution : "let's use input.h because ydotool said so"
  • Add a screenshot function (or a library that does just that on Wayland)
    • "You figure out your own screenshot function"
  • Provide a basic GUI to manage running scripts
    • Maybe also a killswitch which you can activate with a shortcut, a click or just hovering your mouse above

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

totobotkey-0.0.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TotoBotKey-0.0.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file totobotkey-0.0.2.tar.gz.

File metadata

  • Download URL: totobotkey-0.0.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for totobotkey-0.0.2.tar.gz
Algorithm Hash digest
SHA256 208d9c294f3c49ca11910369c2bf0331df5ed8886ce90c286bcf8855e72ff274
MD5 97e07f4f38d460ea2f953694d75d1e64
BLAKE2b-256 a29b855ae52278ec2fabbaf59948ee3d0370ee1858d2096ed54efb186acc3a4f

See more details on using hashes here.

File details

Details for the file TotoBotKey-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: TotoBotKey-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for TotoBotKey-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6cdc32364a46fdbc4d0618b7794b558f7474dc1110c50532d5e63fe4d8e3ddd3
MD5 b41620cb5bb4d43e3c657afdcd13c212
BLAKE2b-256 c9eb1082c8888304e7b024c6812d5ff60771edaeb6768f3710ae7987c3eaa7cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page