From 4cf43fecc00f45e6edf8c149f2e277f58725af50 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 25 Mar 2016 22:20:19 +1100 Subject: [PATCH] Don't print resolution if detection fails --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 7704c94e..1d7a049c 100755 --- a/neofetch +++ b/neofetch @@ -1290,7 +1290,8 @@ getresolution () { height=${height/ScreenHeight'='/} height=${height//[[:space:]]} - resolution="${width}x${height}" + [ ! -z "$width" ] && \ + resolution="${width}x${height}" ;; "*")