Add layer shell support and fix floating windows

Now, I actually save the river-layer-shell-v1 and keep track of the
non-exclusive area. The layout calculation uses the usable area instead
of the entire output's geometry.

I removed boundary clamping for the floating windows because it was a
bit janky when hitting the edges. I'll probably add it back at some
point. I also made windows default to 75% of the usable area instead of
keeping their tiled size so that maximized windows look decent when
floating for the first time. Finally, since I removed the clamping, I
added a center_float keybind to center a floating window. If you're
cycling through focused windows and one isn't on the screen, you can use
the center_float bind to get the window visible again.

Replaced all divTrunc with divFloor to be consistent. I think they
should all be positive, anyways, so they'd be the same, but I like just
having one.
This commit is contained in:
Ben Buhse 2026-02-14 11:29:00 -06:00
commit 5c427234d7
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
9 changed files with 108 additions and 71 deletions

View file

@ -146,6 +146,7 @@ Full command reference:
| `move_right` | pixels | Move floating window right |
| `resize_width` | pixels | Resize floating window width (negative to shrink) |
| `resize_height` | pixels | Resize floating window height (negative to shrink)|
| `center_float` | | Center the focused floating window on its output |
| `set_output_tags` | tags (u32 bitmask) | Set the tags on the focused output |
| `set_window_tags` | tags (u32 bitmask) | Set the tags on the focused window |
| `toggle_output_tags` | tags (u32 bitmask) | Toggle a tag on the focused output |

View file

@ -4,6 +4,7 @@ These are in rough order of my priority, though no promises I do them in this or
- [ ] Implement a river-tag-overlay clone
- [ ] Implement an optional clock bar
- [ ] Make a Rect struct to combine x, y, width, and height
- [ ] Support window rules (float/tags/SSD by app-id/title)
- [ ] Support overriding config location
- [ ] Support configuring primary vs secondary stack side