pointfichiers/bar/eww/scripts/refresh_rate
2024-09-20 18:45:02 +02:00

17 lines
393 B
Bash
Executable file

#!/usr/bin/env dash
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