Commit 475dee93 authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

Merge pull request #616 from dylanaraps/image-rewrite

Image: Rewrite backend handling.
parents cb6250f9 71b35b57
...@@ -524,17 +524,69 @@ battery_display="off" ...@@ -524,17 +524,69 @@ battery_display="off"
disk_display="off" disk_display="off"
# Image Options # Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m'
# Flag: --backend
image_backend="ascii"
# Image Source # Image Source
# #
# Default: 'ascii' # Which image or ascii file to display.
# Values: 'ascii', 'wallpaper', '/path/to/img', '/path/to/dir/', 'off' #
# Flag: --image # Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# Flag: --source
# #
# NOTE: Change this to 'wallpaper', '/path/to/img' or /path/to/dir/' to enable image mode. You can also launch neofetch with '--image wallpaper' and etc. # NOTE: 'auto' will pick the best image source for whatever image backend is used.
image_source="ascii" # In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
# Ascii Options
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
#
# NOTE: Arch and Ubuntu have 'old' logo variants.
# Change this to 'arch_old' or 'ubuntu_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
# NOTE: Arch, Crux and Gentoo have a smaller logo variant.
# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos.
ascii_distro="auto"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Image Options
# Thumbnail directory # Thumbnail directory
# #
...@@ -542,22 +594,6 @@ image_source="ascii" ...@@ -542,22 +594,6 @@ image_source="ascii"
# Values: 'dir' # Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# w3m-img path
# Only works with the w3m backend.
#
# NOTE: Only change this if "neofetch -v" says that it "couldn't find w3m-img".
# Neofetch has a function that automatically finds w3m-img for you. It looks
# in the following directories:
# /usr/lib/w3m/w3mimgdisplay
# /usr/libexec/w3m/w3mimgdisplay
# /usr/lib64/w3m/w3mimgdisplay
# /usr/libexec64/w3m/w3mimgdisplay
# If w3m-img is installed elsewhere on your system, open an issue on the repo
# and I'll add it to the function inside the script. If w3m-img is installed
# in a non-standard way (in your home folder, etc) then change the variable
# below to the custom location. Otherwise, don't touch this.
w3m_img_path="/usr/lib/w3m/w3mimgdisplay"
# Crop mode # Crop mode
# #
# Default: 'normal' # Default: 'normal'
...@@ -612,53 +648,6 @@ xoffset=0 ...@@ -612,53 +648,6 @@ xoffset=0
background_color= background_color=
# Ascii Options
# Default ascii image to use
# When this is set to distro it will use your
# distro's logo as the ascii.
#
# Default: 'distro'
# Values: 'distro', '/path/to/ascii_file'
# Flag: --ascii
ascii="distro"
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
#
# NOTE: Arch and Ubuntu have 'old' logo variants.
# Change this to 'arch_old' or 'ubuntu_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
# NOTE: Arch, Crux and Gentoo have a smaller logo variant.
# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos.
ascii_distro="auto"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Scrot Options # Scrot Options
...@@ -714,7 +703,7 @@ scrot_name="neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png" ...@@ -714,7 +703,7 @@ scrot_name="neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png"
image_host="teknik" image_host="teknik"
# Config Options # Misc Options
# Config version. # Config version.
......
...@@ -171,51 +171,40 @@ Possible values: bar, infobar, barinfo, off ...@@ -171,51 +171,40 @@ Possible values: bar, infobar, barinfo, off
\fB\-\-disk_display\fR mode \fB\-\-disk_display\fR mode
Bar mode. Bar mode.
Possible values: bar, infobar, barinfo, off Possible values: bar, infobar, barinfo, off
.SS "IMAGE:" .SS "IMAGE BACKEND:"
.TP .TP
\fB\-\-image\fR type \fB\-\-backend\fR backend
Image source. Where and what image we display. Which image backend to use.
Possible values: wall, ascii, Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m'
\fI\,/path/to/img\/\fP, /path/to/dir/, off
.TP .TP
\fB\-\-size\fR 00px | \fB\-\-size\fR 00% \fB\-\-source\fR source
How to size the image. Which image or ascii file to use.
Possible values: auto, 00px, 00%, none Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
.TP .TP
\fB\-\-crop_mode\fR mode \fB\-\-ascii\fR
Which crop mode to use source Shortcut to use 'ascii' backend.
Possible values: normal, fit, fill
.TP .TP
\fB\-\-crop_offset\fR value \fB\-\-caca\fR
Change the crop offset for normal mode. source Shortcut to use 'caca' backend.
Possible values: northwest, north, northeast,
west, center, east, southwest, south, southeast
.TP .TP
\fB\-\-xoffset\fR px \fB\-\-catimg\fR
How close the image will be to the left edge of the source Shortcut to use 'catimg' backend.
window. This only works with w3m.
.TP .TP
\fB\-\-yoffset\fR px \fB\-\-iterm2\fR
How close the image will be to the top edge of the source Shortcut to use 'iterm2' backend.
window. This only works with w3m.
.TP .TP
\fB\-\-bg_color\fR color \fB\-\-tycat\fR
Background color to display behind transparent image. source Shortcut to use 'tycat' backend.
This only works with w3m.
.TP .TP
\fB\-\-gap\fR num \fB\-\-w3m\fR
Gap between image and text. source Shortcut to use 'w3m' backend.
.IP
NOTE: \fB\-\-gap\fR can take a negative value which will move the text closer to the left side.
.TP .TP
\fB\-\-clean\fR \fB\-\-off\fR
Delete cached files and thumbnails. Shortcut to use 'off' backend.
.IP
NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
.SS "ASCII:" .SS "ASCII:"
.TP .TP
\fB\-\-ascii\fR value
Where to get the ascii from, Possible values:
distro, \fI\,/path/to/ascii\/\fP
.TP
\fB\-\-ascii_colors\fR x x x x x x \fB\-\-ascii_colors\fR x x x x x x
Colors to print the ascii art Colors to print the ascii art
.TP .TP
...@@ -239,6 +228,42 @@ Whether or not to bold the ascii logo. ...@@ -239,6 +228,42 @@ Whether or not to bold the ascii logo.
.TP .TP
\fB\-L\fR, \fB\-\-logo\fR \fB\-L\fR, \fB\-\-logo\fR
Hide the info text and only show the ascii logo. Hide the info text and only show the ascii logo.
.IP
Possible values: bar, infobar, barinfo, off
.SS "IMAGE:"
.TP
\fB\-\-size\fR 00px | \fB\-\-size\fR 00%
How to size the image.
Possible values: auto, 00px, 00%, none
.TP
\fB\-\-crop_mode\fR mode
Which crop mode to use
Takes the values: normal, fit, fill
.TP
\fB\-\-crop_offset\fR value
Change the crop offset for normal mode.
Possible values: northwest, north, northeast,
west, center, east, southwest, south, southeast
.TP
\fB\-\-xoffset\fR px
How close the image will be to the left edge of the
window. This only works with w3m.
.TP
\fB\-\-yoffset\fR px
How close the image will be to the top edge of the
window. This only works with w3m.
.TP
\fB\-\-bg_color\fR color
Background color to display behind transparent image.
This only works with w3m.
.TP
\fB\-\-gap\fR num
Gap between image and text.
.IP
NOTE: \fB\-\-gap\fR can take a negative value which will move the text closer to the left side.
.TP
\fB\-\-clean\fR
Delete cached files and thumbnails.
.SS "SCREENSHOT:" .SS "SCREENSHOT:"
.TP .TP
\fB\-s\fR, \fB\-\-scrot\fR \fI\,/path/to/img\/\fP \fB\-s\fR, \fB\-\-scrot\fR \fI\,/path/to/img\/\fP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment