Lf open in new window
This commit is contained in:
parent
ea5cd95099
commit
71ea302fdf
2 changed files with 68 additions and 7 deletions
|
|
@ -6,6 +6,13 @@ image() {
|
|||
Y=$5
|
||||
MW=$(($2 - 1))
|
||||
MH=$3
|
||||
|
||||
# Handling floating terms like nvim floatterm
|
||||
if [ ! -z "$LF_OVERRIDE_X" ] && [ ! -z "$LF_OVERRIDE_Y" ]; then
|
||||
X="$LF_OVERRIDE_X"
|
||||
Y="$LF_OVERRIDE_Y"
|
||||
fi
|
||||
|
||||
ueberzugpp cmd -s "$UB_SOCKET" -a add -i PREVIEW -x "$X" -y "$Y" --max-width "$MW" --max-height "$MH" -f "$FILE_PATH"
|
||||
exit 1
|
||||
}
|
||||
|
|
@ -29,7 +36,7 @@ case "$(file --dereference --brief --mime-type -- "$1")" in
|
|||
# text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
|
||||
# text/troff) man ./ "$1" | col -b ;;
|
||||
text/* | */xml | application/json)
|
||||
bat --terminal-width "$(($4-2))" -f "$1"
|
||||
bat -p --terminal-width "$(($4-2))" -f "$1"
|
||||
;;
|
||||
audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;;
|
||||
video/* )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue