-
-
Notifications
You must be signed in to change notification settings - Fork 32
feat: scrolling layout #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@BarutSRB plz format code using |
|
@alle-ox Will do either tonight after work or tomorrow morning. |
|
I'm an outsider, and I'm not really qualified to review Rust code, so take these suggestions with that in mind. I like where you are going in terms of a 2D model. Here are some initial issues and thoughts:
|
|
@tshort thank you and good catch for the screen height as the base unit, it should definitely be the screen width. The whole thing is still WIP I just wanted to get on track with the scope and get some input before I devote fully, as nothing worse then going back and doing major changes. |
|
Don't put too much weight on my opinions--I'd wait for input from @acsandmann. |
|
@acsandmann @alle-ox @tshort I have removed all the Niri compatibility layers, KDL, and have refactored the scroll layout to make it mentally easier as it was 2,800 lines of code. There is still work to be done, I'd like your input if possible. Here is the config I used for testing: https://codeshare.io/5NPV1d |
|
please drop .idea and run |
Pushed |
|
rift already had an animation system so please make use of that. in addition to that i think this code is a little "verbose" and it seems to reinvent the wheel as opposed to using helpers already available in the codebase. |
Utilizing as much as possible from rift, all work done based on current main branch. New config setting: [settings.layout.scroll] # Maximum number of columns displayed at once in the scroll layout (1-5) # This controls how many columns are visible simultaneously; extra columns stay in the carousel. visible_columns = 2 ALT+SHIFT+H/L (Still not perfect as I do plan on adding a command that automatically takes out a focused window from a stacked column in a newly created column to the right) You can insert or remove a window/row from or to a column, max 3 windows/rows per column. I don't see the reason for beign mroe but if there is a need then we can also add that setting to the config for customization by the users.
f49eef9 to
a309886
Compare
|
@acsandmann Hi, I rewrote it completly, utilizing as much as I could from the current architecture using the main up-to-date branch. New config setting: ALT+SHIFT+H/L (Still not perfect as I do plan on adding a command that automatically takes out a focused window from a stacked column in a newly created column to the right) You can insert or remove a window/row from or to a column, max 3 windows/rows per column. I don't see the reason for beign more but if there is a need then we can also add that setting to the config for customization by the users. Infinite loop left/right TO DO: Config file I used is attached. CleanShot.2025-11-19.at.04.36.33.mp4 |
|
I only played with this latest a bit. Here's what I found:
|
|
@tshort Try now, the navigation should be fixed with proper window alignment based of user intent. Also the infinite scroll is a toggle in config file now infinite_loop = false should be default I'll see what the problem is for CLI when I get soem free time as for one of the workspace windows havign overlap, I'm not sure how to reproduce it or full grasp the problem, if you can describe it a bit mroe in depth or how to reproduce it I'd appreciate it. |
|
@BarutSRB, your latest commit feels much more natural. The left-right scrolling works great. The way windows automatically fit is interesting. Maybe this could be a mode that's toggled. I know I'll have some apps I'll want to remember their width (especially full-width windows). As for reproducing the overlap, I'm not sure what triggers it. It happens on some spaces but not others. It's not a lot of overlap (tens of pixels, maybe). |
- Added consume and expel where you can specify a focused window in the direction of the adjescent columns to be inserted or removed into a new column
- Added ability to move whole columns with all the rows/windows in it in order to repositions them
- Added full screen toggles
- Added keyboard and mouse resizing, for keyboard if it's a single window in a column you can resize it's width if it's multiple windows in a column it resizes it's height, mouse can do both but I'll need to see witht he help of others how to improve it as it feels a little clunky with the mouse.
cargo +nightly fmt --all
|
@tshort When you have a moment, I’d really appreciate it if you could test out the latest changes ❤️ @acsandmann @alle-ox @tshort What do you think? If you have any suggestions, ideas, or run into any bugs, please let me know. From my perspective, the scrolling layout features are nearly complete, the main thing left is adding trackpad/mouse wheel navigation. @acsandmann did an amazing job on that, far beyond what I could do, but I’m happy to help however I can. |
|
I want to test this, but I have many patches applied and I'm worried that it might break something. mostly want to test it because I am curious about what is a scrolling layout. I have no idea. haha. |
|
I can't keep up, @BarutSRB 😄. Here are some notes:
|
@brianwk you can just pull it to another directory build and run it with cargo and backup first the original config use the one I linked if you want to test it without affecting other rift pull/install you're experimenting with |
|
@tshort Thank you for testing it out ❤️
Were you testing with the config file i linked or using your own? |
fmt
- Added gesture scrolling (don't have trackpad can't test)
|
ALT + SHIFT + SCROLL WHEEL to test the "pixel-smooth" scrolling |
|
Here are some comments on the latest changes:
|
|
Maybe I need to try your config. |
Ah now I understand what you mean, I misunderstood you that you wanted when resizing to have empty space in between and not compact the adjacent windows |
|
@tshort I'm thinking that me trying to pull from main the commits in order to have the scroll layout branch synced with main where I had to manually do the merge probably lost some features that were working. So I'm thinking for now to drop the commits down to the last known feature working commit fix the CLI for it without the scroll animation just keep it keyboard centric for now and see if @acsandmann has time to add the gesture smooth scrolling. What do you think? |
|
I just tested this. It seems like it could be cool but I guess you are still working on merging it to main after the massive amount of changes done. At first I wasn't sure if I was using it right but then I realized that on my config I don't have the spaces deactivated by default. So I had to hit ALT+Z to activate it. Also I think I don't get it. Like how do I find the window I want? Currently I just do ALT+X where X is the workspace and I know my windows will be there. With this layout, I have to scroll through a bunch of different windows. I'm assuming that it's meant to be multiple workspaces not just all in one workspace. Also to someone who wants to test it.... If you are using the config provided by Barut using "cargo run" make sure that you place a "--" before putting "--config rift.toml" to pass the configuration file to the binary args. To be honest when I used the touchpad the scrolling was not smooth at all. I don't know how to describe it, but the windows kept "glitching" and disappearing and reappearing. It was quite strange. Also there is the usual bugs with windows floating around in Rift that are being worked on still. Just ping me when it's ready to test again and I will give it a go. I can kind of see how it could be cool when I'm not plugged into my external monitor because I can view all of my windows at full width instead of a weird squished tile window. Of course I have questions though.... Can we have a way to scroll to a specific window? Like let's say I have a window with "web server" and "javascript" in the title. I want to scroll to these windows with a hotkey instead of scrolling through all the windows. Possible? Update: I still don't get it though. Like to me it just seems like stacking with extra steps. I'm gonna try your dwindle layout next... |
|
Okay I tested this further. I think that it's not intended to be used with app rules, because the scrolling didn't work when I used a configuration with my app rules in place. I couldn't seem to get the windows in the workspace to scroll. They would just flip around. Maybe I am just ignorant and I don't understand what a scrolling layout is. I guess my vision was like, you can scroll through the windows on the workspace. But it doesn't seem to work if you only have two windows on the workspace. Edit: Is this meant to be used with a mouse? |
|
Yeah niri does not use rule driven tiling layouts like dwindle, bsp, or tiles, I personally don't use it but many people love the simplicity and beauty of it. You simply use workspaces with one infinite scroll per workspace to organize everything, some people have designated workspaces for each monitor and that is pretty much it, you send windows around d workspaces/monitors (not yet supported) |
Looking forward to seeing the latest updates on this feature! No pressure though. 😅 |
Transform scroll layout from flat 1D horizontal strip to sophisticated 2D column-based architecture:
Column Architecture:
2D Window Management:
Smooth Animation System:
Niri Window Manager Compatibility: