Resolution: don't display disabled resolutions
This commit is contained in:
parent
ccd5d9f526
commit
326f9d652d
1 changed files with 3 additions and 2 deletions
5
neofetch
5
neofetch
|
@ -3107,9 +3107,10 @@ get_resolution() {
|
||||||
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
||||||
|
|
||||||
elif [[ -d /sys/class/drm ]]; then
|
elif [[ -d /sys/class/drm ]]; then
|
||||||
for dev in /sys/class/drm/*/modes; do
|
for dev in /sys/class/drm/*; do
|
||||||
read -r single_resolution _ < "$dev"
|
[[ $(<"$dev/enabled") != "enabled" ]] && continue
|
||||||
|
|
||||||
|
read -r single_resolution _ < "$dev/modes"
|
||||||
[[ $single_resolution ]] && resolution="${single_resolution}, ${resolution}"
|
[[ $single_resolution ]] && resolution="${single_resolution}, ${resolution}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue