Resolution: Fix awk error when not using GNU awk

Fixes #781
This commit is contained in:
Muhammad Herdiansyah 2017-07-19 23:13:07 +07:00
parent 1dee216fb5
commit 8aeb0e4fb1
1 changed files with 1 additions and 1 deletions

View File

@ -1495,7 +1495,7 @@ get_resolution() {
case "$refresh_rate" in
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
"off")
resolution="$(xrandr --nograb --current | awk -F 'connected |+' '/ connected/ {printf $2 ", "}')"
resolution="$(xrandr --nograb --current | awk -F 'connected |\\+' '/ connected/ {printf $2 ", "}')"
resolution="${resolution/primary }"
;;
esac