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

Title Module Allow File Name Only #1034

Open
ddoherty03 opened this issue Jan 3, 2025 · 2 comments
Open

Title Module Allow File Name Only #1034

ddoherty03 opened this issue Jan 3, 2025 · 2 comments

Comments

@ddoherty03
Copy link

Feature Request

It would be a nice enhancement for the title module to allow a format string that allows one to specify what to include in the "title." It has two parts, the file name and the app name. I often have to use long file names, and the app is usually obvious.

If I could set title.format="%f" to just display the file name, that would be great.

Also, when even that is too long, it is best to elide the name in the middle, as the first and last parts of the name are the most significant.

Maybe something like:

  • %f -- the file basename
  • %F -- the file full path name
  • %A -- the app name

Then, I could say

-p title.format="File: %f", or whatever.

Also, possibly:

-p title.elide_at=front|middle|end

to set where text will be replaced with title.placeholder if needed.

Thanks for the wonderful status line program, by the way.

@tobi-wan-kenobi
Copy link
Owner

I like the idea a lot!

Unfortunately, I don't know if it's really possible, because the module just displays a single thing: The window title in exactly the way that i3 reports it. As far as I know, there's not a lot of structure to it, and it might differ from application to application.
So when you are saying "the app name" and "the file name", for example, that only exists for some specific applications (a text editor, I would imagine)

Because of that, I am not sure how feasible this request is.

And also thank you very much for your kind words!

@ddoherty03
Copy link
Author

ddoherty03 commented Jan 8, 2025

There is a ' - ' separator between the two, I was thinking just a little regex jujitsu to pull the pieces apart. I'm an amateur, and when I'm amateuring I do it in Ruby, so my python skills are minimal, or I would offer to help!

Even if it's only works 99% of the time, it would be a nice feature.

And, yes, bumblebee-status is awesome. I ditched the rust status program for it!

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