Skip to content

Commit

Permalink
sixel has lower image viewer priority
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav3398 committed Oct 17, 2023
1 parent 5d52632 commit 1316129
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/preview-tui
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,7 @@ generate_preview() {
image_preview() {
clear
exec >/dev/tty
if exists img2sixel && { [ -z "$NNN_PREVIEWIMGPROG" ] || [ "$NNN_PREVIEWIMGPROG" = "img2sixel -g" ] ;}; then
img2sixel -p16 -g "$3" &
elif [ "$NNN_TERMINAL" = "kitty" ] && [ -z "$NNN_PREVIEWIMGPROG" ]; then
if [ "$NNN_TERMINAL" = "kitty" ] && [ -z "$NNN_PREVIEWIMGPROG" ]; then
kitty +kitten icat --silent --scale-up --place "$1"x"$2"@0x0 --transfer-mode=stream --stdin=no "$3" &
elif [ "$NNN_TERMINAL" = "wezterm" ] && [ -z "$NNN_PREVIEWIMGPROG" ]; then
wezterm imgcat "$3" &
Expand All @@ -436,6 +434,8 @@ image_preview() {
viu -t "$3" &
elif exists chafa && { [ -z "$NNN_PREVIEWIMGPROG" ] || [ "$NNN_PREVIEWIMGPROG" = "chafa" ] ;}; then
chafa "$3" &
elif exists img2sixel && { [ -z "$NNN_PREVIEWIMGPROG" ] || [ "$NNN_PREVIEWIMGPROG" = "img2sixel" ] ;}; then
img2sixel -p16 -g "$3" &
else
fifo_pager print_bin_info "$3" && return
fi
Expand Down

0 comments on commit 1316129

Please sign in to comment.