sketchybar-rs

Crates.iosketchybar-rs
lib.rssketchybar-rs
version0.2.0
sourcesrc
created_at2023-10-11 16:11:25.622273
updated_at2024-01-06 15:51:52.939789
descriptionSend messages and receive events from SketchyBar
homepage
repositoryhttps://github.com/johnallen3d/sketchybar-rs
max_upload_size
id1000406
size17,552
John Allen (johnallen3d)

documentation

README

sketchybar-rs

ci

Send messages to SketchyBar from Rust! This library crate embeds the SketchyBarHelper sketchybar.h.

Usage

Add this to your Cargo.toml:

[dependencies]
sketchybar = "0.1"

Then call the message function:

extern crate sketchybar_rs;

fn main() {
    let _ = sketchybar_rs::message("--query bar");
}

More practically, update one of your widgets:

extern crate sketchybar_rs;

fn main() {
    let _ = sketchybar_rs::message("--set weather label=42°F");
}

Why?

For fun. I'm learning Rust and writing some crates to execute as scripts for my widgets for practice.

Commit count: 5

cargo fmt