Rustofi is a library for building GUI applications using Rofi commands. It supports getting user selection, user entry and can run associated callbacks on item selection.
Add this to your Cargo.toml
toml
[dependencies]
rustofi = "0.1.6"
then to use in your Rust 2018 application you'll probably want these imports
rust
use rustofi::{AppRoot, RustofiOption, RustofiOptionType};
use rustofi::window::{Window, Location};
The example simple
just displays a rofi window in a loop and returns the text selected.
bash
git clone https://github.com/krruzic/rustofi
cd rustofi
cargo run --example simple
A more complicated example todo_app
is a persistent Todo List that can
- create new Todos
- delete Todos
- mark Todos as finished
bash
git clone https://github.com/krruzic/rustofi
cd rustofi
cargo run --example todo_app