pointfichiers/bar/eww/scripts/refresh_rate

18 lines
393 B
Text
Raw Permalink Normal View History

2024-09-20 18:45:02 +02:00
#!/usr/bin/env dash
2024-01-25 14:39:08 +01:00
refresh_rate=$(hyprctl -j monitors | jq '.[0].refreshRate | round')
if [ "$1" = "toggle" ]; then
if [ "$refresh_rate" = "60" ]; then
hyprctl keyword monitor eDP-1,2560x1440@165,auto,1
refresh_rate=165
else
hyprctl keyword monitor eDP-1,2560x1440@60,auto,1
refresh_rate=60
fi
eww update refresh_rate="$refresh_rate"
else
echo "$refresh_rate"
fi