neofetch: Fix windows issue. Closes #1297

This commit is contained in:
Dylan Araps 2020-01-23 19:30:51 +02:00
parent bf0eef3f07
commit 8f03e7082f
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 3 additions and 3 deletions

View File

@ -2789,12 +2789,12 @@ get_resolution() {
IFS=$'\n' read -d "" -ra sh \
<<< "$(wmic path Win32_VideoController get CurrentVerticalResolution)"
sw=("${sw[@]//*CurrentHorizontalResolution*}")
sh=("${sh[@]//*CurrentVerticalResolution*}")
sw=("${sw[@]//CurrentHorizontalResolution}")
sh=("${sh[@]//CurrentVerticalResolution}")
for ((mn = 0; mn < ${#sw[@]}; mn++)) {
[[ ${sw[mn]//[[:space:]]} && ${sh[mn]//[[:space:]]} ]] &&
resolution+=${sw[mn]//[[:space:]]}x${sh[mn]//[[:space:]]},
resolution+="${sw[mn]//[[:space:]]}x${sh[mn]//[[:space:]]}, "
}
resolution=${resolution%,}