Commit 688bcd6e authored by Dylan Araps's avatar Dylan Araps

resolution [linux]: Add support for orientation.

parent e9f49165
......@@ -1497,7 +1497,10 @@ get_resolution() {
if type -p xrandr >/dev/null; then
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 '/\*/ {printf $1 ", "}')" ;;
"off")
resolution="$(xrandr --nograb --current | awk -F 'connected |+' '/ connected/ {printf $2 ", "}')"
resolution="${resolution/primary }"
;;
esac
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