Choose an audio file for each herdr workspace × status. Import MP3s or WAVs into a reusable library, preview a choice, select None for quiet, or reset one choice or all choices to default.
Medley is a local herdr plugin for Linux and macOS. Python 3.11+ and herdr 0.9.1+ are required. Install ffmpeg for audio validation and WAV conversion and Linux playback; macOS uses afplay for playback and still requires ffmpeg for importing.
herdr plugin install WebscapeOrg/medley
herdr plugin action invoke medley.settingsIn settings, use the Enabled/Disabled toggle. This disables herdr's native sound playback to prevent duplicates. Turning Medley off restores the previous native sound-enabled setting. No herdr server restart is needed.
For a local checkout:
git clone https://github.com/WebscapeOrg/medley.git
cd medley
herdr plugin link . --enabled
python3 medley.py settingsThe settings command opens a private localhost URL on port 43127. Bookmark the full address of that page, including its access key after #: the port and key stay the same across fresh launches and Relaunch. The key is stored privately in settings-access.json in Medley's config directory, with owner-only permissions. Keep the bookmark private. Opening the settings command again reuses the existing server for that config directory. It checks the server's identity without sending the access key to an unrelated listener; a port conflict with another app gives an error instead of silently changing the port. Use settings --port NUMBER for a deliberate override, or --port 0 for a temporary port.
Keep the settings command running while editing; Ctrl+C closes the settings server. A bookmark does not start a stopped server: run the settings command again after closing it or restarting your computer. Sound rules for this computer's own workspaces continue working through herdr's event hooks after settings closes; sounds for saved SSH machines (see Remote machines) need the settings server to keep running. A refresh in the browser preserves its access token in tab session storage. Relaunch, beside Uninstall Medley, restarts only this settings server with the current code and reloads the same tab. It keeps imported sounds, saved choices and the enabled setting; herdr and its agents keep running. An older settings page on a temporary port can remain open; use the settings command once to open the new bookmarkable address.
- Choose an MP3 or WAV, up to 20 MB; it imports immediately without another button press, and the new sound's name opens for editing so you can name it straight away (Enter saves; Escape or Cancel keeps the file's name). If the audio is already in My Sounds, Medley says so and keeps that sound's name. Medley validates the audio, converts WAV to MP3 locally, and copies it into its private library, so moving or deleting the original does not break playback.
- Choose a workspace. Each of its five statuses has a separate audio selection.
- Select a library file (displayed without its .mp3 extension), None · quiet, or Default. Changes save immediately. Sounds are listed alphabetically in the dropdowns and in My Sounds, ignoring any emoji at the start of a name, so "🔔 Bell" sorts under B. Sounds whose names match once those emoji are ignored fall back to their full names.
- Use Mute beside a status to temporarily make it quiet. The button becomes Unmute, which restores the saved sound. Mute all beside the workspace selector mutes all five statuses in that workspace; Unmute all restores their saved choices. While a workspace is muted, its status mute buttons are disabled; use Unmute all first. These mutes survive refresh and relaunch and stay on until you unmute them. A muted selector shows None · quiet; its saved choice is kept separately. Resetting or removing a sound changes that saved choice without clearing the mute.
- Use Preview to play the selected sound immediately in your browser. A temporary row directly beneath the sound shows audio controls to stop or replay it. The player is right aligned; previewing another sound moves it there. Silent selections are identified as quiet; if the browser blocks playback, use Play in the controls to retry. Reset restores one cell; Reset all to default restores every workspace and offers Undo until settings closes or another reset replaces it.
The statuses are Idle, Working, Needs attention (herdr's blocked), Done, and Unknown. Rules use herdr's workspace IDs, so renaming a workspace retains its choices. Recreating a deleted workspace or using a different herdr session does not transfer choices automatically. Keep a separate plugin config directory per independent session.
A workspace may contain several agents. Medley reads herdr's combined workspace status after a pane status event and plays once when that combined status changes. Duplicate pane events do not repeat the sound. The first observation of a new workspace is silent. Rapid transitions that have already disappeared before the hook reads current state are coalesced.
Default follows herdr's configured done_path / request_path, then path. If no usable custom file exists, Medley uses herdr's bundled completion or attention clip. Idle and Done use completion; Needs attention uses attention; Working and Unknown are quiet. Explicit selections can add audio to any status.
The My Sounds library stays visible, beside My Workspaces on wide screens (and below it on narrow screens). Use the list to preview any sound in the browser, rename it with Save/Cancel, remove it, or replace it. Renaming updates the display name everywhere while keeping audio and assignments intact. The import picker starts in Downloads in browsers supporting the File System Access picker (including desktop Chromium); other browsers use their normal file picker. Removal asks for confirmation and resets every workspace/status using that sound to Default. It removes only Medley’s imported copy, not the original file. Replace, after Remove, asks for an MP3 or WAV (up to 20 MB) and swaps it in for that sound's audio, with no further confirmation. The sound keeps its name, not the name of the file on disk, and every workspace and status that used it keeps using it with the new audio. Medley deletes the old audio. If the chosen file is already another sound in My Sounds, Medley says so and changes nothing; choosing the sound's current audio again also changes nothing.
For a video call or a quiet hour, mute every workspace sound at once; your choices stay as they are.
- In settings, choose a length (30 minutes, 1 hour, 2 hours, or until unmuted) and press Mute. The button becomes Unmute and shows when the sounds come back.
- From herdr's command palette:
herdr plugin action invoke medley.mutemutes for an hour andmedley.unmuteends it early. - From a shell:
python3 medley.py mute(an hour),mute --for 45m,mute --for 1h30,mute --for 0(until unmuted),mute --toggle(unmute when already muted, for a key binding),unmute, andstatus(--jsonprints{"id", "on", "summary"}, whereonmeans sounds play).
A timed mute runs out by itself; until unmuted stays on until you end it. Global mute disables the workspace and status mute buttons until it ends. The settings page checks again when a timed mute expires. Ending global mute leaves any workspace and status mutes in place. Status changes
during a mute are still tracked, so nothing plays late when it ends. The record is mute.json in
Medley's config directory.
If herdr has saved SSH machines (herdr machine list), Medley lists every enabled machine's workspaces after this computer's own, as Machine → Workspace, and plays their sounds on this computer when their agents change status. They take the same five statuses, previews, mutes and global mute as local workspaces.
- Medley's settings server asks each machine every 5 seconds with
herdr --machine <profile> workspace list(every 30 seconds while herdr has no saved machines), so herdr must be able to reach the machine without a prompt. A machine that does not answer within 12 seconds counts as unreachable, and one slow machine does not hold up the others. A status that changes and changes back within one interval is not heard, as with local rapid transitions. - Choices for a remote workspace are kept under the machine's label and the workspace's id on that machine (
Harbor/w4). Renaming a workspace keeps them; renaming the machine in herdr starts its workspaces afresh. - The first look after the settings server starts, and the first after a machine was unreachable, only records statuses, so nothing plays late. An unreachable machine is tried again every 30 seconds; its workspaces stay listed as (last seen) and a note above the list says it cannot be reached (hover it for herdr's reason).
- Local sounds do not depend on this. Remote sounds do: they need the settings server running (as a service, or the settings command), and stop with it. Only one settings server per state directory watches at a time, so a second copy never plays a sound twice.
settings --no-remoteturns the watching off. The list keeps showing saved machines while Medley is disabled; only playback needs it enabled. - Sounds still play on this computer, not on the remote one. Install Medley on the remote machine to hear its sounds there.
Plugin hooks run on the herdr server machine, so audio plays there, including for the currently focused workspace. Saved SSH machines are the exception: Medley watches them from the settings server and plays their sounds on the machine that runs it. This release does not route sound to remote clients or mirror herdr's focused-tab suppression. It is suitable for a local desktop server; do not enable it on a remote server expecting your laptop to play audio. Playback is bounded to 30 seconds per clip; overlapping notifications are dropped while a clip is playing. Very long MP3s may be interrupted.
The audio library and mappings stay outside the checkout under herdr's plugin config directory (herdr plugin config-dir medley). Only local files are read. No account, telemetry or cloud upload is involved. The browser uses a random bearer token and a loopback-only HTTP server. Treat the printed settings URL as private.
Use Uninstall Medley in settings, or herdr plugin action invoke medley.uninstall, to restore the previous sound setting before unregistering the plugin. Imported audio and choices are retained. Restoration failure aborts uninstall.
Unlinking, disabling or uninstalling through herdr’s standard plugin commands cannot restore herdr's muted sound setting automatically. The original config backup is herdr-config-before-medley.toml in Medley's config directory; disabling normally changes only ui.sound.enabled, preserving subsequent unrelated edits. To recover manually, set [ui.sound] enabled = true in herdr's config and run herdr server reload-config.
python3 -m unittest discover -s tests -v
python3 medley.py settings --no-browserThere are no Python package dependencies. See architecture, validation, and third-party notices.
Licensed under Apache-2.0.
Browser validation is optional developer tooling: npm ci && npx playwright install chromium && npm test. Runtime needs no npm packages.
