Compare commits

...

3 commits

Author SHA1 Message Date
Dylan Araps
4217626cff docs: update 2019-03-04 10:26:08 +02:00
Dylan Araps
ce91e2f39a docs: update 2019-03-04 10:21:39 +02:00
Dylan Araps
cac22ec505 general: Starting cutting script down in size. 2019-03-04 10:16:52 +02:00

View file

@ -812,27 +812,26 @@ EOF
# DETECT INFORMATION
get_os() {
# $kernel_name is set in a function called cache_uname and is
# just the output of "uname -s".
case "$kernel_name" in
"Darwin"): "$darwin_name" ;;
"SunOS"): "Solaris" ;;
"Haiku"): "Haiku" ;;
"MINIX"): "MINIX" ;;
"AIX"): "AIX" ;;
"IRIX"*): "IRIX" ;;
"FreeMiNT"): "FreeMiNT" ;;
# $kernel_name is the output of 'uname -s'.
case $kernel_name in
Darwin): "$darwin_name" ;;
SunOS): Solaris ;;
Haiku): Haiku ;;
MINIX): MINIX ;;
AIX): AIX ;;
IRIX*): IRIX ;;
FreeMiNT): FreeMiNT ;;
"Linux" | "GNU"*)
: "Linux"
Linux|GNU*)
: Linux
;;
*"BSD" | "DragonFly" | "Bitrig")
: "BSD"
*BSD|DragonFly|Bitrig)
: BSD
;;
"CYGWIN"* | "MSYS"* | "MINGW"*)
: "Windows"
CYGWIN*|MSYS*|MINGW*)
: Windows
;;
*)
@ -841,6 +840,7 @@ get_os() {
exit 1
;;
esac
os="$_"
}
@ -8815,10 +8815,9 @@ EOF
;;
esac
# Overwrite distro colors if '$ascii_colors' doesn't
# equal 'distro'.
if [[ "${ascii_colors[0]}" != "distro" ]]; then
color_text="off"
# Overwrite distro colors if '$ascii_colors' doesn't equal 'distro'.
if [[ ${ascii_colors[0]} != distro ]]; then
color_text=off
set_colors "${ascii_colors[@]}"
fi
}
@ -8832,14 +8831,14 @@ main() {
get_args "$@"
get_simple "$@"
[[ "$verbose" != "on" ]] && exec 2>/dev/null
[[ $verbose != on ]] && exec 2>/dev/null
get_distro
get_bold
get_distro_ascii
[[ "$stdout" == "on" ]] && stdout
[[ $stdout == on ]] && stdout
# Minix doesn't support these sequences.
if [[ "$TERM" != "minix" && "$stdout" != "on" ]]; then
if [[ $TERM != minix && $stdout != on ]]; then
# If the script exits for any reason, unhide the cursor.
trap 'printf "\e[?25h\e[?7h"' EXIT
@ -8855,17 +8854,17 @@ main() {
# w3m-img: Draw the image a second time to fix
# rendering issues in specific terminal emulators.
[[ "$image_backend" == *w3m* ]] && display_image
[[ $image_backend == *w3m* ]] && display_image
# Add neofetch info to verbose output.
err "Neofetch command: $0 $*"
err "Neofetch version: $version"
# Show error messages.
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
[[ $verbose == on ]] && printf '%b' "$err" >&2
# If `--loop` was used, constantly redraw the image.
while [[ "$image_loop" == "on" && "$image_backend" == "w3m" ]]; do display_image; sleep 1; done
while [[ $image_loop == on && $image_backend == w3m ]]; do display_image; sleep 1; done
return 0
}