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

pango-like markup in tab title template? #3763

Closed
chipaca opened this issue Jun 25, 2021 · 7 comments
Closed

pango-like markup in tab title template? #3763

chipaca opened this issue Jun 25, 2021 · 7 comments

Comments

@chipaca
Copy link
Contributor

chipaca commented Jun 25, 2021

Is your feature request related to a problem? Please describe.

Currently my tab_title_template has the very hacky (avert your eyes!),

tab_title_template "{fmt.nobold}{'¹²³⁴⁵⁶⁷⁸⁹'[index-1]}{fmt.bold}{title}"

(this relies on how kitty falls back to the default {title} when the custom one throws an error)
This is particularly useful for me because I've bound alt+1 through alt+9 to the first 9 tabs (and alt+0 to the last)

Describe the solution you'd like

It would be nice to be able to have some kind of markup in there (thinking pango markup, but that would be a rather big new dependency).

Describe alternatives you've considered

My current approach is probably fine.

Additional context
123 all the things
image

@kovidgoyal
Copy link
Owner

kovidgoyal commented Jun 25, 2021

Not sure I follow, what would pango markup get you that the current markup doesnt? You can set bold/italics/fg/bg colors with the current markup. And that is all the formatting the underlying implementation supports. There are no super/sub scripts in terminal text. If you want that it should be a fairly trivial patch in the current code, without needing a new markup language for it, essentially just map a-z0-9 to the unicode super/sub symbols

@chipaca
Copy link
Contributor Author

chipaca commented Jun 25, 2021

I'd use it mostly for size control and positioning (but superscript would be enough), but it would also let you change fonts and that sort of thing. I was trying to generalize from my problem (hacky superscripts) to something more people might find useful :-)

@kovidgoyal
Copy link
Owner

The tab bar is rendered by an actual terminal, it supports only the formatting terminals support, nothing else.

@chipaca
Copy link
Contributor Author

chipaca commented Jun 25, 2021

oooh, does ssupm work in kitty?
edit: nope. supcs is empty.

@kovidgoyal
Copy link
Owner

nope there is no support for superscript/subscript mode in kitty.

@chipaca
Copy link
Contributor Author

chipaca commented Jun 25, 2021

aw well. I can see doing it well would be a pain from the width of rendered text pov.

Thank you.

@chipaca
Copy link
Contributor Author

chipaca commented Jun 25, 2021

image

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants