Skip to content

mbyx/Automaton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automaton

A Linux Automation Library.

License: MIT Version Manual

Automaton is a library based on uinput designed to be a substitute for AutoHotkey in linux. It has support for hotkeys, hotstrings, and remaps with configurable options, context sensitivity, and device manipulation.

Note

Automaton supports only Linux. Automaton uses uinput in order to work. So your user should either be in the input group, or install Automaton and run scripts as:

sudo pip install automaton-linux
sudo python3 main.py # main.py contains the Automaton app

Usage

A simple Automaton script looks like:

from automaton import Automaton

# devices is a list of paths to the devices that you want to manipulate or monitor.
# More information on how to get the path for your device is in the Manual
app = Automaton.new(devices = [
  '/dev/input/event5',
  '/dev/input/event6'
])

# When btw is typed, hit space. It should be replaced with 'by the way'
@app.on("btw")
def btw():
    return "by the way"
    
app.run() # Blocking.

More info in the docs, or take a look at some examples!

Used in

Requirements

  • Python >= 3.8
  • Python Headers (Python.h) On Ubuntu, getting them is as simple as sudo apt-get install python3-dev