Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Add new i3-like dynamic layout #352

Closed
wants to merge 3 commits into from

Conversation

blastrock
Copy link

Summary

This PR implements a new layout similar to i3's (and sway's) behavior. If you don't know i3, the main difference with bismuth is that i3 doesn't have predefined layouts. You compose your layout as you go by splitting your screen in vertical and horizontal containers.

This is not a full implementation, more like an early draft to get your opinion. I tried implementing the change in the least intrusive way, but I had to make a few changes in the generic Engine code too.

To implement this layout, I had to keep track of windows in the layout itself. So there are two different states with the list of the windows: the WindowsStore, and the layout's list. This introduce some complexity, and potentially bugs if those states desync. I'm wondering if this really is the right approach, I'm starting to think we should aim for a bigger change in the core of bismuth to implement nested layouts (#93) to have more robust code and more features (the nesting itself). Feedback is welcome :)

Things left to implement

  • Moving windows. Moving a window is not a simple swap, you can move window in and out of containers and they should not swap positions.
  • Nesting different kind of layouts (as talked before). In i3, you can have an horizontal container, and in the left side have a tabbed container.
  • Resizing windows and containers. I think this is related to the adjust method, I didn't look into the matter at all yet.

Breaking Changes

The first commit changes the behavior of bismuth regarding new windows. Instead of adding them at the end of the list, new windows are now added just next to the current one.

UI Changes

image

Test Plan

Not planned yet

Related Issues

Closes #182

@gikari
Copy link
Member

gikari commented May 22, 2022

Thank you for your contribution, but currently merging new features is problematic. This is because Bismuth is transitioning to C++ from TypeScript, because the latter keeps it hard to add some new features, that integrate Bismuth with the Plasma desktop.

Given my schedule, I don't think it is possible to achieve the full C++ port in a reasonable time with me alone, so if you or somebody else wanted to help - it is appreciated. The tiling logic is a relatively isolated module, so it can be ported with relative ease.

@blastrock
Copy link
Author

I see, thank you for your answer. I really want to help with that, but unfortunately I don't think I'll have the time for the months to come. When I get some more free time, I'll try to come back to this :)

@blastrock blastrock closed this May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants