mirror of
https://github.com/hykilpikonna/hyfetch.git
synced 2026-08-22 16:55:36 -05:00
[+] low sixel image output for terminals that doesn't support -I (Fix #404)
This commit is contained in:
@@ -249,7 +249,7 @@ Possible values: bar, infobar, barinfo, off
|
||||
\fB\-\-backend\fR backend
|
||||
Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a',
|
||||
\&'iterm2', 'off', 'sixel', 'tycat', 'w3m', 'kitty', 'viu'
|
||||
\&'iterm2', 'off', 'sixel', 'lowsixel', 'tycat', 'w3m', 'kitty', 'viu'
|
||||
.TP
|
||||
\fB\-\-source\fR source
|
||||
Which image or ascii file to use.
|
||||
@@ -279,6 +279,9 @@ Shortcut to use 'jp2a' backend.
|
||||
\fB\-\-kitty\fR source
|
||||
Shortcut to use 'kitty' backend.
|
||||
.TP
|
||||
\fB\-\-lowsixel\fR source
|
||||
Shortcut to use 'lowsixel' backend.
|
||||
.TP
|
||||
\fB\-\-pot\fR source
|
||||
Shortcut to use 'pot' backend.
|
||||
.TP
|
||||
|
||||
22
neofetch
22
neofetch
@@ -836,8 +836,8 @@ disk_display="off"
|
||||
#
|
||||
# Default: 'ascii'
|
||||
# Values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2', 'off',
|
||||
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty', 'ueberzug',
|
||||
# 'viu'
|
||||
# 'pot', 'termpix', 'pixterm', 'sixel', 'lowsixel', 'tycat', 'w3m',
|
||||
# 'kitty', 'ueberzug', 'viu'
|
||||
|
||||
# Flag: --backend
|
||||
image_backend="ascii"
|
||||
@@ -5534,7 +5534,7 @@ image_backend() {
|
||||
"off") image_backend="off" ;;
|
||||
|
||||
"caca" | "catimg" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
|
||||
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty" | "pot", | "ueberzug" |\
|
||||
"tycat" | "w3m" | "sixel" | "lowsixel" | "pixterm" | "kitty" | "pot", | "ueberzug" |\
|
||||
"viu")
|
||||
get_image_source
|
||||
|
||||
@@ -5561,8 +5561,8 @@ image_backend() {
|
||||
*)
|
||||
err "Image: Unknown image backend specified '$image_backend'."
|
||||
err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2',
|
||||
'kitty', 'off', 'sixel', 'pot', 'pixterm', 'termpix',
|
||||
'tycat', 'w3m', 'viu')"
|
||||
'kitty', 'off', 'sixel', 'lowsixel', 'pot', 'pixterm',
|
||||
'termpix', 'tycat', 'w3m', 'viu')"
|
||||
err "Image: Falling back to ascii mode."
|
||||
print_ascii
|
||||
;;
|
||||
@@ -6054,6 +6054,13 @@ display_image() {
|
||||
"$image"
|
||||
;;
|
||||
|
||||
"lowsixel")
|
||||
img2sixel \
|
||||
-w "$width" \
|
||||
-h "$height" \
|
||||
"$image"
|
||||
;;
|
||||
|
||||
"termpix")
|
||||
termpix \
|
||||
--width "$((width / font_width))" \
|
||||
@@ -6697,7 +6704,7 @@ BARS:
|
||||
IMAGE BACKEND:
|
||||
--backend backend Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a',
|
||||
'iterm2', 'off', 'sixel', 'tycat', 'w3m', 'kitty', 'viu'
|
||||
'iterm2', 'off', 'sixel', 'lowsixel', 'tycat', 'w3m', 'kitty', 'viu'
|
||||
--source source Which image or ascii file to use.
|
||||
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
|
||||
'/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
|
||||
@@ -6712,6 +6719,7 @@ IMAGE BACKEND:
|
||||
--iterm2 source Shortcut to use 'iterm2' backend.
|
||||
--jp2a source Shortcut to use 'jp2a' backend.
|
||||
--kitty source Shortcut to use 'kitty' backend.
|
||||
--lowsixel source Shortcut to use 'lowsixel' backend.
|
||||
--pot source Shortcut to use 'pot' backend.
|
||||
--pixterm source Shortcut to use 'pixterm' backend.
|
||||
--sixel source Shortcut to use 'sixel' backend.
|
||||
@@ -6979,7 +6987,7 @@ get_args() {
|
||||
"--backend") image_backend="$2" ;;
|
||||
"--source") image_source="$2" ;;
|
||||
"--ascii" | "--caca" | "--catimg" | "--chafa" | "--jp2a" | "--iterm2" | "--off" |\
|
||||
"--pot" | "--pixterm" | "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty" |\
|
||||
"--pot" | "--pixterm" | "--sixel" | "--lowsixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty" |\
|
||||
"--ueberzug" | "--viu")
|
||||
image_backend="${1/--}"
|
||||
case $2 in
|
||||
|
||||
Reference in New Issue
Block a user