https://github.com/urschrei/rust_anybar
A command-line Anybar client written in Rust
https://github.com/urschrei/rust_anybar
anybar cli rust udp
Last synced: about 1 year ago
JSON representation
A command-line Anybar client written in Rust
- Host: GitHub
- URL: https://github.com/urschrei/rust_anybar
- Owner: urschrei
- License: mit
- Created: 2015-06-02T16:32:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T01:56:38.000Z (over 3 years ago)
- Last Synced: 2024-05-14T00:30:17.241Z (about 2 years ago)
- Topics: anybar, cli, rust, udp
- Language: Rust
- Homepage: https://docs.rs/crate/anybar_rs
- Size: 1.47 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
[](https://crates.io/crates/anybar_rs) [](license.txt)
# Description
`anybar_rs` is a command-line app for controlling the macOS [Anybar](https://github.com/tonsky/AnyBar) application.
# Installation
- Download the latest version [here](https://github.com/urschrei/rust_anybar/releases/latest)
- unzip, then copy the binary into your `$PATH` (e.g. `/usr/local/bin`)
- Alternatively:
- install Rust and Cargo. Using [rustup.rs](https://www.rustup.rs) is the easiest way to do this
- run `cargo install anybar_rs`
- The binary should now be available to use. To check, run `anybar_rs --help`.
# Building from Source
- Clone this project
- Run `cargo build --release` from the project root
- The binary will be available as `target/release/anybar_rs`
- Copy it into your `$PATH`.
# Usage
By default, `anybar_rs` assumes that Anybar is bound to localhost on UDP port 1738. Call it like so:
`anybar_rs [FLAGS] [OPTIONS] `
**FLAGS**:
`-h`, `--help` Prints help information
`-V`, `--version` Prints version information
**OPTIONS**:
`-p`, `--port` Set destination UDP port. Input must be 0 – 6553, and defaults to 1738
**ARGS**:
`COMMAND` The command you wish to send to Anybar
Where `COMMAND` is one of the following:
- white
- red
- orange
- yellow
- green
- cyan
- blue
- purple
- black
- question
- exclamation
- quit
# Exit codes
Being a stateless protocol, UDP provides no mechanism for checking whether its datagrams arrive.
- If the UDP datagram is succesfully *sent*, `anybar_rs` will exit with code `0`.
- Unknown flags, options, or an unknown `command` will print the usage and exit with code `1`.
# License
MIT