From 4e11e4f14898e1b47b538174d8e7db8fd69a4e42 Mon Sep 17 00:00:00 2001 From: jamie Date: Sat, 29 Aug 2026 22:19:28 +0100 Subject: chore: rename main binary to mmx150d and set default-run --- Cargo.toml | 3 ++- README.md | 8 ++++---- src/main.rs | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b1157f8..50f77ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,13 +4,14 @@ version = "0.1.0" edition = "2021" description = "Connection monitoring for the beyerdynamic MMX 150 wireless dongle" license = "MIT OR Apache-2.0" +default-run = "mmx150d" [lib] name = "mmx150" path = "src/lib.rs" [[bin]] -name = "mmx150" +name = "mmx150d" path = "src/main.rs" [[bin]] diff --git a/README.md b/README.md index e933f1a..5cc8951 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,19 @@ speakers as the headset powers on and off. ## Usage - mmx150 status + mmx150d status Prints `connected` or `disconnected`. Exit codes: 0 connected, 1 disconnected, 2 dongle missing or error. - mmx150 daemon [--on-connect CMD] [--on-disconnect CMD] [--interval SECS] [--no-initial] + mmx150d daemon [--on-connect CMD] [--on-disconnect CMD] [--interval SECS] [--no-initial] Hooks run via `sh -c` with output discarded. At startup the daemon fires the hook matching the current state, unless `--no-initial` is given. Example, switching the default sink with PipeWire: - mmx150 daemon \ + mmx150d daemon \ --on-connect 'wpctl set-default ' \ --on-disconnect 'wpctl set-default ' @@ -45,5 +45,5 @@ Development uses devenv: devenv shell cargo build devenv shell cargo test -The binaries land at `target/debug/mmx150` (status and daemon) and +The binaries land at `target/debug/mmx150d` (status and daemon) and `target/debug/mmx150-probe` (protocol reverse-engineering tool). diff --git a/src/main.rs b/src/main.rs index 8582db1..9392692 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -//! mmx150 — connection monitoring for the beyerdynamic MMX 150 wireless +//! mmx150d — connection monitoring for the beyerdynamic MMX 150 wireless //! dongle. use std::process::{Child, Command, ExitCode, Stdio}; @@ -21,7 +21,7 @@ fn main() -> ExitCode { fn print_usage() { eprintln!( - "usage: mmx150 \n\ + "usage: mmx150d \n\ \n\ daemon options:\n\ \x20 --on-connect CMD run CMD (via sh -c) when the headset connects\n\ @@ -32,7 +32,7 @@ fn print_usage() { status exit codes: 0 connected, 1 disconnected, 2 dongle missing/error\n\ \n\ example:\n\ - \x20 mmx150 daemon \\\n\ + \x20 mmx150d daemon \\\n\ \x20 --on-connect 'wpctl set-default ' \\\n\ \x20 --on-disconnect 'wpctl set-default '\n\ \n\ -- cgit v1.3.1