by Mathnerd314 · 10y ago · 0 comments
Does anyone know how this is implemented?
Edit: pretty simple: http://bazaar.launchpad.net/~elementary-apps/pantheon-termin... http://bazaar.launchpad.net/~elementary-apps/pantheon-termin...
For instance, all I had to do was include `\a` in my `$PS1` and now whenever a command finishes running and bash is ready for a new command, my terminal emulator gets a bell.
Konsole (and any Konsole based terminal emulators, like Yakuake) shows a notification if a bell happens in a non-foreground session.
Konsole also has explicit tab-specific settings for "Monitor for Silence" and "Monitor for Activity".
It's up to the terminal emulator to do what it wants with the beep character. Technically, it's up to whoever has to display the character; if you're running bash at a tty — an actual terminal — then the kernel gets to decide what to do, so it beeps, since there is little else it could choose to do.
Terminal emulators, on the other hand, know they aren't actually in a limited environment and can do a lot more than playing a sound. That's why there's such a thing as "visual bell" among terminal emulators. Some highlight the tab title upon visual bell, Konsole merely sends a notification if a bell occurs.
----
> And/or interfere with any programs that use the beep for their own purposes?
I don't quite understand what you mean here. There isn't any way for arbitrary programs to listen for / wait for / register callbacks for the beep.
If you're thinking about the `\a` in `$PS1` ... well, PS1 is shown only when bash runs as an interactive process.
Also, the beep control in ALSA is muted by default.