kotelnik / plasma-applet-active-window-control

Plasma 5 applet for controlling currently active window.
GNU General Public License v2.0
119 stars 18 forks source link

reverse title order, first app then specifics #37

Closed kupiqu closed 7 years ago

kupiqu commented 7 years ago

please check the attached patch

I'm using it by default, I find it useful. This could be set as an option for the final user if you would like...

reverseTitleOrder.patch.txt

kotelnik commented 7 years ago

Added by supporting custom regex replacing :).

kupiqu commented 7 years ago

Cool approach! :)

However, for Chromium (and perhaps Chrome), it doesn't seem to work fine, is it?

kotelnik commented 7 years ago

You're right! Sorry, here: ^(.*)\s*[—–\-:]\s*(Mozilla )?([^—–\-:]+)$ ...I'll update the default. Thanks!

kupiqu commented 7 years ago

perfect, thanks!

kupiqu commented 7 years ago

The regular expression above seems to fail in Mozilla Firefox when there is no dash (it shows just "Mozilla Firefox", and I would like it to be replaced to just "Firefox"). This happens transiently at startup for all websites until they are loaded, and it is persistent for an empty tab, at least until switching tabs). I think this could be fixed by just removing all appearances of "Mozilla " from the window title, irrespective of whether a dash is present or not. Could this be added to the regular expression? Thank you!