resolution: Fix output when monitor is turned off.

This commit is contained in:
Dylan Araps 2020-07-06 23:54:25 +03:00
parent f4a83d604f
commit 0e448167c0
No known key found for this signature in database
GPG key ID: 46D62DD9F1DE636E

View file

@ -2905,7 +2905,7 @@ get_resolution() {
"off")
resolution="$(xrandr --nograb --current |\
awk -F 'connected |\\+|\\(' \
'/ connected/ && $2 {printf $2 ", "}')"
'/ connected.*[0-9]+x[0-9]+\+/ && $2 {printf $2 ", "}')"
resolution="${resolution/primary, }"
resolution="${resolution/primary }"