Tilix: Better visual bell support

Created on 26 May 2016  路  9Comments  路  Source: gnunn1/tilix

This is how I test the bell in various terminals:

$ sleep 5 && echo -ne \\a
  • I would expect at least bell propagation to window manager / desktop environment. Bell in xterm causes both window border and windows list button flash in LXDE.
  • The session button, session sidebar and split title bar should also indicate where (and if) the bell happened.
enhancement

Most helpful comment

Disabling the audible visual bell, also disables the gnome shell visual bell to work.

When setting:

gsettings set org.gnome.desktop.wm.preferences audible-bell false
gsettings set org.gnome.desktop.wm.preferences visual-bell true
gsettings set org.gnome.desktop.wm.preferences visual-bell-type frame-flash

Same hapens with gnome-terminal though, it looks like something else is playing the bell other than the system

All 9 comments

Right now there is no support for the Bell in terminix but I'll look at adding it in.

So II checked gnome-terminal, and I see it simply as an enable/disable option for the terminal bell that when enabled makes the bell sound but otherwise doesn't do anything UI wise as far as I can tell.

I'm not keen on adding the Bell as a distinct entity to the sidebar and session button, I could have Terminix handle the Bell has a notification like it already does for long running commands, this has the advantage of using all the existing code that is in place but could result in double notifications (i.e. one for the command being completed and one for the actual bell).

Any thoughts on this?

Also, if anyone knows of a terminal that handles the bell really well just let me know and I'll have a look at it.

I've checked in some initial work for supporting a visual bell. It changes the current boolean terminal bell option to a enumeration with the following options:

  • None
  • Sound
  • Icon
  • Icon and Sound

The icon is displayed in the terminal titlebar for five seconds from when the bell occured and is then hidden. I still have some work to do on this as follows:

  • Make the icon flash, likely using CSS animations so something new to learn
  • For sessions that are not visible, defer showing bell icon until session is viewed

Yes, gnome-terminal has probably the worst bell, only audible with no visual indication whatsoever.

Roxterm has a decent bell support. It has tabs, so when bell happens the tab will flash. And also propagate the bell to windows manager etc.
2016-05-30-180028_530x234_scrot

The icon is displayed in the terminal titlebar for five seconds

The icon should be displayed until the tab/window/pane in question gets the focus. That way at least work tmux, roxtem, terminator and various window managers.

Currently, with "Icon" enabled: Make the terminal beep, wait until the icon is removed, and then make it beep again.

This is printed:

(terminix:1234): GLib-CRITICAL **: Source ID 5678 was not found when attempting to remove it

@egmontkob This is a bug with GtkD, I opened a bug for it and it has been fixed for the next release:

https://github.com/gtkd-developers/GtkD/issues/154#event-676335220

I've checked in an initial version of this feature, I don't think it's perfect but I'm looking for feedback and usually I get the best feedback after closing an issue :)

At the moment the implementation is as follows for the icon:

  • The icon is shown in the titlebar with a shaking animation, I'm using the alarm-symbolic icon so hopefully the shaking will pair well with whatever icon is present in most icon themes.
  • The icon is shown for 5 seconds before being hidden again
  • If the terminal is in a session that is not visible, showing the bell icon will be deferred until the session is visible
  • I'm not deferring showing the icon if the window is not visible, way too many edge cases to deal with. i.e. window is visible but not obscured or visible in another monitor, etc

The one I struggle with still is whether a notification should be raised for it. If you have a VTE that supports notifications it will often result in double notifications when the bell is used to signal the end of a long running command. I'm not keen on flashing the window, as I previously mentioned that's way too disco for me.

Disabling the audible visual bell, also disables the gnome shell visual bell to work.

When setting:

gsettings set org.gnome.desktop.wm.preferences audible-bell false
gsettings set org.gnome.desktop.wm.preferences visual-bell true
gsettings set org.gnome.desktop.wm.preferences visual-bell-type frame-flash

Same hapens with gnome-terminal though, it looks like something else is playing the bell other than the system

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alex285 picture alex285  路  3Comments

iax7 picture iax7  路  4Comments

tomtobac picture tomtobac  路  3Comments

viniciusban picture viniciusban  路  4Comments

huti26 picture huti26  路  3Comments