Add a Remove app name in title option
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.
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?
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?
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?
OK, I created a PR. On my side, it seems to work very well.
For the styling:
Do you like?
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!
No, it is not in the code yet. I wanted you to see it before doing a PR. So, please let me know.
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.
Here is the PR for the styling.
Hello?
I had some work. I'll do that soon.
Hi,
If you're interested in, have a look at Task Up Ultralite. I do use this one and actively update it.
OK. But I use Space Bar instead.
Task Up is a taskbar.
Then I mean App Icons Taskbar.