You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows names are detected by inspecting in the following priority
- name
- title
- instance
- class
This causes issues with windows with dynamic names. Take for instance Firefox - if the current webpage title begins with a string matching any of the configured icons, the icon is changed:
Normal Firefox window (name doesn't match anything other than Firefox):
Visiting the Scipy signal processing toolkit documentation (matches the Signal icon):
Searching for "Chrome" on Google (matches the Chrome/Chromium icon):
Just to show that it's not just Firefox. I launched a terminal (Alacritty) and changed the title to Chrome using
IMO, to prevent this, the matching order should actually be the inverse:
Class
Instance
Title
Name
I could do this myself (from looking at the code, it wouldn't even take 5 minutes), but I wonder if there's any specific reason the matching is done in that order?
The text was updated successfully, but these errors were encountered:
This can be prevented using regex anchors for an exact match e.g.: ^signal$ . Though with the current matching, this would have to be done for all icons which you want to match exactly, whereas icons which you want to match loosely can be entered normally in app-icons.json. Since the former is probably more common, perhaps the inverse behavior would be preferred (up for discussion).
Regarding the matching order of class, instance, etc., this is required because the class is usually the least specific/most static. Making class the top priority would prevent setting a specific icon for e.g. browser web apps which would always have the browsers' class and match with that instead of the web app instance.
I also don't see this being too much of an issue. I think having regex matching as default is worth it vs the off chance that you might be googling for that term in your browser.
The documentation states:
This causes issues with windows with dynamic names. Take for instance Firefox - if the current webpage title begins with a string matching any of the configured icons, the icon is changed:
Normal Firefox window (name doesn't match anything other than Firefox):
![normal](https://user-images.githubusercontent.com/1755518/76254211-73d57300-6222-11ea-959f-6a18deab9877.png)
Visiting the Scipy signal processing toolkit documentation (matches the Signal icon):
![signal](https://user-images.githubusercontent.com/1755518/76254216-76d06380-6222-11ea-8387-46773cc54ccb.png)
Searching for "Chrome" on Google (matches the Chrome/Chromium icon):
![chrome](https://user-images.githubusercontent.com/1755518/76254221-7932bd80-6222-11ea-97e3-d8acffe73e58.png)
Just to show that it's not just Firefox. I launched a terminal (Alacritty) and changed the title to Chrome using
IMO, to prevent this, the matching order should actually be the inverse:
I could do this myself (from looking at the code, it wouldn't even take 5 minutes), but I wonder if there's any specific reason the matching is done in that order?
The text was updated successfully, but these errors were encountered: