Skip to content

config: add absolute size / position getters / setters and window rules#1069

Open
Ktrompfl wants to merge 2 commits into
mahkoh:masterfrom
Ktrompfl:size-and-position
Open

config: add absolute size / position getters / setters and window rules#1069
Ktrompfl wants to merge 2 commits into
mahkoh:masterfrom
Ktrompfl:size-and-position

Conversation

@Ktrompfl

@Ktrompfl Ktrompfl commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Implements #1052.

Comment thread jay-config/src/_private/ipc.rs Outdated
Comment thread jay-config/src/_private/ipc.rs Outdated
Comment thread jay-config/src/_private/ipc.rs Outdated
Comment thread src/ifs/wl_surface/x_surface/xwindow.rs Outdated
@mahkoh

mahkoh commented Jul 8, 2026

Copy link
Copy Markdown
Owner

I'd prefer for this to be a single action set-position that takes the following arguments:

  • x1
  • y1
  • x2
  • y2
  • width
  • height

All fields take numbers as arguments but also the string "keep", to indicate that this value should be preserved. Naturally not all combinations are valid. For example, it would not make sense to set x1=0, x2=100, width=keep, since you cannot follow all three instructions in general.

@Ktrompfl Ktrompfl force-pushed the size-and-position branch from 6d5359f to fe096c1 Compare July 9, 2026 05:00
@Ktrompfl Ktrompfl force-pushed the size-and-position branch from fe096c1 to 50cb149 Compare July 9, 2026 05:20
@Ktrompfl Ktrompfl force-pushed the size-and-position branch from 669b0d4 to 560737d Compare July 10, 2026 09:09
@Ktrompfl

Copy link
Copy Markdown
Contributor Author

Is this what you have in mind or should I keep the size / position setters as separate functions in jay-config and only expose them as a combined action in toml-config?

@mahkoh

mahkoh commented Jul 10, 2026

Copy link
Copy Markdown
Owner

I've only looked at the SetPosition data structure for now, not at the business logic, but I don't think it can be correct as is. The three states number/"keep"/omitted must be distinguished. Currently it seems that you conflate "keep" and omitted.

If a user sets x1=2, then I'd expect x2 to stay as is, so the window width might increase or decrease.

However, if a user sets x1=2,width="keep", then x2 should be adjusted dynamically to preserve the width.

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.

2 participants