aboutsummaryrefslogtreecommitdiff
path: root/docs/wiki/Configuration:-Outputs.md
diff options
context:
space:
mode:
authorMerlijn <32853531+ToxicMushroom@users.noreply.github.com>2025-10-29 07:10:38 +0100
committerGitHub <noreply@github.com>2025-10-29 09:10:38 +0300
commit6a2c6261df130cccb5262eddf71d40b2fffcf8f9 (patch)
tree48639aef4ebddbc315234b925954c5cc768d0f1c /docs/wiki/Configuration:-Outputs.md
parente6f3c538da0c646bda43fcde7ef7dc3b771e0c8b (diff)
downloadniri-6a2c6261df130cccb5262eddf71d40b2fffcf8f9.tar.gz
niri-6a2c6261df130cccb5262eddf71d40b2fffcf8f9.tar.bz2
niri-6a2c6261df130cccb5262eddf71d40b2fffcf8f9.zip
Add support for custom modes and modelines. (#2479)
* Implement custom modes and modelines Co-authored-by: ToxicMushroom <32853531+ToxicMushroom@users.noreply.github.com> * fixes * refactor mode and modeline kdl parsers. * add IPC parse checks * refactor: address feedback * fix: add missing > 0 refresh rate check * move things around * fixes * wiki fixes --------- Co-authored-by: Christian Meissl <meissl.christian@gmail.com> Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'docs/wiki/Configuration:-Outputs.md')
-rw-r--r--docs/wiki/Configuration:-Outputs.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/wiki/Configuration:-Outputs.md b/docs/wiki/Configuration:-Outputs.md
index b2b394bd..ecdee105 100644
--- a/docs/wiki/Configuration:-Outputs.md
+++ b/docs/wiki/Configuration:-Outputs.md
@@ -27,6 +27,10 @@ output "eDP-1" {
layout {
// ...layout settings for eDP-1...
}
+
+ // Custom modes. Caution: may damage your display.
+ // mode custom=true "1920x1080@100"
+ // modeline 173.00 1920 2048 2248 2576 1080 1083 1088 1120 "-hsync" "+vsync"
}
output "HDMI-A-1" {
@@ -86,6 +90,42 @@ output "eDP-1" {
}
```
+#### `mode custom=true`
+
+<sup>Since: next release</sup>
+
+You can configure a custom mode (not offered by the monitor) by setting `custom=true`.
+In this case, the refresh rate is mandatory.
+
+> [!CAUTION]
+> Custom modes may damage your monitor, especially if it's a CRT.
+> Follow the maximum supported limits in your monitor's instructions.
+
+```kdl
+// Use a custom mode for this display.
+output "HDMI-A-1" {
+ mode custom=true "2560x1440@143.912"
+}
+```
+
+### `modeline`
+
+<sup>Since: next release</sup>
+
+Directly configures the monitor's mode via a modeline, overriding any configured `mode`.
+The modeline can be calculated via utilities such as [cvt](https://man.archlinux.org/man/cvt.1.en) or [gtf](https://man.archlinux.org/man/gtf.1.en).
+
+> [!CAUTION]
+> Out of spec modelines may damage your monitor, especially if it's a CRT.
+> Follow the maximum supported limits in your monitor's instructions.
+
+```kdl
+// Use a modeline for this display.
+output "eDP-3" {
+ modeline 173.00 1920 2048 2248 2576 1080 1083 1088 1120 "-hsync" "+vsync"
+}
+```
+
### `scale`
Set the scale of the monitor.