feat: integrate the Linux bell with the desktop environment#1625
Open
nikicat wants to merge 1 commit into
Open
feat: integrate the Linux bell with the desktop environment#1625nikicat wants to merge 1 commit into
nikicat wants to merge 1 commit into
Conversation
…im#1616) On Linux the terminal bell now integrates with native DE attention mechanisms instead of only a synthesized 440 Hz tone: - `[bell] audio` accepts `"system"` (default on Linux) to play the freedesktop event-sound theme via libcanberra, respecting the user's sound theme, output routing, volume, mute and Do-Not-Disturb. It is loaded at runtime via dlopen, so there is no build-time dependency and it degrades gracefully when absent. `true`/`false` stay backwards compatible (legacy tone / off). - `[bell] urgency` (default true on Linux) sets the window urgency / attention hint (X11 WM_HINTS, Wayland xdg-activation) when the bell fires in an unfocused window, and clears it on focus-regain. - `[bell] notification` (default false) raises an org.freedesktop.Notifications notification for an unfocused window. The audio/urgency/notification config values use named enums rather than bare bools to avoid boolean blindness. The cpal tone moves into a new `bell` module alongside the libcanberra binding. Documents the new keys in the rio.5 man page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> (cherry picked from commit 7d9b299)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Linux the terminal bell now integrates with native desktop-environment
attention mechanisms instead of only a synthesized 440 Hz tone (#1616).
Details
[bell] audioaccepts"system"(default on Linux) to play the freedesktopevent-sound theme via libcanberra — respecting the user's sound theme, output
routing, volume, mute and Do-Not-Disturb. libcanberra is loaded at runtime via
dlopen, so there is no build-time dependency and it degrades gracefully whenabsent.
true/falsestay backwards compatible (legacy tone / off).[bell] urgency(default true on Linux) sets the window urgency / attentionhint (X11
WM_HINTS, Waylandxdg-activation) when the bell fires in anunfocused window, and clears it on focus-regain.
[bell] notification(default false) raises anorg.freedesktop.Notificationsnotification for an unfocused window.
The audio/urgency/notification config values use named enums rather than bare
bools to avoid boolean blindness. The cpal tone moves into a new
bellmodulealongside the libcanberra binding. New keys are documented in the rio.5 man page.
Testing
cargo test -p rioterm; manual:printf '\a'in focused/unfocused windows underGNOME (Wayland) and an X11 WM.
Closes #1616
🤖 Generated with Claude Code