Ranger: TGA support
parent
98e7b6bb20
commit
6adaae6d57
|
@ -133,13 +133,14 @@ mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
# Image Viewing:
|
# Image Viewing:
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
mime ^image, has eog, X, flag f = eog -- "$@"
|
|
||||||
mime ^image, has sxiv, X, flag f = sxiv -fs -- "$@"
|
mime ^image, has sxiv, X, flag f = sxiv -fs -- "$@"
|
||||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
mime ^image, has feh, X, flag f = feh -- "$@"
|
||||||
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
||||||
|
mime ^image, has eog, X, flag f = eog -- "$@"
|
||||||
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
||||||
ext xcf, X, flag f = gimp -- "$@"
|
ext xcf, X, flag f = gimp -- "$@"
|
||||||
|
|
||||||
|
ext tga, X, flag f = sxiv -fs -- "$@"
|
||||||
ext svg, has dwb, X, flag f = dwb -- "$@"
|
ext svg, has dwb, X, flag f = dwb -- "$@"
|
||||||
ext svg, has inkscape X, flag f = inkscape -- "$@"
|
ext svg, has inkscape X, flag f = inkscape -- "$@"
|
||||||
|
|
||||||
|
|
|
@ -71,36 +71,29 @@ case "$extension" in
|
||||||
|
|
||||||
## CUSTOM SUPPORT
|
## CUSTOM SUPPORT
|
||||||
ogg)
|
ogg)
|
||||||
try mediainfo "$path" && { dump | sed 's/ \+:/: /;' | trim | fmt -s -w $width; exit 4; }
|
try mediainfo "$path" && { dump | sed 's/ \+:/: /;' | trim | fmt -s -w $width; exit 4; } ;;
|
||||||
;;
|
|
||||||
mkv)
|
mkv)
|
||||||
try mediainfo "$path" && { dump | sed 's/ \+:/: /;' | trim | fmt -s -w $width; exit 4; }
|
try mediainfo "$path" && { dump | sed 's/ \+:/: /;' | trim | fmt -s -w $width; exit 4; } ;;
|
||||||
;;
|
|
||||||
doc)
|
doc)
|
||||||
try antiword "$path" && { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
try antiword "$path" && { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
||||||
rtf)
|
rtf)
|
||||||
try unrtf --text "$path" && { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
try unrtf --text "$path" && { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
||||||
odt)
|
odt)
|
||||||
try odt2txt "$path" && { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
try odt2txt "$path" && { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
||||||
|
tga)
|
||||||
|
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$mimetype" in
|
case "$mimetype" in
|
||||||
# Syntax highlight for text files:
|
# Syntax highlight for text files:
|
||||||
text/* | */xml)
|
text/* | */xml)
|
||||||
# try highlight --out-format=ansi "$path" && { dump | trim; exit 5; } || exit 2;;
|
|
||||||
try highlight --out-format=xterm256 -s clarity "$path" && { dump | trim; exit 5; } || exit 2;;
|
try highlight --out-format=xterm256 -s clarity "$path" && { dump | trim; exit 5; } || exit 2;;
|
||||||
|
|
||||||
# Ascii-previews of images:
|
# Ascii-previews of images:
|
||||||
image/*)
|
image/*)
|
||||||
# img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
|
|
||||||
exiftool "$path" && exit 5
|
exiftool "$path" && exit 5
|
||||||
# # Use sed to remove spaces so the output fits into the narrow window
|
# # Use sed to remove spaces so the output fits into the narrow window
|
||||||
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
|
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
|
||||||
# if have mediainfo; then
|
|
||||||
# mediainfo "$path" | sed 's/ \+:/: /;'
|
|
||||||
# success && exit 5
|
|
||||||
# fi
|
|
||||||
# exit 1;;
|
|
||||||
|
|
||||||
# Display information about media files:
|
# Display information about media files:
|
||||||
video/* | audio/*)
|
video/* | audio/*)
|
||||||
|
|
Loading…
Reference in New Issue