slavistan / lf-gadgets

A collection of useful and nifty use cases and configurations for lf.
GNU General Public License v3.0
132 stars 16 forks source link

lf-yt doesn't display thumbnail or show proper title #2

Closed MuizU closed 3 years ago

MuizU commented 3 years ago

I have installed the prerequisites for lf-yt including ueberzug but I still am unable to get the thumbnail display to work. On the other hand the title of the video doesn't show properly as well. image

slavistan commented 3 years ago

Very curious. May I ask you to reinstall lf-yt and paste the output of sudo -E make install? I would like to see if anything does wrong during your setup.

MuizU commented 3 years ago

Very curious. May I ask you to reinstall lf-yt and paste the output of sudo -E make install? I would like to see if anything does wrong during your setup.

This was what I got

mkdir -p "/usr/local/bin"
cp -f lf-yt lf-yt-cleaner lf-yt-previewer \
"/usr/local/bin"
chmod 755 "/usr/local/bin/lf-yt" \
"/usr/local/bin/lf-yt-cleaner" \
"/usr/local/bin/lf-yt-previewer"
mkdir -p "/home/muizu/.config/lf-yt"
cp -f lfrc-yt "/home/muizu/.config/lf-yt"

slavistan commented 3 years ago

Looks good to me. Do regular ueberzug image previews work with lf? Check out the lf-ueberzug directory in this repository if you need help setting that up.

Other than that you may try to (temporarily) delete your lfrc (should be located in $HOME/.config/lf/). lf-yt uses its own config lfyt-rc, however the default lfrc is loaded aswell (something which I cannot avoid currently as that's lf's built-in behavior). Your own lfrc may break things with lf-yt, try to remove it temporarily.

If none of that works we'll do some systematic debugging.

MuizU commented 3 years ago

I removed my lfrc and tried lf-ueberzug. The issue I'm having is that even lf-ueberzug doesn't work despite me removing the config file. image

slavistan commented 3 years ago

Okay, your ueberzug version is up-to-date, aye? (18.1.9).

Run this in your terminal to ascertain that image previews work. This should display your .png image at the top left corner of the terminal.

cd $(mktemp -d)
img=/full/path/to/image.png # your image here

mkfifo fifo
tail -f fifo | ueberzug layer --silent &
sleep 1

cat <<-EOF | paste -sd '' >fifo
{
"action": "add", "identifier": "lf-preview",
"path": "$img", "x": 0, "y": 0, "width": 20, "height": 30,
"scaler": "contain"
}
EOF

image

MuizU commented 3 years ago

Yes, my ueberzug version is up to date. I wasn't able to successfully execute that script image

slavistan commented 3 years ago

Very curious indeed. The above code snippet is a minimum working example for ueberzug overlays which requires nothing more than GNU/linux and ueberzug.

Your ueberzug terminates with exit code 1 where it shouldn't terminate at all. Remove the --silent flag from the above script and try again. ueberzug should then tell you its problem.

MuizU commented 3 years ago

This is what I'm getting image

slavistan commented 3 years ago

Alright, something's definitely wrong with your ueberzug installation. Please head over to ueberzug's github page and create an issue for that very problem. Once that's fixed lf-yt will probably work as intended.

slavistan commented 3 years ago

Closing for lack of activity. Reopen if you feel the problem is on this project's side.