Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
dbe78104
Unverified
Commit
dbe78104
authored
Nov 03, 2020
by
Paul Delafosse
Committed by
GitHub
Nov 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(backend): add viu image backend (#1592)
* feat(backend): add viu image backend * fix: double quote typo on viu command
parent
9818199c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
neofetch
neofetch
+14
-5
No files found.
neofetch
View file @
dbe78104
...
...
@@ -749,7 +749,8 @@ disk_display="off"
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2', 'off',
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty', 'ueberzug'
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty', 'ueberzug',
# 'viu'
# Flag: --backend
image_backend="ascii"
...
...
@@ -3892,7 +3893,8 @@ image_backend() {
"off") image_backend="off" ;;
"caca" | "catimg" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty" | "pot", | "ueberzug")
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty" | "pot", | "ueberzug" |\
"viu")
get_image_source
[[ ! -f "$image" ]] && {
...
...
@@ -3919,7 +3921,7 @@ 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')"
'tycat', 'w3m'
, 'viu'
)"
err "Image: Falling back to ascii mode."
print_ascii
;;
...
...
@@ -4398,6 +4400,12 @@ display_image() {
"$image"
;;
"viu")
viu \
-t -w "$((width / font_width))" -h "$((height / font_height))" \
"$image"
;;
"w3m")
get_w3m_img_path
zws='\xE2\x80\x8B\x20'
...
...
@@ -4973,7 +4981,7 @@ BARS:
IMAGE BACKEND:
--backend backend Which image backend to use.
Possible values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a',
'iterm2', 'off', 'sixel', 'tycat', 'w3m', 'kitty'
'iterm2', 'off', 'sixel', '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]
...
...
@@ -4995,6 +5003,7 @@ IMAGE BACKEND:
--tycat source Shortcut to use 'tycat' backend.
--w3m source Shortcut to use 'w3m' backend.
--ueberzug source Shortcut to use 'ueberzug' backend
--viu source Shortcut to use 'viu' backend
--off Shortcut to use 'off' backend (Disable ascii art).
NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img',
...
...
@@ -5224,7 +5233,7 @@ get_args() {
"--source") image_source="$2" ;;
"--ascii" | "--caca" | "--catimg" | "--chafa" | "--jp2a" | "--iterm2" | "--off" |\
"--pot" | "--pixterm" | "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty" |\
"--ueberzug")
"--ueberzug"
| "--viu"
)
image_backend="${1/--}"
case $2 in
"-"* | "") ;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment