Skip to content

monitors

fdev31 edited this page Feb 3, 2024 · 27 revisions

Note

First version of the plugin is still available under the name monitors_v0

Allows relative placement of monitors depending on the model ("description" returned by hyprctl monitors). Useful if you have multiple monitors connected to a video signal switch or using a laptop and plugging monitors having different relative positions.

Requires wlr-randr.

Syntax:

[monitors]
unknown = "program to run"

[monitors.placement]
"description match".placement = "other description match"

Example to set a Sony monitor on top of the BenQ monitor:

[monitors.placement]
Sony.topOf = "BenQ"

# lists are allowed on the right part of the assignment:
# "XYZ brand".leftOf = ["Sony", "BenQ"]
# Character case is ignored, "_" can be added
# Sony.Top_Of = ["BenQ"]
# Since monitor's description, you can use "(name)":
# "(HDMI-A-1)".leftof = "(eDP-1)"

You can also use "port" names such as HDMI-A-1, DP-1, etc... wrapping them in ():

"(HDMI-A-1)".bottom_of = ["(eDP-1)"]

Note

Check wlr layout UI which is a nice complement to configure your monitor settings.

Configuration

unknown (optional)

No default value.

If set, runs the associated command for screens which aren't matching any of the provided placements (pattern isn't found in monitor description).

placement

Supported placements are:

  • leftOf
  • topOf
  • rightOf
  • bottomOf
  • <one of the above>(center|middle|end)Of *

* If you don't like the screen to align on the start of the given border, you can use center (or middle) to center it or end to stick it to the opposite border. Eg: "topCenterOf", "leftEndOf", etc...

Known limitations

relayout isn't reliable with more than 2 monitors

Clone this wiki locally