BindIO is a lightweight scripting language built on Rhai that integrates with your display server to bind input events like keypresses and mouse clicks to custom scripted actions. BindIO currently only supports Linux with X11.
BindIO uses a workspace structure with separate crates:
bindio-core: Core engine and platform abstractionbindio-x11: X11 backend implementationbindio-cli: Command-line interface
For X11 support:
# Ubuntu/Debian
sudo apt-get install libx11-dev libxtst-dev
# Fedora/RHEL
sudo dnf install libX11-devel libXtst-develgit clone https://github.com/K-JBoon/bindio
cd bindio
cargo build --releaseThe binary will be available at target/release/bindio.
# Run a script file
bindio run examples/basic.bio
# Execute a script
bindio exec 'print("Hello World")'
# REPL mode
bindio replBindIO's scripting language is built on top of Rhai. In addition to the default features of the Rhai scripting language, BindIO adds the following functions and operators.
// Get active window
let window = get_active_window();
print("Active window: " + window);To add support for a new platform:
- Create a new crate in
crates/bindio-{platform} - Implement the
PlatformBackendtrait frombindio-core - Add the backend to
fn create_backendin the BindIO CLI - Update the workspace
Cargo.toml
Licensed under either of the following, at your choice:
Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion in this crate, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.