Compare commits

...

13 Commits
5.1.0 ... 6.0.0

Author SHA1 Message Date
Dylan Araps
c9d6ef5c40 version: bump 2019-01-08 18:32:04 +02:00
Dylan Araps
c6bd0461a0 image: Added support for Chafa. 2019-01-08 18:23:38 +02:00
Dylan Araps
c1da5eb09a ascii: Fixed void linux ascii bug 2019-01-08 18:00:54 +02:00
Dylan Araps
12d9f93750 ascii: Fixed debian linux ascii bug 2019-01-08 17:55:22 +02:00
Dylan Araps
32a44b4d62 ascii: Fixed gobo linux ascii bug 2019-01-08 17:54:42 +02:00
Dylan Araps
e2e98a6c7c general: Fixed bug with line_break alternative. Closes #1157 2019-01-08 17:36:27 +02:00
Dylan Araps
c76c122650 image: Added support for Chafa. 2019-01-08 17:27:23 +02:00
Dylan Araps
eaa59da1e9 ascii: Fix bedrock colors. Closes #1156 2019-01-08 17:13:32 +02:00
Dylan Araps
056a99bfa2 resolution: If resolution is empty don't print it. 2019-01-08 16:26:28 +02:00
Dylan Araps
074323f0ed version: bump 2019-01-08 16:14:24 +02:00
Dylan Araps
f24fed6df3 version: bump 2019-01-08 15:53:08 +02:00
Dylan Araps
86372fe6a8 distro: Remove broken distro lines 2019-01-08 15:52:12 +02:00
Dylan Araps
4f89361e50 color_blocks: Fix cursor bug 2019-01-08 15:34:08 +02:00
2 changed files with 32 additions and 27 deletions

View File

