Skip to content
/ BindIO Public

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.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt
Notifications You must be signed in to change notification settings

K-JBoon/BindIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BindIO

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.

Architecture

BindIO uses a workspace structure with separate crates:

  • bindio-core: Core engine and platform abstraction
  • bindio-x11: X11 backend implementation
  • bindio-cli: Command-line interface

Installation

Prerequisites

For X11 support:

# Ubuntu/Debian
sudo apt-get install libx11-dev libxtst-dev

# Fedora/RHEL
sudo dnf install libX11-devel libXtst-devel

Build from source

git clone https://github.com/K-JBoon/bindio
cd bindio
cargo build --release

The binary will be available at target/release/bindio.

Usage

Command Line Interface

# Run a script file
bindio run examples/basic.bio

# Execute a script
bindio exec 'print("Hello World")'

# REPL mode
bindio repl

BindIO Syntax & API

BindIO'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.

Functions

Window Functions

// Get active window
let window = get_active_window();
print("Active window: " + window);

Operators

Development

Adding New Backends

To add support for a new platform:

  1. Create a new crate in crates/bindio-{platform}
  2. Implement the PlatformBackend trait from bindio-core
  3. Add the backend to fn create_backend in the BindIO CLI
  4. Update the workspace Cargo.toml

License

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.

About

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.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages