Closed jdujava closed 2 months ago
Have you tried logging the parameters to the previewer
script (e.g. x, y, width, height) whenever it runs? These values are measured in cells, so they should change whenever the terminal resizes.
You are right, the values (x
, y
, width
, height
) are indeed changing on the font resizing. It seems, that ueberzug
/ueberzugpp
just has trouble adapting to the new font size.
I finally had some time to look at this, it seems like the issue is to do with ueberzugpp
. I updated that issue with my own findings. In the meantime please try https://github.com/ueber-devel/ueberzug to see if that works for you instead.
Yeah, I tried following your steps, and
ueberzug
properly updated both position and size of the image, whileueberzugpp
didn't.This is maybe more suited to mention in
lf
issue, but position/size of previews inlf
didn't update with neitherueberzug
orueberzugpp
. But this can be caused by my setup and way of launchinglf
withueberzug
, more than with their response to resizing.
That seems strange if ueberzug
can work by itself but not while running lf
. lf
doesn't actually do anything special with ueberzug
at all, it's all controlled by user configuration. Have you tried:
ueberzugpp
instead of ueberzug
when running lf
?Now I see that my message wasn't very clear. Position/size of previews was changing on new preview
updates, but it was still stuck with the old "fontsize".
Now I have located the culprit. I was launching ueberzug
with lf
via
setsid ueberzug layer -s <"$FIFO_UEBERZUG" &
where setsid
(don't know the exact details) precluded ueberzug
to obtain updates about the terminal font size. Running with
ueberzug layer -s <"$FIFO_UEBERZUG" &
results in ueberzug
properly adapting to resizes. Still, as you pointed out directly, ueberzugpp
is not able to react to font size changes anyway.
@joelim-work Thank you very much for looking into this!
I use image previews in
lf
viaueberzugpp
. After resizing the terminal font, the image preview is not located at proper position. Exitinglf
and starting new instance (in the terminal with resized font) fixes the sizing and positioning of the preview.Perhaps
lf
setups some variables depending on the font size (which concern preview size/positioning) only at the start?