valentine

Terminal control panel for the Focusrite Scarlett 18i20 — a from-scratch replacement for Focusrite Control.
Log | Files | Refs | README | LICENSE

commit a1cbfd6897b236c4e5ab1c76bf5fd0515a3ef4e0
parent ea6367f204310f6e9bf3d0b960a12d7520bfac2a
Author: Matthew Gantenbein <ganten1998@gmail.com>
Date:   Mon,  1 Jun 2026 23:37:47 -0500

feat: install.sh + uninstall.sh, updated README (no dmg — TUI ships as scripts)

A terminal tool doesn't benefit from a .app/.dmg (no Finder launch; needs a
TTY). So Valentine ships the way TUI users expect: install.sh builds the release
binary, installs it to ~/.local/bin, and deploys the 10 themes to
~/.config/valentine/themes/. uninstall.sh removes it (--purge for config).
README Install section rewritten + feature list updated (routing editable, 10
shared themes, transparency). Verified install.sh end-to-end.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Diffstat:
MREADME.md | 36+++++++++++++++++++++++-------------
Ainstall.sh | 41+++++++++++++++++++++++++++++++++++++++++
Auninstall.sh | 15+++++++++++++++
3 files changed, 79 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md @@ -8,33 +8,43 @@ Valentine speaks the device's proprietary "scarlett2" USB control protocol direc options, monitor section, metering, and clock status without the GUI — while Core Audio keeps streaming audio normally. -> Status: works on the author's 18i20 3rd Gen. The protocol layer is hardware- -> validated; routing is read-only for now (see **Limitations**). +> Status: works on the author's 18i20 3rd Gen; the protocol layer is +> hardware-validated. See **Limitations**. ## Features -- **Inputs** — Air, Pad, Inst/Line, and 48 V phantom per channel -- **Monitor** — master level, Mute, Dim +- **Inputs** — Air, Pad, Inst/Line, and 48 V phantom per channel, with live + per-channel meters and a stereo-pair view +- **Monitor** — hardware-knob readout, Mute, Dim - **Mixer** — the full crosspoint matrix, gain in dB -- **Routing** — see what feeds each output (read-only) +- **Routing** — editable: set what feeds each output (stereo-pair aware) - **Meters** — live input/output/mixer levels - **Clock** — sync-lock status -- **Presets** — save/load a full configuration to disk +- **Presets** — save/load a full configuration (incl. routing) to disk - **Standalone** — write the current config to the device's NVRAM -- **Themes** — a swappable TOML palette; ships with "Ember" (red/magenta) +- **Themes** — swappable TOML palettes (format shared with + [Hydra](https://ganten.neocities.org/projects.html)); 10 built in + a live + transparency toggle ## Install -Requires a Rust toolchain. No system libraries needed — `libusb` is built from -source (vendored). +Requires a Rust toolchain ([rustup.rs](https://rustup.rs)). No system libraries — +`libusb` is vendored and built from source. No driver, no admin, no daemon. +```sh +./install.sh # builds + installs `valentine` to ~/.local/bin and themes to ~/.config/valentine/ +valentine # run it (quit Focusrite Control first) ``` -cargo build --release -./target/release/valentine + +Or run straight from the repo without installing: + +```sh +cargo run --release -p valentine ``` -Quit Focusrite Control first — only one application can own the device at a time. -Valentine must be run in a real interactive terminal. +Uninstall with `./uninstall.sh` (add `--purge` to also remove your config). +Valentine must be run in a real interactive terminal, and only one app can own +the device at a time — quit Focusrite Control first. ## Keys diff --git a/install.sh b/install.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# Valentine installer — builds the release binary and installs it on your PATH, +# plus the bundled themes. No driver, no admin, no daemon: it's a single +# userspace TUI. Re-run any time to update. +set -euo pipefail + +cd "$(dirname "$0")" + +BIN_DIR="${VALENTINE_BIN_DIR:-$HOME/.local/bin}" +THEME_DIR="$HOME/.config/valentine/themes" + +echo "Valentine installer" +echo " binary → $BIN_DIR/valentine" +echo " themes → $THEME_DIR/" +echo + +if ! command -v cargo >/dev/null 2>&1; then + echo "error: cargo (Rust) not found. Install from https://rustup.rs and re-run." >&2 + exit 1 +fi + +echo "• building (release)…" +cargo build --release -p valentine + +mkdir -p "$BIN_DIR" "$THEME_DIR" +install -m 0755 target/release/valentine "$BIN_DIR/valentine" + +# Copy bundled themes so they're user-editable and appear in the picker. +# (The binary also has them compiled in; this just exposes them on disk.) +cp themes/*.toml "$THEME_DIR/" 2>/dev/null || true + +echo +echo "✓ installed valentine → $BIN_DIR/valentine" +case ":$PATH:" in + *":$BIN_DIR:"*) echo " ($BIN_DIR is on your PATH — just run: valentine)" ;; + *) echo " NOTE: add $BIN_DIR to your PATH, e.g.:" + echo " echo 'export PATH=\"$BIN_DIR:\$PATH\"' >> ~/.zshrc" ;; +esac +echo +echo "Run it (quit Focusrite Control first): valentine" +echo "Uninstall: ./uninstall.sh" diff --git a/uninstall.sh b/uninstall.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Remove the Valentine binary. Leaves your config (~/.config/valentine/) in place +# by default — pass --purge to remove themes, presets, and settings too. +set -euo pipefail + +BIN_DIR="${VALENTINE_BIN_DIR:-$HOME/.local/bin}" +CONFIG_DIR="$HOME/.config/valentine" + +rm -f "$BIN_DIR/valentine" && echo "✓ removed $BIN_DIR/valentine" + +if [[ "${1:-}" == "--purge" ]]; then + rm -rf "$CONFIG_DIR" && echo "✓ removed $CONFIG_DIR (themes, presets, settings)" +else + echo " kept $CONFIG_DIR (themes/presets/settings). Use --purge to remove it." +fi