Feature: relative output positioning

As a user, I would like to include a resolution-independent fallback rule in my config that positions outputs relative to each other, to prevent overlapping.

This is possible under X11 via the xrandr(1) --output subflags --left-of, --below, --above, --right-of, however it's not quite feature complete since there's no way to specify alignment (eg left right or center for --below).

I'm not attached to any specific syntax (or this particular approach, if there's another way to provide a robust default for novel display sizes). Here's a proposal to start from:

profile docked {
  output "eDP-1" below "eDP-1" align "center" scale 2.000000
  output "DP-1" position 0,0 scale 1.000000

Here align (center, left, right, top, bottom) would only be valid if one of above, below, left-of, or right-of is specified.

I also considered overloading position to take a value like center,below("DP-1") but parsing into the values seems over complicated.

If kanshi itself could learn to do this, I would be satisfied with output config under wlroots (currently it is a daily headache manually setting output positions).

@emersion WDYT, in-scope for kanshi? Other ideas for how users could solve this problem?

I'd be open to working on this feature if there's interest.

Assigned to
2 years ago
2 years ago
No labels applied.

~edrex 2 years ago

A downside is that kanshi's output config lines become a superset of sway's.

~emersion 2 years ago

I'm not necessarily against it, but this feature is a bit complicated. Also, I'd like to make sure the rules defined by the user make sense and that there's no circular dependency.

We can't statically compute the layout because we might not know the size of each output before-hand.

Register here or Log in to comment, or comment via email.