Preview image renders behind/adjacent to terminal
Nydragon opened this issue · comments
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
alacritty 0.12.3
Did you try the latest code to see if this problem got fixed?
Tried, but the problem still
yazi --debug
output
Yazi
Version: 0.2.5 (VERGEN_IDEMPOTENT_OUTPUT 1980-01-01)
OS: linux-x86_64 (unix)
Debug: false
Emulator
Emulator.via_env: ("alacritty", "")
Emulator.via_csi: Ok(Unknown([]))
Emulator.detect: Unknown([])
Adaptor
Adaptor.matches: Wayland
Desktop
XDG_SESSION_TYPE: Some("wayland")
WAYLAND_DISPLAY: Some("wayland-1")
DISPLAY: Some(":0")
SSH
shared.in_ssh_connection: false
WSL
/proc/sys/fs/binfmt_misc/WSLInterop: false
Variables
SHELL: Some("/nix/store/qddh95vjifqqlvby19maszcapnm3jkhk-bash-interactive-5.2-p15/bin/bash")
EDITOR: Some("nvim")
ZELLIJ_SESSION_NAME: None
YAZI_FILE_ONE: None
YAZI_CONFIG_HOME: None
file(1)
Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "file-5.45\nmagic file from /nix/store/l0yzhkqb9615ifq2gcl2r9i6544qisn1-file-5.45/share/misc/magic\n", stderr: "" })
Text Opener
default: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
block: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
tmux
TMUX: false
Ueberzug++
Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "ueberzugpp 2.9.2\n", stderr: "" })
Describe the bug
The preview image renders adjacent to the terminal window, and behind it if it is maximized.
This did not happen when following the test described here: Why can't I preview images via Überzug++?
Expected Behavior
The image to render correctly inside the preview column.
To Reproduce
Navigate to any image.
Configuration
no config
Anything else?
No response
Please build Yazi in debug mode (cargo build
without --release
flag) and repeat the same steps then paste the contents of yazi --debug
, ~/.local/state/yazi/yazi.log
, and /tmp/ueberzugpp-$USER.log
here.
Here are the outputs:
yazi --debug
Details
Yazi
Version: 0.2.5 (f0108db 1980-01-01)
OS: linux-x86_64 (unix)
Debug: true
Ya
Version: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Emulator
Emulator.via_env: ("alacritty", "")
Emulator.via_csi: Ok(Unknown([]))
Emulator.detect: Unknown([])
Adaptor
Adaptor.matches: Wayland
Desktop
XDG_SESSION_TYPE: Some("wayland")
WAYLAND_DISPLAY: Some("wayland-1")
DISPLAY: Some(":0")
SSH
shared.in_ssh_connection: false
WSL
/proc/sys/fs/binfmt_misc/WSLInterop: false
Variables
SHELL: Some("/nix/store/qddh95vjifqqlvby19maszcapnm3jkhk-bash-interactive-5.2-p15/bin/bash")
EDITOR: Some("nvim")
ZELLIJ_SESSION_NAME: None
YAZI_FILE_ONE: None
YAZI_CONFIG_HOME: None
file(1)
Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "file-5.45\nmagic file from /nix/store/my4dqv1w8pd9nsibl2cz2dkqwpayy22l-file-5.45/share/misc/magic\n", stderr: "" })
Text Opener
default: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
block: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
tmux
TMUX: false
Ueberzug++
Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "ueberzugpp 2.9.2\n", stderr: "" })
~/.local/state/yazi/yazi.log
Details
2024-05-15T10:00:20.932229Z WARN [0m1;33myazi_adaptor::emulator: [Adaptor] No special environment variables detected
[0m2;3mat yazi-adaptor/src/emulator.rs:69
2024-05-15T10:00:20.932298Z WARN [0m1;33myazi_adaptor::emulator: [Adaptor] Unknown TERM_PROGRAM:
[0m2;3mat yazi-adaptor/src/emulator.rs:83
2024-05-15T10:00:20.932309Z WARN [0m1;33myazi_adaptor::emulator: [Adaptor] Unknown TERM: alacritty
[0m2;3mat yazi-adaptor/src/emulator.rs:91
2024-05-15T10:00:32.519780Z DEBUG [0m1;34myazi_adaptor::ueberzug: ueberzugpp rect before adjustment: Rect { x: 133, y: 1, width: 77, height: 62 }
[0m2;3mat yazi-adaptor/src/ueberzug.rs:103
2024-05-15T10:00:32.519879Z DEBUG [0m1;34myazi_adaptor::ueberzug: ueberzugpp rect after adjustment: Rect { x: 133, y: 1, width: 77, height: 62 }
[0m2;3mat yazi-adaptor/src/ueberzug.rs:105
2024-05-15T10:00:32.519891Z DEBUG [0m1;34myazi_adaptor::ueberzug: ueberzugpp command: {"action":"add","identifier":"yazi","x":133,"y":1,"max_width":77,"max_height":62,"path":"/tmp/nix-shell.EOeV1e/yazi/08d81077a7d2a26c62f36b7a89990867"}
[0m2;3mat yazi-adaptor/src/ueberzug.rs:116
2024-05-15T10:00:34.031987Z DEBUG [0m1;34myazi_adaptor::ueberzug: ueberzugpp command: remove
[0m2;3mat yazi-adaptor/src/ueberzug.rs:119
2024-05-15T10:00:34.046165Z DEBUG [0m1;34myazi_adaptor::ueberzug: ueberzugpp rect before adjustment: Rect { x: 67, y: 1, width: 37, height: 63 }
[0m2;3mat yazi-adaptor/src/ueberzug.rs:103
2024-05-15T10:00:34.046221Z DEBUG [0m1;34myazi_adaptor::ueberzug: ueberzugpp rect after adjustment: Rect { x: 67, y: 1, width: 37, height: 63 }
[0m2;3mat yazi-adaptor/src/ueberzug.rs:105
2024-05-15T10:00:34.046232Z DEBUG [0m1;34myazi_adaptor::ueberzug: ueberzugpp command: {"action":"add","identifier":"yazi","x":67,"y":1,"max_width":37,"max_height":63,"path":"/tmp/nix-shell.EOeV1e/yazi/08d81077a7d2a26c62f36b7a89990867"}
[0m2;3mat yazi-adaptor/src/ueberzug.rs:116
/tmp/ueberzugpp-$USER.log
Details
_ _ _
| | | | | | _ _
| | | | ___| |__ ___ _ __ _____ _ __ _ _| |_ _| |_
| | | |/ _ \ '_ \ / _ \ '__|_ / | | |/ _` |_ _|_ _|
| |_| | __/ |_) | __/ | / /| |_| | (_| | |_| |_|
\___/ \___|_.__/ \___|_| /___|\__,_|\__, |
__/ |
|___/ v2.9.2
[2024-05-15 19:00:20.994] [terminal] [info] TERM="alacritty", TERM_PROGRAM=""
[2024-05-15 19:00:20.994] [terminal] [info] PTY = /dev/pts/1
[2024-05-15 19:00:20.994] [terminal] [debug] ioctl sizes: COLS=211 ROWS=64 XPIXEL=3798 YPIXEL=2240
[2024-05-15 19:00:20.994] [terminal] [debug] iterm2 is not supported
[2024-05-15 19:00:20.994] [terminal] [debug] x11 is not supported
[2024-05-15 19:00:20.994] [wayland] [info] Using sway socket /run/user/1000/sway-ipc.1000.1999.sock
[2024-05-15 19:00:20.994] [terminal] [debug] Wayland is supported.
[2024-05-15 19:00:20.994] [wayland] [debug] Obtaining sway tree
[2024-05-15 19:00:20.997] [terminal] [debug] padding_horiz=0 padding_vert=0
[2024-05-15 19:00:20.997] [terminal] [debug] font_width=18 font_height=35
[2024-05-15 19:00:20.997] [wayland] [info] Using sway socket /run/user/1000/sway-ipc.1000.1999.sock
[2024-05-15 19:00:20.997] [wayland] [info] Canvas created
[2024-05-15 19:00:20.997] [main] [info] Listening for commands on socket /tmp/nix-shell.EOeV1e/ueberzugpp-722036.socket
[2024-05-15 19:00:32.520] [main] [info] Command received: {"action":"add","identifier":"yazi","max_height":62,"max_width":77,"path":"/tmp/nix-shell.EOeV1e/yazi/08d81077a7d2a26c62f36b7a89990867","x":133,"y":1}
[2024-05-15 19:00:32.521] [opencv] [info] Loading image /tmp/nix-shell.EOeV1e/yazi/08d81077a7d2a26c62f36b7a89990867
[2024-05-15 19:00:32.522] [wayland] [debug] Running socket command no_focus [app_id="ueberzugpp_utj67ujtb5"]
[2024-05-15 19:00:32.522] [wayland] [debug] Running socket command for_window [app_id="ueberzugpp_utj67ujtb5"] floating enable
[2024-05-15 19:00:32.620] [wayland] [debug] Obtaining sway tree
[2024-05-15 19:00:32.623] [wayland] [debug] Running socket command [app_id="ueberzugpp_utj67ujtb5"] move position 2399 101
[2024-05-15 19:00:32.628] [wayland] [debug] Obtaining sway tree
[2024-05-15 19:00:32.631] [wayland] [debug] Running socket command [app_id="ueberzugpp_utj67ujtb5"] move position 2399 101
[2024-05-15 19:00:34.032] [main] [info] Command received: {"action":"remove","identifier":"yazi"}
[2024-05-15 19:00:34.046] [main] [info] Command received: {"action":"add","identifier":"yazi","max_height":63,"max_width":37,"path":"/tmp/nix-shell.EOeV1e/yazi/08d81077a7d2a26c62f36b7a89990867","x":67,"y":1}
[2024-05-15 19:00:34.046] [opencv] [info] Loading image /tmp/nix-shell.EOeV1e/yazi/08d81077a7d2a26c62f36b7a89990867
[2024-05-15 19:00:34.046] [wayland] [debug] Running socket command no_focus [app_id="ueberzugpp_1y3y9c4tsd"]
[2024-05-15 19:00:34.047] [wayland] [debug] Running socket command for_window [app_id="ueberzugpp_1y3y9c4tsd"] floating enable
[2024-05-15 19:00:34.135] [wayland] [debug] Obtaining sway tree
[2024-05-15 19:00:34.138] [wayland] [debug] Running socket command [app_id="ueberzugpp_1y3y9c4tsd"] move position 2169 86
[2024-05-15 19:00:34.142] [wayland] [debug] Obtaining sway tree
[2024-05-15 19:00:34.144] [wayland] [debug] Running socket command [app_id="ueberzugpp_1y3y9c4tsd"] move position 2169 86
[2024-05-15 19:00:36.191] [wayland] [debug] Obtaining sway tree
[2024-05-15 19:00:36.193] [wayland] [debug] Running socket command [app_id="ueberzugpp_1y3y9c4tsd"] move position 1211 86
[2024-05-15 19:00:40.737] [main] [info] Exiting ueberzugpp
Is "x":133,"y":1
the position your image is expected to display? Could you record a GIF and let me see what happens?
Please record a GIF of what happens when executing https://yazi-rs.github.io/docs/image-preview/#debug-ueberzug with the command in yazi.log
:
{"action":"add","identifier":"yazi","x":133,"y":1,"max_width":77,"max_height":62,"path":"/tmp/nix-shell.EOeV1e/yazi/08d81077a7d2a26c62f36b7a89990867"}
This actually might be an issue related to ueberzugpp:
At least the offset, I don't know about being behind the window
Ah yeah, it seems like these two issues describe the problem you're encountering. You can try:
- Offset the Überzug++ position calculation by configuring
ueberzug_scale
andueberzug_offset
. - Downgrade Überzug++ to an older version, such as
Überzug++ 2.8.8
, which has been confirmed effective in another issue related to the position calculation bug, it might be worth a try.
Hopefully, these two methods above can temporarily workaround the issue until Überzug++ dev fix it. Closing as not Yazi.
Alright, thank you for the info!
I'm going to lock this issue because it has been closed for 30 days. ⏳
This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.