diff options
| author | krolxon <krolyxon@tutanota.com> | 2025-12-08 23:59:08 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2025-12-08 23:59:08 +0530 |
| commit | ffd4a5b1c42ef9bb300f0cb0e8f1710694b5390c (patch) | |
| tree | 865214aceabd3644327881548147d45c7b042ea1 /.config/lf | |
| parent | 22b8483178fa1cb798fd31501a9c81497f0e2b0f (diff) | |
lf: use ffmpegthumbnailer for video thumbnail preview
Diffstat (limited to '.config/lf')
| -rwxr-xr-x | .config/lf/scope | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/lf/scope b/.config/lf/scope index 11e54e1..bdccc7f 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -3,6 +3,11 @@ case "$(file -Lb --mime-type -- "$1")" in image/*) chafa -f sixel -s "$2x$3" --animate off --polite on -t 1 --bg black "$1" ;; + video/*) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 + chafa -f sixel -s "$2x$3" --animate off --polite on -t 1 --bg black "$CACHE" + ;; text/*) bat "$1" ;; |
