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
c76c1226
Commit
c76c1226
authored
Jan 08, 2019
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image: Added support for Chafa.
parent
eaa59da1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
neofetch
neofetch
+13
-7
neofetch.1
neofetch.1
+5
-2
No files found.
neofetch
View file @
c76c1226
...
...
@@ -669,7 +669,8 @@ disk_display="off"
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="ascii"
...
...
@@ -3412,7 +3413,7 @@ image_backend() {
"ascii") get_ascii ;;
"off") image_backend="off" ;;
"caca" | "jp2a" | "iterm2" | "termpix" |\
"caca" | "
chafa" | "
jp2a" | "iterm2" | "termpix" |\
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty")
get_image_source
...
...
@@ -3437,7 +3438,7 @@ image_backend() {
*)
err "Image: Unknown image backend specified '$image_backend'."
err "Image: Valid backends are: 'ascii', 'caca', 'jp2a', 'iterm2', 'kitty',
err "Image: Valid backends are: 'ascii', 'caca', '
chafa', '
jp2a', 'iterm2', 'kitty',
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
err "Image: Falling back to ascii mode."
get_ascii
...
...
@@ -3807,12 +3808,16 @@ display_image() {
case "$image_backend" in
"caca")
img2txt \
-W "$((width / font_width))
)
" \
-W "$((width / font_width))" \
-H "$((height / font_height))" \
--gamma=0.6 \
"$image"
;;
"chafa")
chafa --size="$((width / font_width))x$((height / font_height))" "$image"
;;
"jp2a")
jp2a \
--colors \
...
...
@@ -4419,8 +4424,8 @@ BARS:
IMAGE BACKEND:
--backend backend Which image backend to use.
Possible values: 'ascii', 'caca', '
jp2a', 'iterm2', 'off
',
'sixel', 'tycat', 'w3m'
Possible values: 'ascii', 'caca', '
chafa', 'jp2a', 'iterm2
',
'
off', '
sixel', 'tycat', 'w3m'
--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]
...
...
@@ -4430,6 +4435,7 @@ IMAGE BACKEND:
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
--caca source Shortcut to use 'caca' backend.
--chafa source Shortcut to use 'chafa' backend.
--iterm2 source Shortcut to use 'iterm2' backend.
--jp2a source Shortcut to use 'jp2a' backend.
--kitty source Shortcut to use 'kitty' backend.
...
...
@@ -4614,7 +4620,7 @@ get_args() {
# Image backend
"--backend") image_backend="$2" ;;
"--source") image_source="$2" ;;
"--ascii" | "--caca" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
"--ascii" | "--caca" | "--
chafa" | "--
jp2a" | "--iterm2" | "--off" | "--pixterm" |\
"--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
image_backend="${1/--}"
case "$2" in
...
...
neofetch.1
View file @
c76c1226
...
...
@@ -217,8 +217,8 @@ Possible values: bar, infobar, barinfo, off
.TP
\fB\-\-backend\fR backend
Which image backend to use.
Possible values: 'ascii', 'caca', '
jp2a', 'iterm2', 'off
',
\&'sixel', 'tycat', 'w3m'
Possible values: 'ascii', 'caca', '
chafa', 'jp2a', 'iterm2
',
\&'
off', '
sixel', 'tycat', 'w3m'
.TP
\fB\-\-source\fR source
Which image or ascii file to use.
...
...
@@ -233,6 +233,9 @@ NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
\fB\-\-caca\fR source
Shortcut to use 'caca' backend.
.TP
\fB\-\-chafa\fR source
Shortcut to use 'chafa' backend.
.TP
\fB\-\-iterm2\fR source
Shortcut to use 'iterm2' backend.
.TP
...
...
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