Skip to content

Add per-monitor default layout selection via monitor property - #185

Open
Kaysera wants to merge 2 commits into
gerritdevriese:mainfrom
Kaysera:feat/defaultmonitor
Open

Kaysera wants to merge 2 commits into
gerritdevriese:mainfrom
Kaysera:feat/defaultmonitor

Conversation

@Kaysera

@Kaysera Kaysera commented Jan 28, 2026

Copy link
Copy Markdown

Description

This PR adds support for per-monitor default layouts by introducing an optional "monitor" property in layout definitions.

When present, the layout is automatically selected as the default for the specified monitor on startup. This allows different monitors to use different default zone layouts without manual selection after login.

Configuration example

{
  "name": "Ultrawide layout",
  "padding": 0,
  "monitor": "DP-1",
  "zones": [
    ...
  ]
}

"monitor" matches the KWin output name

Layouts without this property behave exactly as before

Behavior

On startup, KZones will assign layouts with a matching "monitor" to that output

Monitors without a match fall back to the first defined layout

If multiple layouts match the same monitor, the first one is used

This allows for multi-monitor setups to have separate defaults

Compatibility

Fully backward compatible

No changes required to existing configs

@zjDrummond

Copy link
Copy Markdown

Sounds like a great idea.

@gerritdevriese

Copy link
Copy Markdown
Owner

Has anyone been testing this long term?

@geodro

geodro commented Jul 28, 2026

Copy link
Copy Markdown

I think zones should be per display aspect ratio, for example my display is an ultra wide one and supports split screen, so sometimes I have a very wide one 32:9 and sometimes just normal aspect ratio 16:9

happy to jump in to make the required changes, I was thinking of creating a PR

@Kaysera

Kaysera commented Jul 28, 2026

Copy link
Copy Markdown
Author

Has anyone been testing this long term?

I have been using this since I opened the PR no problem, but I would appreciate more testers just in case

@Kaysera

Kaysera commented Jul 28, 2026

Copy link
Copy Markdown
Author

I think zones should be per display aspect ratio, for example my display is an ultra wide one and supports split screen, so sometimes I have a very wide one 32:9 and sometimes just normal aspect ratio 16:9

happy to jump in to make the required changes, I was thinking of creating a PR

I have the same setup and it is something I haven't come around to fix it yet. I have the impression that the display identifier is not exactly the same when it is 32:9 and when it is 16:9, so I'll try to make some room to see if I can find a way to discriminate between ratios

@geodro

geodro commented Jul 28, 2026

Copy link
Copy Markdown

I think zones should be per display aspect ratio, for example my display is an ultra wide one and supports split screen, so sometimes I have a very wide one 32:9 and sometimes just normal aspect ratio 16:9
happy to jump in to make the required changes, I was thinking of creating a PR

I have the same setup and it is something I haven't come around to fix it yet. I have the impression that the display identifier is not exactly the same when it is 32:9 and when it is 16:9, so I'll try to make some room to see if I can find a way to discriminate between ratios

check this PR -> #209 maybe we can merge into a single one, this one works for me

@Kaysera

Kaysera commented Jul 28, 2026

Copy link
Copy Markdown
Author

I think zones should be per display aspect ratio, for example my display is an ultra wide one and supports split screen, so sometimes I have a very wide one 32:9 and sometimes just normal aspect ratio 16:9
happy to jump in to make the required changes, I was thinking of creating a PR

I have the same setup and it is something I haven't come around to fix it yet. I have the impression that the display identifier is not exactly the same when it is 32:9 and when it is 16:9, so I'll try to make some room to see if I can find a way to discriminate between ratios

check this PR -> #209 maybe we can merge into a single one, this one works for me

I'll check it and see if we can combine it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants