Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger Bell in the Monitored Window #53

Merged
merged 3 commits into from
Oct 15, 2023
Merged

Conversation

daneski13
Copy link
Contributor

@daneski13 daneski13 commented Sep 23, 2023

Love this plugin, however I do not use tmux's audible bell sound and rely on the visual in my status line/bar instead. It's nice to have the visual confirmation on my tmux status line/bar for which windows in my current session are done with their task after being notified by the OS. For those that rely on tmux's visual bell and not just the audible sound, I've found this change to be a must.

This small PR will have the bell trigger in the window that is being monitored rather than in the currently active window.

@rickstaa
Copy link
Owner

@daneski13 thank you so much for the pull request! That looks like a handy feature 💪🏻! I reviewed your pull request and gave some suggestions. Additionally, please provide users with a way to turn off this feature your feature. Maybe we can add a @tnotify-visual-bell parameter, which is enabled by default?

Apart from those changes, we can merge this in the main branch 🚀!

scripts/notify.sh Outdated Show resolved Hide resolved
scripts/helpers.sh Show resolved Hide resolved
Co-authored-by: Rick Staa <rick.staa@outlook.com>
@daneski13
Copy link
Contributor Author

daneski13 commented Oct 14, 2023

@rickstaa Thank you and I'm glad you like this addition!

A visual bell will only be visible if the user has set-window-option -g visual-bell on in their tmux config. This change doesn't really add any new feature considering a visual bell is already triggered by default in this plugin, I just changed the behavior of where the bell is triggered.

However, if you prefer to have the visual bell on by default for all users with a variable to turn it off I'm happy to make that change.

@rickstaa
Copy link
Owner

rickstaa commented Oct 15, 2023

@rickstaa Thank you and I'm glad you like this addition!

A visual bell will only be visible if the user has set-window-option -g visual-bell on in their tmux config. This change doesn't really add any new feature considering a visual bell is already triggered by default in this plugin, I just changed the behavior of where the bell is triggered.

However, if you prefer to have the visual bell on by default for all users with a variable to turn it off I'm happy to make that change.

Your right! The part of the code you improved is written by the original creator of this plugin. After reviewing it again, I think it indeed is a bug in the code, not a new feature 👍🏻. Let's merge this pull request in its current form!

@rickstaa rickstaa merged commit 11dea05 into rickstaa:main Oct 15, 2023
1 check passed
@rickstaa
Copy link
Owner

@daneski13 Thanks again for your contribution ❤️‍🔥!

@daneski13
Copy link
Contributor Author

@rickstaa Of course, no problem!

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.

None yet

2 participants