Skip to content
forked from autokey/autokey

A Python 3 port of AutoKey, a desktop automation utility for Linux and X11.

License

Notifications You must be signed in to change notification settings

xuzhao9/autokey

 
 

Repository files navigation

AutoKey-Py3

Join the chat at https://gitter.im/autokey-py3/autokey Ask and answer questions on StackOverflow

About

AutoKey-Py3 (GitHub) is a Python 3 port of AutoKey, a desktop automation utility for Linux and X11.

New features have since been added to AutoKey-Py3 after the initial porting. Read new features for details.

Installation

Please remove previous installations of both AutoKey and AutoKey-Py3 fully before installing!

Dependencies

Python: 3.5

Python modules (common):

  • dbus-python
  • pyinotify
  • python-xlib

GTK frontend only:

  • GObject Introspection
  • PyGTK
  • GtkSourceView
  • libappindicator

QT frontend only:

  • PyQt4
  • PyKDE4

Manual install via pip

pip will automatically resolve and install dependencies, but dbus-python requires the dbus headers be present on your system. These are usually installed through your package manager, and usually are named dbus-devel or libdbus-dev or similar.

pip3 install --user git+https://github.com/autokey-py3/autokey

The "--user" option for pip may be removed if you intend to do a system-wide install.

Ubuntu/Mint/Debian

Try the (experimental) PPA! Note that only Ubuntu 16.04, Mint 18, or above are supported for now as they supply Python 3.5 by default. Earlier versions of Python <= 3.4 require the typing module be installed separately.

sudo add-apt-repository ppa:troxor/autokey
sudo apt update
sudo apt install autokey-gtk

Packages for other Debian-based distros can be built using files under debian/

Arch Linux

Available in the AUR. Unfortunately, Arch has removed the kdebindings-python package, so only the GTK frontend is usable for now.

Gentoo

Available via layman.

layman -a y2kbadbug
emerge --sync
emerge -av autokey-py3

Starting AutoKey-Py3

# make sure that autokey is in your search path.
PATH="$HOME/.local/bin/:$PATH" # if installed with the --user option
autokey-gtk # to start with the GTK3 GUI *OR*
autokey-qt # to start with the QT4 GUI

Documentation

Documentation for new features. For older features, please refer to the original AutoKey's scripting API, wiki, and Stack Overflow.

Examples of AutoKey scripts can be found by searching GitHub and reading AutoKey's wiki.

Porting your scripts from Python 2

Changes were made to source code to keep the scripting API stable. system.exec_command() returns a string. But if you use functions from the standard library you will have to fix that, as your script runs on a Python 3 interpreter. For example, expect subprocess.check_output() to return a bytes object.

2to3 can be used to do automatically translate source code.

Some guides on porting code to Python 3:

Support

Please do not request support on the issue tracker. Instead, head over to the autokey-users Google Groups forum, StackOverflow, on IRC (#autokey on Freenode), or Gitter web-based chat.

We'd appreciate it if you take a look at Problem reporting guide before posting. By providing as much information as you can, you'll have a much better chance of getting a good answer in less time.

Bug reports and Pull Requests

Bug reports and PRs are welcome. Please use the GitHub Issue Tracker for bug reports. When reporting a suspected bug, please test against latest git HEAD and make sure to include as much information as possible to expedite troubleshooting and resolution. For example,

  • required: How to reproduce the issue you are experiencing
  • Python tracebacks, if any
  • Verbose logging information obtained by starting the frontend (autokey-gtk or autokey-qt) from terminal with the --verbose option.

Changelog

Here.

License

GNU GPL v3.

About

A Python 3 port of AutoKey, a desktop automation utility for Linux and X11.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%