Skip to content

Add audible & visual bell support - #1284

Merged
raphamorim merged 17 commits into
raphamorim:mainfrom
ranisalt:visual-bell
Aug 27, 2025
Merged

raphamorim merged 17 commits into
raphamorim:mainfrom
ranisalt:visual-bell

Conversation

@ranisalt

Copy link
Copy Markdown
Contributor

This pull request adds support for a visual bell feature in the terminal, allowing the screen to briefly flash when a bell event occurs (if enabled in configuration).

  • Added a new Bell configuration struct to Config, with a default value and deserialization support, allowing users to enable or disable the visual bell (rio-backend/src/config/mod.rs). [1] [2] [3] [4]
  • In the frontend application event handler, added logic to check the bell configuration and trigger the visual bell effect, mark content as dirty, force immediate render, and schedule a redraw to clear the bell after a set duration (frontends/rioterm/src/application.rs, frontends/rioterm/src/constants.rs). [1] [2]
  • Updated the Sugarloaf UI library to support rendering a single overlay quad for the visual bell, including state management and render pass logic to ensure the overlay appears above all other content (sugarloaf/src/components/quad/mod.rs, sugarloaf/src/sugarloaf.rs, sugarloaf/src/sugarloaf/state.rs). [1] [2] [3] [4] [5] [6] [7]

I plan to work on audible bell in a future PR, at least for Linux, adding new configuration options to the [bell] section.

@ranisalt ranisalt changed the title Add visual bell support Add audible & visual bell support Aug 22, 2025
Comment thread rio-backend/src/config/bell.rs
@ranisalt
ranisalt marked this pull request as ready for review August 25, 2025 21:32
@ranisalt

Copy link
Copy Markdown
Contributor Author

It is working on my Linux and my Mac machines, but I don't have Windows to test

Comment thread frontends/rioterm/src/application.rs Outdated
Comment thread frontends/rioterm/src/application.rs Outdated
Comment thread frontends/rioterm/src/application.rs Outdated
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.

3 participants