@@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
version="5.0.1" version="6.0.0"
bash_version="${BASH_VERSION/.*}" bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}" sys_locale="${LANG:-C}"
@@ -669,7 +669,8 @@ disk_display="off"
# Image backend. # Image backend.
# #
# Default: 'ascii' # 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 # Flag: --backend
image_backend="ascii" image_backend="ascii"
@@ -924,11 +925,6 @@ get_distro() {
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;; "tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;; "off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
esac esac
# Workarounds for distros that go against the os-release standard.
[[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}')" "${files[@]}"
[[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}')" "${files[@]}"
else else
for release_file in /etc/*-release; do for release_file in /etc/*-release; do
distro+="$(< "$release_file")" distro+="$(< "$release_file")"
@@ -2622,6 +2618,7 @@ get_resolution() {
esac esac
resolution="${resolution%,*}" resolution="${resolution%,*}"
[[ -z ${resolution/x} ]] && resolution=
} }
get_style() { get_style() {
@@ -3391,9 +3388,9 @@ get_cols() {
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}" cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
# Add block height to info height. # Add block height to info height.
((info_height+=block_height+1)) ((info_height+=block_range[1]>7?block_height+3:block_height+2))
printf '\n\e[%bC%b\n' "$text_padding" "${zws}${cols}" printf '\n\e[%bC%b\n\n' "$text_padding" "${zws}${cols}"
fi fi
unset -v blocks blocks2 cols unset -v blocks blocks2 cols
@@ -3416,7 +3413,7 @@ image_backend() {
"ascii") get_ascii ;; "ascii") get_ascii ;;
"off") image_backend="off" ;; "off") image_backend="off" ;;
"caca" | "jp2a" | "iterm2" | "termpix" |\ "caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty") "tycat" | "w3m" | "sixel" | "pixterm" | "kitty")
get_image_source get_image_source
@@ -3441,7 +3438,7 @@ image_backend() {
*) *)
err "Image: Unknown image backend specified '$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')" 'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
err "Image: Falling back to ascii mode." err "Image: Falling back to ascii mode."
get_ascii get_ascii
@@ -3811,12 +3808,16 @@ display_image() {
case "$image_backend" in case "$image_backend" in
"caca") "caca")
img2txt \ img2txt \
-W "$((width / font_width)))" \ -W "$((width / font_width))" \
-H "$((height / font_height))" \ -H "$((height / font_height))" \
--gamma=0.6 \ --gamma=0.6 \
"$image" "$image"
;; ;;
"chafa")
chafa --size="$((width / font_width))x$((height / font_height))" "$image"
;;
"jp2a") "jp2a")
jp2a \ jp2a \
--colors \ --colors \
@@ -3952,7 +3953,7 @@ prin() {
string="${subtitle_color}${bold}${string}" string="${subtitle_color}${bold}${string}"
# Print the info. # Print the info.
printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string}${reset} " printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string//\\n}${reset} "
# Calculate info height. # Calculate info height.
((++info_height)) ((++info_height))
@@ -4423,8 +4424,8 @@ BARS:
IMAGE BACKEND: IMAGE BACKEND:
--backend backend Which image backend to use. --backend backend Which image backend to use.
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
'sixel', 'tycat', 'w3m' 'off', 'sixel', 'tycat', 'w3m'
--source source Which image or ascii file to use. --source source Which image or ascii file to use.
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
'/path/to/ascii', '/path/to/dir/', 'command output' [ascii] '/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
@@ -4434,6 +4435,7 @@ IMAGE BACKEND:
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\" NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
--caca source Shortcut to use 'caca' backend. --caca source Shortcut to use 'caca' backend.
--chafa source Shortcut to use 'chafa' backend.
--iterm2 source Shortcut to use 'iterm2' backend. --iterm2 source Shortcut to use 'iterm2' backend.
--jp2a source Shortcut to use 'jp2a' backend. --jp2a source Shortcut to use 'jp2a' backend.
--kitty source Shortcut to use 'kitty' backend. --kitty source Shortcut to use 'kitty' backend.
@@ -4618,7 +4620,7 @@ get_args() {
# Image backend # Image backend
"--backend") image_backend="$2" ;; "--backend") image_backend="$2" ;;
"--source") image_source="$2" ;; "--source") image_source="$2" ;;
"--ascii" | "--caca" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\ "--ascii" | "--caca" | "--chafa" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
"--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty") "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
image_backend="${1/--}" image_backend="${1/--}"
case "$2" in case "$2" in
@@ -5279,7 +5281,7 @@ EOF
;; ;;
"Bedrock"*) "Bedrock"*)
set_colors 0 7 set_colors 8 7
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
${c1}-------------------------------------- ${c1}--------------------------------------
-------------------------------------- --------------------------------------
@@ -8520,12 +8522,12 @@ EOF
set_colors 2 8 set_colors 2 8
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
${c1} _______ ${c1} _______
_ \______ - _ \\______ -
| \ ___ \ | | \\ ___ \\ |
| | / \ | | | | / \ | |
| | \___/ | | | | \___/ | |
| \______ \_| | \\______ \\_|
-_______\ -_______\\
EOF EOF
;; ;;

View File

@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH NEOFETCH "1" "January 2019" "Neofetch 5.0.1" "User Commands" .TH NEOFETCH "1" "January 2019" "Neofetch 6.0.0" "User Commands"
.SH NAME .SH NAME
Neofetch \- A fast, highly customizable system info script Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS .SH SYNOPSIS
@@ -217,8 +217,8 @@ Possible values: bar, infobar, barinfo, off
.TP .TP
\fB\-\-backend\fR backend \fB\-\-backend\fR backend
Which image backend to use. Which image backend to use.
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
\&'sixel', 'tycat', 'w3m' \&'off', 'sixel', 'tycat', 'w3m'
.TP .TP
\fB\-\-source\fR source \fB\-\-source\fR source
Which image or ascii file to use. 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 \fB\-\-caca\fR source
Shortcut to use 'caca' backend. Shortcut to use 'caca' backend.
.TP .TP
\fB\-\-chafa\fR source
Shortcut to use 'chafa' backend.
.TP
\fB\-\-iterm2\fR source \fB\-\-iterm2\fR source
Shortcut to use 'iterm2' backend. Shortcut to use 'iterm2' backend.
.TP .TP