grepping adapted to xrandr 1.4.0