window-title-is-back icon indicating copy to clipboard operation
window-title-is-back copied to clipboard

Add a Remove app name in title option

Open Pierre-Thibault opened this issue 8 months ago • 9 comments

It would be great to have a feature removing the application name, usually found at the end of the window title.

I would also remove the — separator between the application name and the title, and replace it with two spaces. May write the application name in bold for a better contrast.

I can do the modification myself and create PR if you like the idea.

Pierre-Thibault avatar Apr 14 '25 03:04 Pierre-Thibault

If you find a clean way to remove the app name at the end (Mozilla Firefox and so on, I suppose), yes I can push a PR.

We could see the styling after that?

fthx avatar Apr 16 '25 07:04 fthx

I would like to try something with regular expressions to remove the application name. It has to be relaxed as it is not always written in the same way in every application.

If you know an application that is not standard in that matter, please let me know not to miss an edge case.

Do you want me to create a new branch for that?

Pierre-Thibault avatar Apr 16 '25 21:04 Pierre-Thibault

Here is the regular expression:

/^(.*?)(\s?(-|—)\s?app_name\s?\w?\s?((\d\.){0,3}\d\w?)?)$/gm

This is the regular expression to match with the window title. If there is a match, group 1 will contain the window title without the application name. Group 2 is the part removed. app_name should be replaced with the actual application name.

Can you try to integrate this?

Pierre-Thibault avatar Apr 21 '25 01:04 Pierre-Thibault

OK, I created a PR. On my side, it seems to work very well.

Pierre-Thibault avatar May 08 '25 08:05 Pierre-Thibault

For the styling:

Image

Do you like?

Pierre-Thibault avatar May 08 '25 09:05 Pierre-Thibault

Yes, but that's not in your PR?

I'll have a look at your code, all seems ok for me (some questionmarks to shorten code but that's nothing to do). Probably I'll make your regexp become JS string work, to make this code legible. I'll push your PR then modify it, before publishing as an update.

Thanks for that!

fthx avatar May 09 '25 06:05 fthx

No, it is not in the code yet. I wanted you to see it before doing a PR. So, please let me know.

Pierre-Thibault avatar May 09 '25 07:05 Pierre-Thibault

We have to:

  • style it with CSS if both app and window title are shown;
  • let it unchanged if only one of these two are shown, to respect GNOME Shell's user theme.

fthx avatar May 09 '25 07:05 fthx

Here is the PR for the styling.

Pierre-Thibault avatar May 09 '25 09:05 Pierre-Thibault

Hello?

Pierre-Thibault avatar Jun 13 '25 02:06 Pierre-Thibault

I had some work. I'll do that soon.

fthx avatar Jun 15 '25 10:06 fthx

Hi,

fthx avatar Jun 27 '25 05:06 fthx

If you're interested in, have a look at Task Up Ultralite. I do use this one and actively update it.

fthx avatar Jun 27 '25 05:06 fthx

OK. But I use Space Bar instead.

Pierre-Thibault avatar Jun 27 '25 11:06 Pierre-Thibault

Task Up is a taskbar.

fthx avatar Jun 27 '25 12:06 fthx

Then I mean App Icons Taskbar.

Pierre-Thibault avatar Jun 27 '25 13:06 Pierre-Thibault