Commit c8439c4b authored by Dylan Araps's avatar Dylan Araps

Fix xrandr output on systems not using gawk

parent 09e3dc51
...@@ -1518,8 +1518,8 @@ getresolution () { ...@@ -1518,8 +1518,8 @@ getresolution () {
"Linux" | "BSD") "Linux" | "BSD")
if type -p xrandr >/dev/null 2>&1; then if type -p xrandr >/dev/null 2>&1; then
case "$refresh_rate" in case "$refresh_rate" in
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]{2,3}.[0-9]{2}\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;; "on") resolution="$(xrandr --nograb --current | nawk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
"off") resolution="$(xrandr --nograb --current | awk '/*/ {printf $1 ", "}')" ;; "off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
esac esac
resolution="${resolution//\*}" resolution="${resolution//\*}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment