Skip to content

Add stacked mono style - #1216

Open
Alphare wants to merge 9 commits into
mahkoh:masterfrom
Alphare:stacked-mono-style
Open

Alphare wants to merge 9 commits into
mahkoh:masterfrom
Alphare:stacked-mono-style

Conversation

@Alphare

@Alphare Alphare commented Aug 26, 2026

Copy link
Copy Markdown

Discoverability of the codebase and test writing was largely aided by AI to (majorly) speed up the process, but everything was reviewed/(re)written by me and I can vouch for the changes. Whether they're good enough is still up in the air, this is my first contribution. :)

This does the part which is interesting to me in #1077, I don't think I fully understand the OP's intent.

@mahkoh
mahkoh force-pushed the stacked-mono-style branch from e84b999 to 1d9e083 Compare August 30, 2026 14:49
@mahkoh

mahkoh commented Aug 30, 2026

Copy link
Copy Markdown
Owner

This is good in principle. I've rebased it to test it and it seems to work.

One thing I noticed is that there are thick borders between the window titles. This border style is usually used for resizing which doesn't apply here. Maybe this should use the separator style.

Comment on lines +1088 to +1101
GetSeatMonoStyle {
seat: Seat,
},
SetSeatMonoStyle {
seat: Seat,
style: MonoStyle,
},
GetWindowMonoStyle {
window: Window,
},
SetWindowMonoStyle {
window: Window,
style: MonoStyle,
},

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these need a ContainerTarget parameter which was just added.

@Alphare

Alphare commented Aug 31, 2026

Copy link
Copy Markdown
Author

I've updated with a separate commit (I would have folded the changes in the stack but I don't use git often and it seems quite annoying to do). I've written the changes on a very slow laptop while on the road, so I didn't have a change to properly test them, hopefully it's still fine.

One thing I noticed is that there are thick borders between the window titles. This border style is usually used for resizing which doesn't apply here. Maybe this should use the separator style.

Feel free to change this yourself since you will be able test the changes way more easily than I could at least for a couple of weeks. I remember the border being there but didn't know about the resizing feature, so I assumed it was a different style that didn't bother me.

This is a pure refactor, there is no behavior change. The next series
of patches will introduce the `stacked` mono style.
Inspired by i3/sway stacking, the title bars are below each other
instead of next to each other.

Focus and scrolling works as expected with the axis change.

Nothing uses this yet, later changes will wire it to the config.
This introduces `MonoStyle` with the appropriate toggles so changes
can be done via a shortcut and initial value can be set, as with the
other layout tools.
Similar to the existing actions allowing the user to control the
behavior.
This sets the mono style of newly created containers, does not affect
existing containers.

This is set to `"tabbed"` to preserve backwards compatibility.
We've just introduced this setting, so we need to expose it.
This also fixes the `"window-rule"` action list which contained
`"toggle-split"` twice instead of `"toggle-mono"`.
This feature was added to allow users to choose which target actions
apply to, it's only natural we do the same here.
@mahkoh

mahkoh commented Sep 19, 2026

Copy link
Copy Markdown
Owner

I've rebased your changes.

A few more things that I've noticed:

  • Scrolling to switch between windows should probably work on the entire top area that contains the titles and not just on individual titles. Currently scrolling doesn't work when the cursor is over one of the borders between titles.
  • move-left and move-right seem to act like move-up and move-down. But they should instead move the window out of the stacked container.

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