added xrandr without refresh rate
This commit is contained in:
parent
c5f22dacb3
commit
0d64fac031
7
neofetch
7
neofetch
|
@ -1273,8 +1273,11 @@ getsong () {
|
||||||
getresolution () {
|
getresolution () {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | *"BSD")
|
"Linux" | *"BSD")
|
||||||
if type -p xrandr >/dev/null 2>&1 && [ "$refresh_rate" == "on" ]; then
|
if type -p xrandr >/dev/null 2>&1; then
|
||||||
resolution=$(xrandr --nograb --current | awk 'match($0,/[0-0]{2,3}.[0-9]{2}\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')
|
case "$refresh_rate" in
|
||||||
|
"on") resolution=$(xrandr --nograb --current | awk 'match($0,/[0-0]{2,3}.[0-9]{2}\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}') ;;
|
||||||
|
"off") resolution=$(xrandr --nograb --current | awk '/*/ {printf $1 ", "}') ;;
|
||||||
|
esac
|
||||||
resolution=${resolution//\*}
|
resolution=${resolution//\*}
|
||||||
|
|
||||||
elif type -p xdpyinfo >/dev/null 2>&1 && \
|
elif type -p xdpyinfo >/dev/null 2>&1 && \
|
||||||
|
|
Reference in New Issue