+ imgPreviewer.sh
This commit is contained in:
13
dots/bin/imgPreviewer.sh
Executable file
13
dots/bin/imgPreviewer.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
file="$1"
|
||||
case "$file" in
|
||||
*.png|*.jpg|*.jpeg|*.gif|*.bmp|*.tiff|*.webp)
|
||||
# 260227: img2sixel is (currently) not supported by kitty
|
||||
# img2sixel -w "$(tput cols)" "$file"
|
||||
kitty +kitten icat "$file"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported image format"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
16
dots/lf/lfrc
16
dots/lf/lfrc
@@ -29,11 +29,13 @@ set cursorpreviewfmt "\033[7;2m"
|
||||
# ctpv
|
||||
# https://github.com/NikitaIvanovV/ctpv
|
||||
set sixel true
|
||||
#set preview true
|
||||
set preview true
|
||||
set previewer imgPreviewer.sh
|
||||
|
||||
#set previewer ctpv
|
||||
#set cleaner ctpvclear
|
||||
&ctpv -s $id
|
||||
&ctpvquit $id
|
||||
#&ctpv -s $id
|
||||
#&ctpvquit $id
|
||||
|
||||
# --------------------
|
||||
# map
|
||||
@@ -179,11 +181,3 @@ cmd yb :yank-basename
|
||||
|
||||
# misc
|
||||
cmd edit $nano "$fx"
|
||||
|
||||
# preview image files
|
||||
file="$1"
|
||||
case "$file" in
|
||||
*.png|*.jpg|*.jpeg|*.webp)
|
||||
img2sixel "$file"
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user