Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
4217626cff | ||
|
ce91e2f39a | ||
|
cac22ec505 |
1 changed files with 25 additions and 26 deletions
51
neofetch
51
neofetch
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue