JakeStanger / ironbar

Customisable Wayland gtk bar written in Rust.
https://crates.io/crates/ironbar
MIT License
488 stars 38 forks source link

[Launcher] Incorrect icons being used #228

Closed donovanglover closed 12 months ago

donovanglover commented 1 year ago

Describe the bug For example, if I add an a.b.c favorite I get a librewolf icon. Memento uses an htop icon, which I assume is because the class name is projects.ripose.. Any programs that have the class name .program-wrapped appear to be broken as well.

To Reproduce

  1. Open memento or use a random string of characters as a favorite

Expected behavior Incorrect icons should never be visible to the user. How about an icon indicating that none was found instead?

System information:

Additional context The memento.desktop file has an Icon=memento field. How feasible is it to use this instead of the app_id?

Would it be better to let users specify their own class name and icon overrides? Should these overrides be mapped to desktop files?

JakeStanger commented 1 year ago

The memento.desktop file has an Icon=memento field. How feasible is it to use this instead of the app_id?

Before the desktop file is consulted, the theme is checked for an icon name matching. If one isn't found, a search is done for desktop files, and it will check the Icon field. I suspect filenames are currently matching a bit too eagerly, and I'll need to tone this down to resolve this.