lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
1.03k stars 43 forks source link

[BUG] Sometimes the text disappears when output with images #141

Open DIMFLIX-OFFICIAL opened 4 months ago

DIMFLIX-OFFICIAL commented 4 months ago

Rofi version (rofi -v or git commit in case of build issue)

Version: 1.7.5+wayland3-26-gd88b475b (makepkg)

Configuration

https://gist.github.com/DIMFLIX-OFFICIAL/059ef9ccab59cae7f1489d50e23f5223

Theme

https://gist.github.com/DIMFLIX-OFFICIAL/a5e3ad391f6ae554723ad62dcff006bd

Timing report

No response

Launch command

rofi -dmenu -i -p Choose a wallpaper: -theme ~/.config/rofi/wallselect.rasi

Step to reproduce

Change the paths to the photos to your own in this python script, and run it.

import subprocess
from pathlib import Path

rofi_theme = str(Path.home() / ".config" / "rofi" / "wallselect.rasi")
command = ["rofi", "-dmenu", "-i", "-p", "Select Wallpaper", "-theme", rofi_theme]
images = [
    '/home/dimflix/.cache/meowrch/wallpaper_thumbnails/1.png',
    '/home/dimflix/.cache/meowrch/wallpaper_thumbnails/2.png',
    '/home/dimflix/.cache/meowrch/wallpaper_thumbnails/3.png',
    '/home/dimflix/.cache/meowrch/wallpaper_thumbnails/4.png',
    '/home/dimflix/.cache/meowrch/wallpaper_thumbnails/5.png'
]
input_list = []

for i in images:
    input_list.append(f"{Path(i).name}\x00icon\x1f{str(i)}")

selection = subprocess.run(
    command,
    input="\n".join(input_list), 
    capture_output=True, 
    text=True
)

wallselect.rasi - https://gist.github.com/DIMFLIX-OFFICIAL/059ef9ccab59cae7f1489d50e23f5223 theme.rasi in wallselect.rasi - https://gist.github.com/DIMFLIX-OFFICIAL/a5e3ad391f6ae554723ad62dcff006bd

Expected behavior

The output of the images, and below them the name of the image. expected

Actual behavior

Sometimes profi breaks down and does not output text actual

Additional information

https://github.com/user-attachments/assets/4d8a9660-1a8c-4d6b-897e-9416b13b3525

Using wayland display server protocol

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