diff options
| author | Michael Yang <admin@my4ng.dev> | 2024-08-22 18:58:07 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-22 11:58:07 +0300 |
| commit | f1894f6f9a7470b8b1493cf96b28a48e8a704636 (patch) | |
| tree | d70a3ab350d39dea1b8240e2a92b281b01be5d12 /wiki | |
| parent | dfc2d452c55d59d6d9014c98a9da3a082c4f7379 (diff) | |
| download | niri-f1894f6f9a7470b8b1493cf96b28a48e8a704636.tar.gz niri-f1894f6f9a7470b8b1493cf96b28a48e8a704636.tar.bz2 niri-f1894f6f9a7470b8b1493cf96b28a48e8a704636.zip | |
feature: add on-demand vrr (#586)
* feature: add on-demand vrr
* Don't require connector::Info in try_to_set_vrr
* Improve VRR help message
* Rename connector_handle => connector
* Fix tracy span name
* Move on demand vrr flag set higher
* wiki: Mention on-demand VRR
---------
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'wiki')
| -rw-r--r-- | wiki/Configuration:-Outputs.md | 11 | ||||
| -rw-r--r-- | wiki/Configuration:-Window-Rules.md | 21 |
2 files changed, 31 insertions, 1 deletions
diff --git a/wiki/Configuration:-Outputs.md b/wiki/Configuration:-Outputs.md index eef06fef..f7b3adf8 100644 --- a/wiki/Configuration:-Outputs.md +++ b/wiki/Configuration:-Outputs.md @@ -12,7 +12,7 @@ output "eDP-1" { scale 2.0 transform "90" position x=1280 y=0 - variable-refresh-rate + variable-refresh-rate // on-demand=true background-color "#003300" } @@ -147,6 +147,15 @@ output "HDMI-A-1" { } ``` +<sup>Since: 0.1.9</sup> You can also set the `on-demand=true` property, which will only enable VRR when this output shows a window matching the `variable-refresh-rate` window rule. +This is helpful to avoid various issues with VRR, since it can be disabled most of the time, and only enabled for specific windows, like games or video players. + +```kdl +output "HDMI-A-1" { + variable-refresh-rate on-demand=true +} +``` + ### `background-color` <sup>Since: 0.1.8</sup> diff --git a/wiki/Configuration:-Window-Rules.md b/wiki/Configuration:-Window-Rules.md index 3daceb15..b13b4661 100644 --- a/wiki/Configuration:-Window-Rules.md +++ b/wiki/Configuration:-Window-Rules.md @@ -47,6 +47,7 @@ window-rule { opacity 0.5 block-out-from "screencast" // block-out-from "screen-capture" + variable-refresh-rate true focus-ring { // off @@ -391,6 +392,26 @@ window-rule { } ``` +#### `variable-refresh-rate` + +<sup>Since: 0.1.9</sup> + +If set to true, whenever this window displays on an output with on-demand VRR, it will enable VRR on that output. + +```kdl +// Configure some output with on-demand VRR. +output "HDMI-A-1" { + variable-refresh-rate on-demand=true +} + +// Enable on-demand VRR when mpv displays on the output. +window-rule { + match app-id="^mpv$" + + variable-refresh-rate true +} +``` + #### `draw-border-with-background` Override whether the border and the focus ring draw with a background. |
