From 688bcd6e5534ff8ef08aa72b60092ba32d48fc25 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 12 Jul 2017 11:32:37 +1000 Subject: [PATCH] resolution [linux]: Add support for orientation. --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index aaa24717..283b5938 100755 --- a/neofetch +++ b/neofetch @@ -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//\*}"