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

[REQUEST] window overview with images/icons #104

Open
2 tasks done
ildar opened this issue Dec 6, 2023 · 6 comments
Open
2 tasks done

[REQUEST] window overview with images/icons #104

ildar opened this issue Dec 6, 2023 · 6 comments

Comments

@ildar
Copy link

ildar commented Dec 6, 2023

Before opening a feature request

  • I checked the next branch to see if the feature has already been implemented
  • I searched existing reports to see if it is already requested.

What is the user problem or growth opportunity you want to see solved?

Window overview show only XWayland windows' icons

rofi -show drun -show-icons

How do you know that this problem exists today? Why is this important?

rofi -show drun -show-icons

Window overview should show window images or icons.

Who will benefit from it?

Wayland users

Rofi version (rofi -v)

Version: 1.7.5+wayland2

Configuration

none

Additional information

any smart hint for this?
Compositor: Hyprland.

@lbonn
Copy link
Owner

lbonn commented Dec 6, 2023

Just to clarify, you are talking about "window overview" but your description mentions a drun invocation. Did you mean rofi -show window -show-icons?

On sway, I have just tried it and it shows the firefox icon just fine even though it is a native wayland window.

Maybe it's an issue with hyprland not filling in the app_id in this case?

See the code here

@ildar
Copy link
Author

ildar commented Dec 6, 2023 via email

@ildar
Copy link
Author

ildar commented Dec 6, 2023

Screenshot-2023-12-07-00:54:29

@Seme4eg
Copy link

Seme4eg commented Jan 9, 2025

To me it seems like a problem with -show-icons flag, because i have a script for a long time, that was working just fine and was doing following:

  • get a path to a wallpaper and print it with its icon path so rofi was displaying it
  find -L "$wp_dir" -type f -printf "%P\n" |
    while read -r wp; do
      printf '%s\x00icon\x1f%s/%s\n' "$wp" "$wp_dir" "$wp"
    done
  • pipe those strings to rofi -dmenu -i -show-icons -select "${wallpaper#"$wp_dir/"}" -theme-str {custom theme}"

full script is here

and now its broken and instead of small thumbnails shows this, so i guess its stopped evaluating the icon paths properly

image

@lbonn
Copy link
Owner

lbonn commented Jan 9, 2025

@Seme4eg Right now I can only test on x11 but this works and shows some headphones icon on the latest dev commit:

printf 'test\x00icon\x1f%s\n' /usr/share/icons/Adwaita/32x32/devices/audio-headphones.png | rofi -dmenu -show-icons

Your screenshot looks a bit strange to me because it shows literal \x00 whereas actual bytes should be sent and rofi does not display them in an escaped way.

My guess is that it's a shell thing. I see that your script starts with #!/bin/sh which would be dash on ubuntu which seems to have a different printf:

$ dash -c 'printf "\x30\n"'
\x30

Try with bash

@Seme4eg
Copy link

Seme4eg commented Jan 9, 2025

And you are absolutely right, sir, very much my bad. Couldn't think that it would affect this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants