Skip to content

Conversation

@acsandmann
Copy link
Owner

@acsandmann acsandmann commented Oct 24, 2025

supercedes #90

  • allow windows side-by-side instead of always having one main focused
  • nuke scroll event and rely on gestures (do people use scrolling layouts with mouses)

@acsandmann acsandmann linked an issue Oct 24, 2025 that may be closed by this pull request
@tshort
Copy link

tshort commented Oct 30, 2025

I like this new scroll layout!

I know it's still a WIP, but here are some notes:

  • It'd be nice to have move_window_to_next_workspace and move_window_to_prev_workspace commands.
  • It'd be nice to have a command to toggle full screen or full width.
  • I like how the windows are kept centered. Sometimes, I like side-by-side windows, so it'd be nice to have some way of shifting the focused window.
  • The trackpad scrolling is odd. It was scrolling with two fingers, and I couldn't turn it off.

@acsandmann
Copy link
Owner Author

sounds good. the two finger thing is because we are also listening to the scroll event (think mouse wheel) but i think i will forgo that.

as for move window to prev/next workspace i would say that you can trivially script that as of now. rifts cli is pretty fast (if not very fast) so it should work quite well.

there also are already commands to fullscreen (full width) a window, i just have to implement them in the scrolling layout(theyre a part of our layout engine trait).

@tshort
Copy link

tshort commented Oct 31, 2025

It wasn't trivial for me 😄 , but I did get a script to move a window to the next workspace. It runs fast.

#!/bin/bash
WS=$(rift-cli query workspaces | jq -r ".[] | select(.is_active == true) | .index")
WS=$((WS + 1))
rift-cli execute workspace move-window $WS
rift-cli execute workspace switch $WS

I used this in Keyboard Cowboy with keyboard shortcuts. Thanks for the pointer.

@acsandmann acsandmann force-pushed the feat/scrolling-layout branch from 17b2763 to a1f33d8 Compare November 3, 2025 15:13
@acsandmann
Copy link
Owner Author

merge conflicts from hell

@acsandmann
Copy link
Owner Author

@tshort let me know how this feels. this branch has also been rebased to the latest main so keep that in mind as there have been pretty significant changes in that time.

@tshort
Copy link

tshort commented Nov 4, 2025

Thanks for working on this! I was just playing around with it. Some comments:

  • It's nice not to have the two-fingered scrolling.
  • Sizing is odd. On a workspace with lots of windows, they start overlapping. If I increase the size of one window, the other windows in the space shrink. It seems like there's some normalization going on the probably shouldn't be happening for a scrolling layout.
  • Right now, the focused window is always locked to the left. I didn't see an option to change this. It's fine for now. At some point, it'd be nice to act more like the default for PaperWM or Niri and change the focus to the next visible window without scrolling (scrolling is only needed on either side of the screen). Other scrolling window managers have different options for scrolling and focus (Niri, PaperWM, and scroll).

@acsandmann
Copy link
Owner Author

Thanks for working on this! I was just playing around with it. Some comments:

  • It's nice not to have the two-fingered scrolling.
  • Sizing is odd. On a workspace with lots of windows, they start overlapping. If I increase the size of one window, the other windows in the space shrink. It seems like there's some normalization going on the probably shouldn't be happening for a scrolling layout.
  • Right now, the focused window is always locked to the left. I didn't see an option to change this. It's fine for now. At some point, it'd be nice to act more like the default for PaperWM or Niri and change the focus to the next visible window without scrolling (scrolling is only needed on either side of the screen). Other scrolling window managers have different options for scrolling and focus (Niri, PaperWM, and scroll).

these should be addressed

@tshort
Copy link

tshort commented Nov 4, 2025

Wow, you fixed that faster than the time it took me to write my last response 😄.

The only issue I saw is that if I increase the size of the first (left-most) window and I scroll to the right and then scroll back to the left, part of the focused window is hidden. It looks like it's scrolling based on the size of the second window, not the amount necessary to completely fit the first window.

@acsandmann
Copy link
Owner Author

all issues should be resolved (i think). im honestly not testing that much since i don't really like using a scrolling layout so hopefully im not missing anything.

@tshort
Copy link

tshort commented Nov 5, 2025

I still see the issue I described above with the wider window. Also, if I'm focused on the larger left-most window, and I repeatedly hit the "focus left" button, the window repeatedly shifts between aligning to the left edge of the screen and a shifted left position.

@tshort
Copy link

tshort commented Nov 5, 2025

Your latest commit fixed the scrolling issue for the first and last window.

I'm seeing a weird behavior where the mouse cursor acts like the shift key is pressed (I get selections). If I stop rift, it goes away. This happened before your latest commit, too.

@tshort
Copy link

tshort commented Nov 5, 2025

I don't see the funny cursor issue on the main branch.

@tshort
Copy link

tshort commented Nov 6, 2025

I see that toggling full screen now works in the scrolling layout! With that, I did notice a couple of things. When in full screen, it messes up moving focus left or right--I think it should not allow a focus shift.

Another niggle is if I'm on a full-screen window and I switch to another space and switch back, the full-screen window is visible, but the focused window is off by one. Oh wait--now it works right. Either I imagined that, or it only sometimes happens.

@acsandmann acsandmann marked this pull request as ready for review November 6, 2025 13:39
@acsandmann
Copy link
Owner Author

acsandmann commented Nov 6, 2025

okay this should be all good. i could not reproduce the cursor issue so that will need some investigation.

so far it seems like you are my source of truth @tshort so let me know if you encounter any issues

@tshort
Copy link

tshort commented Nov 6, 2025

Here's more info on the cursor issue:

  • It only happens in the scroll layout.
  • I tried turning off the built in swiping, but that didn't help.
  • The swiping doesn't work for me. I get a bit of left-right movement but no change to window focusing.
  • If I add a return statement so that handle_scroll_layout_gesture never gets called, the cursor issue goes away. I do need that because the scrolling layout is unusable with this happening.

With trackpad scrolling disabled, the scroll layout works great for me! All the issues I mentioned above are fixed.

@tshort
Copy link

tshort commented Nov 8, 2025

@acsandmann, what does your latest commit do?

The reason I ask is that I was working on some changes to make scrolling more natural. See https://github.com/tshort/rift/tree/ts-scroll. In that, I made window widths a portion of the screen width. I think you may have started out that way. I did this to change scrolling as follows:

  • If a window is fully visible, don't scroll. Just focus it.
  • If the window to be focused is hanging off the right side, align it with the right side.
  • If the window to be focused is hanging off the left side, align it with the left side.

@tshort
Copy link

tshort commented Nov 9, 2025

Another thing I noticed is that new windows don't appear consistently in the right place if app_rules are used. The new window does not always appear to the right of the existing window after cmd-N. I think add_window_after_selection is working right, but something related to how app_rules run is changing the position of the window.

@tshort tshort mentioned this pull request Nov 15, 2025
@acsandmann
Copy link
Owner Author

closing in favor of #146

@acsandmann acsandmann closed this Nov 21, 2025
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.

scrolling layout

3 participants