-
-
Notifications
You must be signed in to change notification settings - Fork 971
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
Allow bell/attention in tab_title_template
#4581
Comments
I suggest you simply draw the tab bar using your own python function. I |
Well, the template language wouldn't really get conditionals. If done the full way, the code in kitty would even get simpler? bell = ''
if tab.needs_attention and draw_data.bell_on_tab:
bell = '🔔'
…
eval_locals = {
'bell': bell,
}
…
title = template.format(**eval_locals) |
That said… Many thanks for linking me to the |
What you propose would break backward compatibility and prevent the bell symbol from showing up for any existing users that have defined their own templates in kitty.conf. |
If you want backward compatibility (well, a bit of breaking is IMHO okay for a 0.x release, but anyway), append this: if bell not in title:
title = bell + title This should also work nicely for |
That assumes bell is a unique character not otherwise present in the |
Well, in the case of bell, it's quite reasonable. For the attention symbol, you're probably right! Also having color codes in it a la The backward compatibility code is just that: A try to be as backward compatible as reasonable. I would even drop it after a year or so. Your decision! |
Wow! Cool! Many thanks! :-) |
Is your feature request related to a problem? Please describe.
I start my tab templates with some opening characters like
[
orU+1fb7d
. Having the bell / attention symbol before that looks like it belongs to the previous tab or the separator.Describe the solution you'd like
It would be cool to have some
{bell}
and{attention}
variables for the template string, so that one can place them where one likes (and maybe even use the formatter to format them?). If the template (after formatting) doesn't have the bell / attention symbol in it and the symbol is wanted, one can still display them the old way?Describe alternatives you've considered
Currently tricking around a bit by putting some things in the separators. Which means the first tab does not have the "start" chars.
The text was updated successfully, but these errors were encountered: