pointfichiers/bar/eww/scripts/refresh_rate

16 lines
384 B
Bash
Executable file

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