neofetch: Fix windows issue. Closes #1297
This commit is contained in:
parent
bf0eef3f07
commit
8f03e7082f
6
neofetch
6
neofetch
|
@ -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%,}
|
||||||
|
|
Reference in New Issue