| Crates.io | sketchybar-rs |
| lib.rs | sketchybar-rs |
| version | 0.2.0 |
| created_at | 2023-10-11 16:11:25.622273+00 |
| updated_at | 2024-01-06 15:51:52.939789+00 |
| description | Send messages and receive events from SketchyBar |
| homepage | |
| repository | https://github.com/johnallen3d/sketchybar-rs |
| max_upload_size | |
| id | 1000406 |
| size | 17,552 |
Send messages to SketchyBar from Rust! This library crate embeds the SketchyBarHelper sketchybar.h.
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");
}
For fun. I'm learning Rust and writing some crates to execute as scripts for my widgets for practice.