Skip to content

feat: integrate the Linux bell with the desktop environment#1625

Open
nikicat wants to merge 1 commit into
raphamorim:mainfrom
nikicat:feat/linux-bell-de-integration
Open

feat: integrate the Linux bell with the desktop environment#1625
nikicat wants to merge 1 commit into
raphamorim:mainfrom
nikicat:feat/linux-bell-de-integration

Conversation

@nikicat
Copy link
Copy Markdown

@nikicat nikicat commented May 30, 2026

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] 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. libcanberra 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. New keys are documented in the rio.5 man page.

Testing

cargo test -p rioterm; manual: printf '\a' in focused/unfocused windows under
GNOME (Wayland) and an X11 WM.

Closes #1616

🤖 Generated with Claude Code

…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)
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.

[Feature Request] Linux: integrate the bell with the desktop environment (window urgency hint / system sound theme) instead of a synthesized 440 Hz beep

1 participant