pointfichiers/de/i3/scripts/refresh-rate

16 lines
306 B
Text
Raw Normal View History

2023-09-28 10:52:20 +02:00
#!/usr/bin/env bash
refresh_rate=$(xrandr --screen 0 | grep "*" | cut -d "*" -f 1 | awk '{print $NF}' | cut -d "." -f 1)
if [ $button ]; then
if [ $refresh_rate == "60" ]; then
xrandr --screen 0 -r 165
echo "165Hz"
else
xrandr --screen 0 -r 60
echo "60Hz"
fi
else
echo "${refresh_rate}Hz"
fi