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

[FR] Option to elide terminal title from the left #362

Closed
protist opened this issue Jan 14, 2021 · 7 comments
Closed

[FR] Option to elide terminal title from the left #362

protist opened this issue Jan 14, 2021 · 7 comments

Comments

@protist
Copy link

protist commented Jan 14, 2021

Is your feature request related to a problem? Please describe.
My terminal titles are set to the current working directory. When this is long, or there are many tabs, it is elided from the right. For example, /usr/lib/python3.9/site-packages/terminatorlib becomes /usr/lib/python3.9....

Describe the solution you'd like
Instead, it would often be more informative to elide from the left, i.e. ...ages/terminatorlib

Describe alternatives you've considered
Alternatively, I could restrict my terminal title to the shallowest directory, e.g. in zsh %1~. However, this would frequently remove information unnecessarily.

Additional suggestions
Also, I find the ellipsis to take up a fair amount of space

Screenshot_20210114_174049

Perhaps there might be a smaller glyph? In addition, is there a way to remove the close button? I always use the keyboard shortcut.

@protist protist changed the title [FR]: option to elide terminal title from the left [FR] Option to elide terminal title from the left Jan 14, 2021
@mattrose
Copy link
Member

Hmm, we just send the text to the tab, I'm not sure if there's a way for us to tell the tab which text to display when we send it up there. I'll do some hunting around the API.

@mattrose
Copy link
Member

If you could find another VTE app that does this it would help me greatly :)

@mattrose
Copy link
Member

Yeah, this is what we use to set the text https://lazka.github.io/pgi-docs/Gtk-3.0/classes/Notebook.html#Gtk.Notebook.set_tab_label and it doesn't really allow us to specify this. There's good parts and bad parts to highly leveraging GTK calls, and this is one of the downsides.

@protist
Copy link
Author

protist commented Jan 14, 2021

Thanks for the quick reply @mattrose. My random searching brought up Gtk.Label.props.ellipsize. Is that relevant?

Also, from the link, it doesn't seem like the ellipsis glyph itself is configurable. Do you know if it is possible to hide the close button?

@mattrose
Copy link
Member

props.ellipsize doesn't seem to be what we want, but I'll poke around a bit. Thanks for looking that up.

Holy crap, there's a config variable named close_button_on_tab that is not in the preference UI at all, but if you set that to false in your .config/terminator/config it will get rid of the close buttons on tabs. So that'll work for you.

@mattrose
Copy link
Member

I didn't see anything in the label properties that would do what you want. I can ask around on IRC, but other than that I'm out of ideas.

@protist
Copy link
Author

protist commented Jan 16, 2021

props.ellipsize doesn't seem to be what we want, but I'll poke around a bit. Thanks for looking that up.

I didn't see anything in the label properties that would do what you want. I can ask around on IRC, but other than that I'm out of ideas.

No worries. I don't really know anything about it; I was just searching for synonyms. Thanks for checking anyway.

Holy crap, there's a config variable named close_button_on_tab

Awesome! That works well!

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

No branches or pull requests

2 participants