From 474e0b4ff205ef3ed7c646f77c97323a9cf974cd Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 25 Nov 2016 13:43:35 +1100 Subject: [PATCH] Resolution: [MacOS] If refresh rate is empty don't append Hz --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 0209e133..073c40b6 100755 --- a/neofetch +++ b/neofetch @@ -1262,6 +1262,10 @@ get_resolution() { scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)" + # If no refresh rate is empty. + [[ "$resolution" =~ "@ Hz" ]] && \ + resolution="${resolution//@ Hz}" + (("${scale_factor%.*}" == 2)) && \ resolution="${resolution// @/@2x @}"