Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kamiyaa/joshuto
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiyaa committed Nov 20, 2023
2 parents 651f277 + 2796e82 commit 6cabeb9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/image_previews/kitty.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ function image {
"$1" 2>/dev/null
}

function video {
ffmpegthumbnailer -i "$1" -o "${TMP_FILE}" -s 0 2>/dev/null
image "${TMP_FILE}"
}

case "$mimetype" in
image/*)
image "${FILE_PATH}"
;;
*)
video/*)
video "${FILE_PATH}"
;;
*)
kitty +kitten icat \
--transfer-mode=file \
Expand Down

0 comments on commit 6cabeb9

Please sign in to comment.