mirror of
https://github.com/dylanaraps/neofetch.git
synced 2026-01-05 14:49:04 +00:00
better way that works in multi monitor setups
This commit is contained in:
14
neofetch
14
neofetch
@@ -1538,15 +1538,13 @@ getresolution () {
|
|||||||
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
|
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$refresh_rate" == "off" ] || [ "${resolution// * @ }" == "0Hz" ]; then
|
if [ "$refresh_rate" == "off" ]; then
|
||||||
IFS=","
|
resolution="${resolution// @ [0-9][0-9]Hz}"
|
||||||
for res in $resolution; do
|
resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
|
||||||
res="${res// @ *[0-9]Hz}"
|
|
||||||
newres="$newres, $res"
|
|
||||||
done
|
|
||||||
unset IFS
|
|
||||||
resolution="${newres:2}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[[ "$resolution" =~ "0Hz" ]] && \
|
||||||
|
resolution="${resolution// @ 0Hz}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
|
|||||||
Reference in New Issue
Block a user