added check for whether user wants refresh rate for linux
This commit is contained in:
parent
b971e214e6
commit
c5f22dacb3
|
@ -89,7 +89,7 @@ your distro's logo or any ascii art of your choice!
|
||||||
|
|
||||||
- Wallpaper: `feh`, `nitrogen` or `gsettings`
|
- Wallpaper: `feh`, `nitrogen` or `gsettings`
|
||||||
- Current Song: `mpc` or `cmus`
|
- Current Song: `mpc` or `cmus`
|
||||||
- Resolution: `xorg-xdpyinfo` or `xrandr`
|
- Resolution: `xorg-xdpyinfo`
|
||||||
- Screenshot: `scrot` \[5\]
|
- Screenshot: `scrot` \[5\]
|
||||||
|
|
||||||
|
|
||||||
|
|
2
neofetch
2
neofetch
|
@ -1273,7 +1273,7 @@ getsong () {
|
||||||
getresolution () {
|
getresolution () {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | *"BSD")
|
"Linux" | *"BSD")
|
||||||
if type -p xrandr >/dev/null 2>&1; then
|
if type -p xrandr >/dev/null 2>&1 && [ "$refresh_rate" == "on" ]; then
|
||||||
resolution=$(xrandr --nograb --current | awk 'match($0,/[0-0]{2,3}.[0-9]{2}\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')
|
resolution=$(xrandr --nograb --current | awk 'match($0,/[0-0]{2,3}.[0-9]{2}\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')
|
||||||
resolution=${resolution//\*}
|
resolution=${resolution//\*}
|
||||||
|
|
||||||
|
|
Reference in New Issue