dawsers / hyprscroller

Hyprland layout plugin providing a scrolling layout like PaperWM
MIT License
82 stars 7 forks source link

Left and Right side "peek" gap #21

Open jonseppanen opened 1 month ago

jonseppanen commented 1 month ago

Currently if the windows take up half the screen, I would like to use my mouse to quickly click the left or right side of the screen to move across, the same way as paperwm does.

It uses "struts" to do this, which is like a peek area on the left/right that shows a sliver of the adjacent app on the left and right at all times.

Happy to use a script or some other workaround for this if there is already the unofficial capability, but couldnt see this question asked before in the issues.

Thanks!

dawsers commented 1 month ago

Is this what you mean?

Currently, hyprscroller only manages the layout. To do this, I would need to hook into the input system and also query mouse positions etc. Nothing is impossible, but I need to think about whether I want to open that route. For me, mouse is very secondary, I am partial to using the keyboard to navigate, which is what tiling window managers excel at.

Thanks for the idea.

jonseppanen commented 1 month ago

Ah sorry I did not describe it well.

Nothing so complicated!

Essentially whenever you have any layout on the screen, there should be reserved space on each side of the monitor - e.g 96px.

Your windows will be shrunk by this reserved space.

This will as a result allow the edges of the windows beside them to "peek" through, allowing you to see there are other items in that direction, and allowing you to click the piece of the other window to focus it, moving your view across.

dawsers commented 1 month ago

So you just sacrifice some screen to be able to "see" beyond and click there. OK, that should be doable. I can probably add an option to define the width (with zero -default- means disabled).

jonseppanen commented 1 month ago

Thats perfect, thanks!

dawsers commented 2 weeks ago

Sorry I forgot about this. If you play with gaps_out and gaps_in you can already have this. For example, set gaps_in = 5 and gaps_out = 10 and you will be able to see the prev/next window if there is one.

If your follow_mouse variable is set to 2, you can click on those edges to change focus. If follow_mouse is 1, the scrolling is too fast, though, but with the new feature the problem would be the same.

Let me know your thoughts.

dawsers commented 2 weeks ago

In 19a804c97481e1a45b5ed950bab6243fe0c4ba68 I added support for different gaps_out values for top, right, bottom, left, so you can have a peek only on the sides if you want, leaving the gaps at the top and bottom smaller.

For example:

gaps_in = 5
gaps_out = 5, 10, 5, 10