Skip to content

feat(herdr): enable state-change sound alerts and document the player requirement - #204

Open
KapsCa wants to merge 1 commit into
Gentleman-Programming:mainfrom
KapsCa:feat/herdr-sound-alerts
Open

KapsCa wants to merge 1 commit into
Gentleman-Programming:mainfrom
KapsCa:feat/herdr-sound-alerts

Conversation

@KapsCa

@KapsCa KapsCa commented Sep 13, 2026

Copy link
Copy Markdown

Why

herdr/config.toml ships no [ui.sound] section, so agent alerts are off out of the box — and nothing tells you why when you turn them on and hear nothing.

The silence has two independent causes, and both hit anyone installing from this repo:

  1. Herdr embeds no audio decoder. It shells out to an external mp3 player, trying paplay → pw-play → ffplay → mpg123 → mpv in that order. With none of the five installed, playback fails silently: the only trace is WARN herdr::sound: sound playback failed ... no mp3-capable audio player available in ~/.config/herdr/herdr-client.log.
  2. Sound fires only for agents in a background workspace. An agent waiting for input in the workspace you are looking at never alerts — by design. This is the most common reason a correctly configured setup still seems mute.

What changed

One file, herdr/config.toml:

  • adds [ui.sound] with enabled = true;
  • documents the external mp3 player dependency, including one install hint (pulseaudio-utils for paplay, or mpg123);
  • documents the background-workspace rule;
  • records how to test playback manually (herdr notification show "test" --sound done) and which log line to grep when it stays silent.

Comments only, besides the new enabled = true. No keybindings, theme, or existing setting is touched.

Evidence

Check Result
herdr config check against this exact file config: ok
Real agent state change in a background workspace (herdr 0.9.0) alert plays
Manual playback via herdr notification show ... --sound done plays

The version in the note is Herdr 0.9.0. On 0.8.2 the player dependency is the same, but state-change sounds reported by agent integrations did not fire — upgrading is part of the fix, which is why the comment points at the log line rather than promising the config alone is enough.

… requirement

The shipped herdr config had no `[ui.sound]` section, so agent alerts were off
and nothing explained why. Herdr embeds no audio decoder: it shells out to an
external mp3 player, trying `paplay`, `pw-play`, `ffplay`, `mpg123` and `mpv` in
that order, and fails silently when none of them exists.

This enables the alerts and documents both traps that make them look broken:

- the external mp3 player dependency (with one install hint per platform family)
- the by-design rule that sound only fires for agents in a *background*
  workspace, which is the usual reason a correctly configured setup stays silent

It also records the manual test (`herdr notification show --sound done`) and the
log line to look for (`WARN herdr::sound`) so the next person can diagnose it
without reading Herdr's source.

Verified with herdr 0.9.0: `herdr config check` reports `config: ok` for this
file, and the alert fires on a real agent state change in a background
workspace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant