mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-03 16:51:29 +00:00
Compare commits
3 Commits
ae4e484d65
...
rewrites
Author | SHA1 | Date | |
---|---|---|---|
|
4217626cff | ||
|
ce91e2f39a | ||
|
cac22ec505 |
51
neofetch
51
neofetch
@@ -812,27 +812,26 @@ EOF
|
|||||||
# DETECT INFORMATION
|
# DETECT INFORMATION
|
||||||
|
|
||||||
get_os() {
|
get_os() {
|
||||||
# $kernel_name is set in a function called cache_uname and is
|
# $kernel_name is the output of 'uname -s'.
|
||||||
# just the output of "uname -s".
|
case $kernel_name in
|
||||||
case "$kernel_name" in
|
Darwin): "$darwin_name" ;;
|
||||||
"Darwin"): "$darwin_name" ;;
|
SunOS): Solaris ;;
|
||||||
"SunOS"): "Solaris" ;;
|
Haiku): Haiku ;;
|
||||||
"Haiku"): "Haiku" ;;
|
MINIX): MINIX ;;
|
||||||
"MINIX"): "MINIX" ;;
|
AIX): AIX ;;
|
||||||
"AIX"): "AIX" ;;
|
IRIX*): IRIX ;;
|
||||||
"IRIX"*): "IRIX" ;;
|
FreeMiNT): FreeMiNT ;;
|
||||||
"FreeMiNT"): "FreeMiNT" ;;
|
|
||||||
|
|
||||||
"Linux" | "GNU"*)
|
Linux|GNU*)
|
||||||
: "Linux"
|
: Linux
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"BSD" | "DragonFly" | "Bitrig")
|
*BSD|DragonFly|Bitrig)
|
||||||
: "BSD"
|
: BSD
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"CYGWIN"* | "MSYS"* | "MINGW"*)
|
CYGWIN*|MSYS*|MINGW*)
|
||||||
: "Windows"
|
: Windows
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
@@ -841,6 +840,7 @@ get_os() {
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
os="$_"
|
os="$_"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8815,10 +8815,9 @@ EOF
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Overwrite distro colors if '$ascii_colors' doesn't
|
# Overwrite distro colors if '$ascii_colors' doesn't equal 'distro'.
|
||||||
# equal 'distro'.
|
if [[ ${ascii_colors[0]} != distro ]]; then
|
||||||
if [[ "${ascii_colors[0]}" != "distro" ]]; then
|
color_text=off
|
||||||
color_text="off"
|
|
||||||
set_colors "${ascii_colors[@]}"
|
set_colors "${ascii_colors[@]}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -8832,14 +8831,14 @@ main() {
|
|||||||
|
|
||||||
get_args "$@"
|
get_args "$@"
|
||||||
get_simple "$@"
|
get_simple "$@"
|
||||||
[[ "$verbose" != "on" ]] && exec 2>/dev/null
|
[[ $verbose != on ]] && exec 2>/dev/null
|
||||||
get_distro
|
get_distro
|
||||||
get_bold
|
get_bold
|
||||||
get_distro_ascii
|
get_distro_ascii
|
||||||
[[ "$stdout" == "on" ]] && stdout
|
[[ $stdout == on ]] && stdout
|
||||||
|
|
||||||
# Minix doesn't support these sequences.
|
# 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.
|
# If the script exits for any reason, unhide the cursor.
|
||||||
trap 'printf "\e[?25h\e[?7h"' EXIT
|
trap 'printf "\e[?25h\e[?7h"' EXIT
|
||||||
|
|
||||||
@@ -8855,17 +8854,17 @@ main() {
|
|||||||
|
|
||||||
# w3m-img: Draw the image a second time to fix
|
# w3m-img: Draw the image a second time to fix
|
||||||
# rendering issues in specific terminal emulators.
|
# rendering issues in specific terminal emulators.
|
||||||
[[ "$image_backend" == *w3m* ]] && display_image
|
[[ $image_backend == *w3m* ]] && display_image
|
||||||
|
|
||||||
# Add neofetch info to verbose output.
|
# Add neofetch info to verbose output.
|
||||||
err "Neofetch command: $0 $*"
|
err "Neofetch command: $0 $*"
|
||||||
err "Neofetch version: $version"
|
err "Neofetch version: $version"
|
||||||
|
|
||||||
# Show error messages.
|
# Show error messages.
|
||||||
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
|
[[ $verbose == on ]] && printf '%b' "$err" >&2
|
||||||
|
|
||||||
# If `--loop` was used, constantly redraw the image.
|
# 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
|
return 0
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user