Closed lorenzobazzana closed 11 months ago
get icon() {
let icon;
if (this._otherProxy.DesktopEntry) {
icon = this._otherProxy.DesktopEntry;
} else {
icon = this.name.toLowerCase().split(" ");
icon = icon[icon.length - 1];
}
if (!icon.includes(".")) {
let appsys = Shell.AppSystem.get_default();
for (let app of appsys.get_running()) {
if (app.get_name().toLowerCase().includes(icon)) {
icon = app.get_id().replace(".desktop", "");
}
}
}
return icon;
}
this would be my proposal @sakithb it looks for running apps and finds the icon this import also would need to be added:
import Shell from "gi://Shell";
I worked on it - not realising you also had it in progress :(
get icon() { let icon; if (this._otherProxy.DesktopEntry) { icon = this._otherProxy.DesktopEntry; } else { icon = this.name.toLowerCase().split(" "); icon = icon[icon.length - 1]; } if (!icon.includes(".")) { let appsys = Shell.AppSystem.get_default(); for (let app of appsys.get_running()) { if (app.get_name().toLowerCase().includes(icon)) { icon = app.get_id().replace(".desktop", ""); } } } return icon; }
this would be my proposal @sakithb it looks for running apps and finds the icon this import also would need to be added:
import Shell from "gi://Shell";
I worked on it - not realising you also had it in progress :(
Thanks, that should work, you can push the changes, I did not really progress on the issue much.
or I can do it if you don't mind
main and gnome44 updated
Hi, I think there's an issue with some player icons for gnome themes that use the default icon for those players.
For example, the theme "Flat Remix" has a custom icon for Spotify and Rhythmbox and everything works fine, while the theme "Flatery-dark" uses the default icons and they don't show up at all, they're replaced istead by a generic audio icon.
By looking around, I think that the issue is related to the
get icon()
method at line 862 in player.js: if the value returned does not match exactly an app icon the extension just thinks that there's no icon at all for that app. This means that some default icons are ignored because they have different names (eg.com.spotify.Client
ororg.gnome.Rhythmbox
)