resolution: Fix broken output. Closes #803

This commit is contained in:
Dylan Araps 2017-08-13 20:01:20 +10:00
parent b757e32c91
commit c108713b91

View file

@ -1577,7 +1577,8 @@ get_resolution() {
"off")
resolution="$(xrandr --nograb --current |\
awk -F 'connected |\\+' '/ connected/ {printf $2 ", "}')"
awk -F 'connected |\\+|\\(' \
'/ connected/ && $2 {printf $2 ", "}')"
resolution="${resolution/primary }"
;;
esac