Swayscript : Vrr also toggles refresh rates.

This commit is contained in:
Dmitry Voronin 2024-06-14 05:13:07 +03:00
parent 3f79c50d24
commit 656b170f28
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -1,3 +1,4 @@
# TODO: Add different modes for different screens.
{ ... }: {
text = ''
export _swayvrrlist=(
@ -9,6 +10,7 @@
on() {
for vrr in ''${_swayvrrlist[@]}; do
swaymsg "output \"''${vrr}\" adaptive_sync on"
swaymsg "output \"''${vrr}\" mode 3440x1440@164.999Hz"
done
_vrrstate on
}
@ -20,6 +22,7 @@
off() {
for vrr in ''${_swayvrrlist[@]}; do
swaymsg "output \"''${vrr}\" adaptive_sync off"
swaymsg "output \"''${vrr}\" mode 3440x1440@59.973Hz"
done
_vrrstate off
}