<commit_before># i3ipc-rs

[![Build Status](https://travis-ci.org/tmerr/i3ipc-rs.svg?branch=master)](https://travis-ci.org/tmerr/i3ipc-rs)
[![Crate](http://meritbadge.herokuapp.com/i3ipc)](https://crates.io/crates/i3ipc)
[![Docs](https://docs.rs/i3ipc)](https://docs.rs/i3ipc/badge.svg)

A Rust library for controlling i3-wm through its [IPC interface](https://i3wm.org/docs/ipc.html).

## Usage
Add this to your Cargo.toml
```toml
[dependencies.i3ipc]
version = "0.8.0"
```

## Messages:

```rust
extern crate i3ipc;
use i3ipc::I3Connection;

fn main() {
    // establish a connection to i3 over a unix socket
    let mut connection = I3Connection::connect().unwrap();
    
    // request and print the i3 version
    println!("{}", connection.get_version().unwrap().human_readable);
    
    // fullscreen the focused window
    connection.run_command("fullscreen").unwrap();
}
```

## Events:

```rust<commit_msg>Fix silly README mistake<commit_after># i3ipc-rs

[![Build Status](https://travis-ci.org/tmerr/i3ipc-rs.svg?branch=master)](https://travis-ci.org/tmerr/i3ipc-rs)
[![Crate](http://meritbadge.herokuapp.com/i3ipc)](https://crates.io/crates/i3ipc)
[![Docs](https://docs.rs/i3ipc/badge.svg)](https://docs.rs/i3ipc)

A Rust library for controlling i3-wm through its [IPC interface](https://i3wm.org/docs/ipc.html).

## Usage
Add this to your Cargo.toml
```toml
[dependencies.i3ipc]
version = "0.8.0"
```

## Messages:

```rust
extern crate i3ipc;
use i3ipc::I3Connection;

fn main() {
    // establish a connection to i3 over a unix socket
    let mut connection = I3Connection::connect().unwrap();
    
    // request and print the i3 version
    println!("{}", connection.get_version().unwrap().human_readable);
    
    // fullscreen the focused window
    connection.run_command("fullscreen").unwrap();
}
```

## Events:

```rust
{'fraction_non_alphanumeric': 0.18231144872490504, 'fraction_numerical': 0.020618556701030927, 'mean_word_length': 4.179775280898877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1708172', 'n_tokens_mistral': 711, 'n_tokens_neox': 698, 'n_words': 128}