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.1.tar.gz (10.9 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.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for totobotkey-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4239c7d50451fc3d582d5122977c08b6515aadf437c8a462334f9370d182376f
MD5 8099930f3225ba554a5f481c71d2a745
BLAKE2b-256 4c75647ae940d17bfbb27e0f9ab0e4618ef1ca227ce7ba5225f24cddd45f0c39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TotoBotKey-0.0.1-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.12.7

File hashes

Hashes for TotoBotKey-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e70c3ca2c7660d8fe0dc3e824a0e41569293e7e6851d37093eecc3224ce181a
MD5 39ee7d8399d2d0fb1b57e25ebdb71a78
BLAKE2b-256 8246cc8df7ac8ed0407716350a4a8a3484033b2b89c02ae7382006da7e2b7d96

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