2024-02-20 21:16:07 +01:00
|
|
|
---
|
|
|
|
weight: 4
|
|
|
|
title: Monitors
|
|
|
|
---
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## General
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
The general config of a monitor looks like this
|
2022-10-23 16:35:39 +02:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-11-23 15:38:14 +01:00
|
|
|
monitor=name,resolution,position,scale
|
2022-09-24 15:32:40 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
A common example:
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
monitor=DP-1,1920x1080@144,0x0,1
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
will tell Hyprland to make the monitor on `DP-1` a `1920x1080` display, at
|
|
|
|
144Hz, `0x0` off from the top left corner, with a scale of 1 (unscaled).
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2023-11-17 17:01:27 +01:00
|
|
|
To list all available monitors (active and inactive):
|
2023-03-09 16:32:12 +01:00
|
|
|
|
|
|
|
```shell
|
2023-11-17 17:01:27 +01:00
|
|
|
hyprctl monitors all
|
2023-03-09 16:32:12 +01:00
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Monitors are positioned on a virtual "layout". The `position` is the position of
|
2022-11-05 17:47:33 +01:00
|
|
|
said display in the layout. (calculated from the top-left corner)
|
|
|
|
|
|
|
|
For example:
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2022-11-05 17:47:33 +01:00
|
|
|
```ini
|
|
|
|
monitor=DP-1, 1920x1080, 0x0, 1
|
|
|
|
monitor=DP-2, 1920x1080, 1920x0, 1
|
|
|
|
```
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2022-11-05 17:47:33 +01:00
|
|
|
will tell hyprland to make DP-1 on the _left_ of DP-2, while
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2022-11-05 17:47:33 +01:00
|
|
|
```ini
|
|
|
|
monitor=DP-1, 1920x1080, 1920x0, 1
|
|
|
|
monitor=DP-2, 1920x1080, 0x0, 1
|
|
|
|
```
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2022-11-05 17:47:33 +01:00
|
|
|
will tell hyprland to make DP-1 on the _right_.
|
|
|
|
|
2023-11-12 13:03:26 +01:00
|
|
|
The `position` may contain _negative_ values, so the above example could also be
|
|
|
|
written as
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-11-12 13:03:26 +01:00
|
|
|
```ini
|
|
|
|
monitor=DP-1, 1920x1080, 0x0, 1
|
|
|
|
monitor=DP-2, 1920x1080, -1920x0, 1
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout type=info >}}
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
The position is calculated with the scaled (and transformed) resolution, meaning
|
|
|
|
if you want your 4K monitor with scale 2 to the left of your 1080p one, you'd
|
|
|
|
use the position `1920x0` for the second screen. (3840 / 2) If the monitor is
|
|
|
|
also rotated 90 degrees (vertical), you'd use `1080x0`.
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{</ callout >}}
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
Leaving the name empty will define a fallback rule to use when no other rules
|
|
|
|
match.
|
|
|
|
|
2023-11-12 13:03:26 +01:00
|
|
|
You can use `preferred` as a resolution to use the display's preferred size and
|
2022-11-23 15:38:14 +01:00
|
|
|
`auto` as a position to let Hyprland decide on a position for you.
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
You can also use `auto` as a scale to let Hyprland decide on a scale for you.
|
|
|
|
These depend on the PPI of the monitor.
|
2022-12-14 18:58:35 +01:00
|
|
|
|
2022-09-24 15:32:40 +02:00
|
|
|
Recommended rule for quickly plugging in random monitors:
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
monitor=,preferred,auto,1
|
|
|
|
```
|
|
|
|
|
|
|
|
Will make any monitor that was not specified with an explicit rule automatically
|
|
|
|
placed on the right of the other(s) with its preferred resolution.
|
|
|
|
|
2023-11-12 13:03:26 +01:00
|
|
|
Alternatively, you can use the `highres` or `highrr` rules in order to get the
|
2022-09-24 16:37:22 +02:00
|
|
|
best possible resolution or refreshrate mix.
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
for a focus on refreshrate use this:
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
monitor=,highrr,auto,1
|
|
|
|
```
|
|
|
|
|
|
|
|
for a focus on resolution this:
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
monitor=,highres,auto,1
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
For more specific rules, you can also use the output's description (see
|
|
|
|
`hyprctl monitors` for more details). If the output of `hyprctl monitors` looks
|
|
|
|
like the following:
|
2023-11-12 13:03:26 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
Monitor eDP-1 (ID 0):
|
|
|
|
1920x1080@60.00100 at 0x0
|
|
|
|
description: Chimei Innolux Corporation 0x150C (eDP-1)
|
|
|
|
make: Chimei Innolux Corporation
|
|
|
|
model: 0x150C
|
|
|
|
[...]
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
then the `description` value up to the portname `(eDP-1)` can be used to specify
|
|
|
|
the monitor:
|
2022-10-05 11:24:22 +02:00
|
|
|
|
|
|
|
```
|
2023-11-12 13:03:26 +01:00
|
|
|
monitor=desc:Chimei Innolux Corporation 0x150C,preferred,auto,1.5
|
2022-10-05 11:24:22 +02:00
|
|
|
```
|
|
|
|
|
2023-11-12 13:03:26 +01:00
|
|
|
Remember to remove the `(portname)`!
|
2022-10-27 15:49:50 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
### Custom modelines
|
2023-09-02 20:21:00 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
You can set up a custom modeline by changing the resolution field to a modeline,
|
|
|
|
for example:
|
2023-09-02 20:21:00 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync -vsync, 0x0, 1
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
### Disabling a monitor
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
To disable a monitor, use
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
monitor=name,disable
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout >}}
|
2022-11-23 11:07:51 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Disabling a monitor will literally remove it from the layout, moving all windows
|
|
|
|
and workspaces to any remaining ones. If you want to disable your monitor in a
|
|
|
|
screensaver style (just turn off the monitor) use the `dpms`
|
2024-03-17 13:44:39 +01:00
|
|
|
[dispatcher](../Dispatchers).
|
2022-11-23 11:07:51 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{</ callout >}}
|
2022-11-23 11:07:51 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Custom reserved area
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
If your workflow requires custom reserved area, you can add it with
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
monitor=name,addreserved,TOP,BOTTOM,LEFT,RIGHT
|
|
|
|
```
|
|
|
|
|
|
|
|
Where `TOP` `BOTTOM` `LEFT` `RIGHT` are integers in pixels of the reserved area
|
|
|
|
to add. This does stack on top of the calculated one, (e.g. bars) but you may
|
|
|
|
only use one of these rules per monitor in the config.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Extra args
|
2022-10-27 14:26:44 +02:00
|
|
|
|
2023-05-28 11:21:26 +02:00
|
|
|
You can combine extra arguments at the end of the monitor rule, examples:
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-05-28 11:21:26 +02:00
|
|
|
```ini
|
|
|
|
monitor=eDP-1,2880x1800@90,0x0,1,transform,1,mirror,DP-2,bitdepth,10
|
|
|
|
```
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-05-28 11:21:26 +02:00
|
|
|
See bellow for more detail about each argument.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
### Mirrored displays
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
If you want to mirror a display, add a `,mirror,[NAME]` at the end of the
|
|
|
|
monitor rule, examples:
|
2022-09-24 16:03:37 +02:00
|
|
|
|
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2
|
|
|
|
monitor=,preferred,auto,1,mirror,DP-1
|
|
|
|
```
|
|
|
|
|
|
|
|
Please remember that mirroring displays will not "re-render" everything for your
|
2022-09-24 16:37:22 +02:00
|
|
|
second monitor, so if mirroring a 1080p screen onto a 4K one, the resolution
|
|
|
|
will still be 1080p on the 4K display. This also means squishing and stretching
|
2022-09-24 15:32:40 +02:00
|
|
|
will occur on non-matching resolutions.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
### 10 bit support
|
|
|
|
|
|
|
|
If you want to enable 10 bit support for your display, add a `,bitdepth,10` at
|
|
|
|
the end of the monitor rule, e.g.:
|
2022-10-27 14:26:44 +02:00
|
|
|
|
|
|
|
```ini
|
|
|
|
monitor=eDP-1,2880x1800@90,0x0,1,bitdepth,10
|
|
|
|
```
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2024-04-09 19:01:19 +02:00
|
|
|
**NOTE** Colors registered in Hyprland (e.g. the border color) do _not_ support
|
2024-02-20 21:16:07 +01:00
|
|
|
10 bit.
|
2022-10-27 14:26:44 +02:00
|
|
|
|
2024-04-09 19:01:19 +02:00
|
|
|
**NOTE** Some applications do _not_ support screen capture with 10 bit enabled.
|
2022-10-27 14:26:44 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
### VRR
|
|
|
|
|
|
|
|
Per-display VRR can be done by adding `,vrr,X` where `X` is the mode from the
|
2024-03-17 13:44:39 +01:00
|
|
|
[variables page](../Variables).
|
2023-09-02 20:28:08 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Rotating
|
2023-09-02 20:28:08 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
If you want to rotate a monitor, add a `,transform,X` at the end of the monitor
|
|
|
|
rule, where `X` corresponds to a transform number, e.g.:
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2022-11-21 14:46:56 +01:00
|
|
|
```ini
|
2023-03-18 17:16:18 +01:00
|
|
|
monitor=eDP-1,2880x1800@90,0x0,1,transform,1
|
2022-11-21 14:46:56 +01:00
|
|
|
```
|
|
|
|
|
2023-03-18 17:16:18 +01:00
|
|
|
Transform list:
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-10-16 23:03:01 +02:00
|
|
|
normal (no transforms) -> 0
|
|
|
|
90 degrees -> 1
|
|
|
|
180 degrees -> 2
|
|
|
|
270 degrees -> 3
|
|
|
|
flipped -> 4
|
|
|
|
flipped + 90 degrees -> 5
|
|
|
|
flipped + 180 degrees -> 6
|
|
|
|
flipped + 270 degrees -> 7
|
2022-09-24 15:32:40 +02:00
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout type=info >}}
|
|
|
|
|
|
|
|
If you're using a touchscreen, you'll also have to rotate its digitizer to
|
|
|
|
match:
|
2024-01-31 10:23:57 +01:00
|
|
|
|
|
|
|
```ini
|
|
|
|
input {
|
|
|
|
touchdevice {
|
|
|
|
transform = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
This will be done automatically when
|
|
|
|
[#3544](https://github.com/hyprwm/Hyprland/pull/3544) lands.
|
|
|
|
|
|
|
|
{{< /callout >}}
|
2024-01-31 10:23:57 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Default workspace
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2024-03-17 13:44:39 +01:00
|
|
|
See [Workspace Rules](../Workspace-Rules).
|
2023-03-24 22:14:35 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
### Binding workspaces to a monitor
|
2023-05-01 23:28:16 +02:00
|
|
|
|
2024-03-17 13:44:39 +01:00
|
|
|
See [Workspace Rules](../Workspace-Rules).
|