Shellcheck: Fix SC2076
This commit is contained in:
parent
186b76933d
commit
ff5aaf342f
10
neofetch
10
neofetch
|
@ -44,7 +44,7 @@ get_distro() {
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "GNU")
|
"Linux" | "GNU")
|
||||||
if [[ "$(< /proc/version)" =~ "Microsoft" || "$(< /proc/sys/kernel/osrelease)" =~ "Microsoft" ]]; then
|
if [[ "$(< /proc/version)" == *"Microsoft"* || "$(< /proc/sys/kernel/osrelease)" == *"Microsoft"* ]]; then
|
||||||
case "$distro_shorthand" in
|
case "$distro_shorthand" in
|
||||||
"on") distro="$(lsb_release -sir) [Windows 10]" ;;
|
"on") distro="$(lsb_release -sir) [Windows 10]" ;;
|
||||||
"tiny") distro="Windows 10" ;;
|
"tiny") distro="Windows 10" ;;
|
||||||
|
@ -283,7 +283,7 @@ get_kernel() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Hardcode kernel settings in BSDs
|
# Hardcode kernel settings in BSDs
|
||||||
if [[ "$os" == "BSD" && "$distro" =~ "$kernel_name" ]]; then
|
if [[ "$os" == "BSD" && "$distro" == *"$kernel_name"* ]]; then
|
||||||
case "$distro_shorthand" in
|
case "$distro_shorthand" in
|
||||||
"on" | "tiny") kernel="$kernel_version" ;;
|
"on" | "tiny") kernel="$kernel_version" ;;
|
||||||
*) unset kernel ;;
|
*) unset kernel ;;
|
||||||
|
@ -965,7 +965,7 @@ get_gpu() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[[ "$gpu" =~ "intel" ]] && \
|
[[ "$gpu" == *"intel"* ]] && \
|
||||||
gpu="Intel Integrated Graphics"
|
gpu="Intel Integrated Graphics"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -1294,7 +1294,7 @@ get_resolution() {
|
||||||
scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)"
|
scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)"
|
||||||
|
|
||||||
# If no refresh rate is empty.
|
# If no refresh rate is empty.
|
||||||
[[ "$resolution" =~ "@ Hz" ]] && \
|
[[ "$resolution" == *"@ Hz"* ]] && \
|
||||||
resolution="${resolution//@ Hz}"
|
resolution="${resolution//@ Hz}"
|
||||||
|
|
||||||
(("${scale_factor%.*}" == 2)) && \
|
(("${scale_factor%.*}" == 2)) && \
|
||||||
|
@ -1305,7 +1305,7 @@ get_resolution() {
|
||||||
resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
|
resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ "$resolution" =~ "0Hz" ]] && \
|
[[ "$resolution" == *"0Hz"* ]] && \
|
||||||
resolution="${resolution// @ 0Hz}"
|
resolution="${resolution// @ 0Hz}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Reference in New Issue