Resolution: [Windows] Locally set height and width vars
This commit is contained in:
parent
94c775aade
commit
500fd6c562
10
neofetch
10
neofetch
|
@ -1389,13 +1389,13 @@ get_resolution() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
width="$(wmic path Win32_VideoController get CurrentHorizontalResolution)"
|
local width="$(wmic path Win32_VideoController get CurrentHorizontalResolution)"
|
||||||
width="${width//CurrentHorizontalResolution/}"
|
local width="${width//CurrentHorizontalResolution/}"
|
||||||
|
|
||||||
height="$(wmic path Win32_VideoController get CurrentVerticalResolution)"
|
local height="$(wmic path Win32_VideoController get CurrentVerticalResolution)"
|
||||||
height="${height//CurrentVerticalResolution/}"
|
local height="${height//CurrentVerticalResolution/}"
|
||||||
|
|
||||||
[[ "$(trim "$width")" ]] && resolution="${width// }x${height// }"
|
[[ "$(trim "$width")" ]] && resolution="${width//[[:space:]]}x${height//[[:space:]]}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Haiku")
|
"Haiku")
|
||||||
|
|
Reference in New Issue