neofetch: Fix windows issue. Closes #1297

parent bf0eef3f
...@@ -2789,12 +2789,12 @@ get_resolution() { ...@@ -2789,12 +2789,12 @@ get_resolution() {
IFS=$'\n' read -d "" -ra sh \ IFS=$'\n' read -d "" -ra sh \
<<< "$(wmic path Win32_VideoController get CurrentVerticalResolution)" <<< "$(wmic path Win32_VideoController get CurrentVerticalResolution)"
sw=("${sw[@]//*CurrentHorizontalResolution*}") sw=("${sw[@]//CurrentHorizontalResolution}")
sh=("${sh[@]//*CurrentVerticalResolution*}") sh=("${sh[@]//CurrentVerticalResolution}")
for ((mn = 0; mn < ${#sw[@]}; mn++)) { for ((mn = 0; mn < ${#sw[@]}; mn++)) {
[[ ${sw[mn]//[[:space:]]} && ${sh[mn]//[[:space:]]} ]] && [[ ${sw[mn]//[[:space:]]} && ${sh[mn]//[[:space:]]} ]] &&
resolution+=${sw[mn]//[[:space:]]}x${sh[mn]//[[:space:]]}, resolution+="${sw[mn]//[[:space:]]}x${sh[mn]//[[:space:]]}, "
} }
resolution=${resolution%,} resolution=${resolution%,}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment