gpakosz / .tmux

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
MIT License
21.79k stars 3.36k forks source link

Turn off bell on the activity of other windows #642

Closed Jendker closed 1 year ago

Jendker commented 1 year ago

Hello 👋

In iterm2 I am using "Flash visual bell" and for now it was working fine in terminal but it doesn't work well with tmux equipped with oh-my-tmux sending the bell signals on terminal outputs of other windows. I have tried setting tmux_conf_theme_window_status_activity_attr="none" and it turns off the underline on tab activity but the terminal is still flashing, so I guess bell signal is still sent.

That's why I wanted to ask you if there is a way to turn off the bell symbol for oh-my-tmux on the activity of other windows?

gpakosz commented 1 year ago

Hello @Jendker 👋

I think you want to play with tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format.

Try setting them to

tmux_conf_theme_window_status_format="#I #W"
tmux_conf_theme_window_status_current_format="#I #W"
Jendker commented 1 year ago

Hello @gpakosz thank you for your answer! Hmm that didn't quite help. I'm still getting the bell signal. Should I check it with iterm people?

gpakosz commented 1 year ago

I don't know what you mean by "I'm still getting the bell signal".

From the terminal, you can use tput bel to produce a bell and debug what's happening.

gpakosz commented 1 year ago

BTW,

but it doesn't work well with tmux equipped with oh-my-tmux sending the bell signals on terminal outputs of other windows

Do you observe a different behavior with and without Oh my tmux!?

You can test launching tmux with no configuration:

$ tmux -L test -f /dev/null
Jendker commented 1 year ago

If I call tput bel I am getting the exact same effect as with oh-my-tmux on activity on another window - the beep in terminal.

I just checked after starting tmux without configuration as you suggested with

$ tmux -L test -f /dev/null

and then on activity in another window I don't get any beeping.

Would you recommend consulting this with iterm developers? I do appreciate your time.

gpakosz commented 1 year ago

Well what I know is that Oh my tmux! does only visual things.

You initially asked

That's why I wanted to ask you if there is a way to turn off the bell symbol for oh-my-tmux on the activity of other windows?

Yes you can, edit your .local customization file and use

tmux_conf_theme_window_status_format="#I #W"
tmux_conf_theme_window_status_current_format="#I #W"

Then relaunch tmux and Oh my tmux!

and then on activity in another window I don't get any beeping.

But now you're mentioning sound. If there's a bell, and you hear a sound, then you definitely want to look into your iTerm profile

image

To trouble shoot this, kill all tmux processes. Start tmux with tmux -f /dev/null to skip Oh my tmux! loading. Get the behavior you want. Once done, start tmux with Oh my tmux! See if there's a difference. The only difference I expect will depend on the values you chose for tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format.

Hope that helps!

Jendker commented 1 year ago

I will continue from here and try to find a solution without disabling audible or visual bell. Thank you you so much for a quick response!