Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] In window mode, some apps don't have an icon #1931

Closed
2 tasks done
Luzzifus opened this issue Jan 2, 2024 · 8 comments
Closed
2 tasks done

[BUG] In window mode, some apps don't have an icon #1931

Luzzifus opened this issue Jan 2, 2024 · 8 comments
Labels

Comments

@Luzzifus
Copy link

Luzzifus commented Jan 2, 2024

Rofi version (rofi -v)

1.7.5-189-g11d801ea-dirty (next)

Configuration

https://gist.github.com/Luzzifus/468af44845b0729358dbd8a6bab5a3be

Theme

https://gist.github.com/Luzzifus/53e44e97dd9171f4e8a730d1adfc0321

Timing report

No response

Launch command

rofi -show window

Step to reproduce

  • get one of the problematic applications listed below
  • execute launch command
  • look at icons of application windows

Expected behavior

All application windows in the list should have an icon.

Actual behavior

This works for most applications, but not all. The applications in question do have an icon in drun mode, but not in window mode when they have been started already. There is no error message, just the space for the icon is blank.

Some examples for applications missing icons in window mode:

  • Freetube (flatpak)
  • Upnote - (snap)
  • Pinta - (flatpak)
  • Paleta - (flatpak)
  • gnome-multi-writer

Additional information

  • I am running Pop! OS 22.04.
  • This problem occurred for me in v1.7.1 (via apt) as well as the latest version (next branch, compiled from source).
  • Other launchers can display the icons fine (e.g. the Cosmic Launcher in Pop! OS).

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version
@Luzzifus Luzzifus added the bug label Jan 2, 2024
@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Jan 2, 2024

There is no relation between "run" and "window" in source of icon.

Therefor if the application does not set an icon on its windows, and the class name does not resolve to an icon, rofi has nothing to display .

I am also confused, "gnome-multi-writer" has no icon under "run" only under "drun" on pop! os 22.04..

@Luzzifus
Copy link
Author

Luzzifus commented Jan 2, 2024

I am also confused, "gnome-multi-writer" has no icon under "run" only under "drun" on pop! os 22.04..

Yes, I meant drun, sorry.

@Luzzifus
Copy link
Author

Luzzifus commented Jan 2, 2024

Therefor if the application does not set an icon on its windows, and the class name does not resolve to an icon, rofi has nothing to display.

So is there a way I can "help" rofi resolve the icons? E.g. by manually placing them in the right spot with a resolvable name?

@DaveDavenport
Copy link
Collaborator

This:
cp "/usr/share/icons/hicolor/256x256/apps/org.gnome.MultiWriter.png" ~/.local/share/icons/gnome-multi-writer.png

should do it.

@Luzzifus
Copy link
Author

Luzzifus commented Jan 2, 2024

Thanks, that worked. I was able to fix the other apps that way too.

@Luzzifus
Copy link
Author

Luzzifus commented Jan 2, 2024

I think the frequency of this issue occurring could be reduced by searching for the executable name in .desktop files. In all of my cases the executable name is either the filename of the respective .desktop file itself (case insensitive comparison) or is part of its command field. Then the icon could be resolved from the desktop file itself.

@DaveDavenport
Copy link
Collaborator

That won't work in rofi's design, there is no link between desktop file and window, or "executable" and window.

I prefer it if applications just properly set an icon on their window.

@Luzzifus Luzzifus closed this as completed Jan 3, 2024
Copy link

github-actions bot commented Feb 4, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants