rust-bitbar

Crates.iorust-bitbar
lib.rsrust-bitbar
version0.3.4
sourcesrc
created_at2019-02-02 22:59:36.642799
updated_at2019-03-06 11:08:42.915031
descriptionRust crate to build BitBar plugins
homepage
repositoryhttps://github.com/bnjjj/rust-bitbar
max_upload_size
id112272
size16,473
Coenen Benjamin (bnjjj)

documentation

README

rust-bitbar Travis Badge Version Documentation

This repo contains a crate for creating BitBar plugins in Rust.

Usage

Here is a simple example :

use rust_bitbar::{Line, Plugin, SubMenu};

fn main() {
    let mut pl = Plugin::new();
    let mut line = Line::new("first line");
    line.set_color("red")
        .set_href("http://google.com");

    let mut sub_menu = SubMenu::new();
    sub_menu.add_line(line);

    let status_line = Line::new("🍺🍺🍺");
    pl.set_status_line(status_line).set_sub_menu(sub_menu);

    pl.render();
}

To have more details please check the official documentation.

Commit count: 15

cargo fmt