mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 20:12:31 +00:00
made OS X resolution block smaller
This commit is contained in:
12
neofetch
12
neofetch
@@ -1256,20 +1256,14 @@ getresolution () {
|
||||
if type -p screenresolution >/dev/null 2>&1; then
|
||||
resolution=$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')
|
||||
resolution=${resolution//x??@/ @ }
|
||||
[[ "$refresh_rate" == "off" ]] && resolution=${resolution// @ +([0-9])Hz}
|
||||
|
||||
else
|
||||
case "$refresh_rate" in
|
||||
"on")
|
||||
resolution=$(system_profiler SPDisplaysDataType |\
|
||||
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')
|
||||
;;
|
||||
"off")
|
||||
resolution=$(system_profiler SPDisplaysDataType |\
|
||||
awk '/Resolution:/ {printf $2"x"$4", "}')
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
[[ "$refresh_rate" == "off" ]] && \
|
||||
resolution=${resolution// @ +([0-9])Hz}
|
||||
;;
|
||||
|
||||
"Windows")
|
||||
|
||||
Reference in New Issue
Block a user