#send-message #macos #events #widgets #receive #sketchybar #sketchy-bar

sketchybar-rs

Send messages and receive events from SketchyBar

2 unstable releases

0.2.0 Jan 6, 2024
0.1.0 Oct 11, 2023

#7 in #receive

23 downloads per month

MIT license

7KB
51 lines

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.

Dependencies

~215KB