this program does the same thing as this: xrandr --props | awk '$2 ~ /connected/ {printf $1 ":";getline;getline;while($2 == ""){printf $1;getline;};printf "\n";}'