From 21103d9ada918047b250caf3a7f40c0754f45c03 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 3 Jun 2018 16:02:16 +1000 Subject: [PATCH] resolution: Added xwininfo support. --- neofetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 01e356f7..8058e89a 100755 --- a/neofetch +++ b/neofetch @@ -2520,6 +2520,11 @@ get_resolution() { esac resolution="${resolution//\*}" + elif type -p xwininfo >/dev/null; then + read -r w h \ + < <(xwininfo -root | awk -F':' '/Width|Height/ {printf $2}') + resolution="${w}x${h}" + elif type -p xdpyinfo >/dev/null; then resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')" fi @@ -3687,7 +3692,7 @@ make_thumbnail() { ;; *) - time convert \ + convert \ -background none \ "$image" \ -strip \