dawsers / hyprscroller

Hyprland layout plugin providing a scrolling layout like PaperWM
MIT License
203 stars 12 forks source link

[Feature] continuous gesture support #10

Closed Acumane closed 6 months ago

Acumane commented 6 months ago

Currently, multitouch gestures work just fine for discrete motions like scroller:movefocus

Support for something like this could be done in, e.g. fusuma, for continuous motion:

swipe:
  3:
    up:
      update:
        command: 'hyprctl dispatch scroller:scroll u'
    down:
      update:
        command: 'hyprctl dispatch scroller:scroll d'

The effect would be similar to scrolling on a page but through window rows/cols

dawsers commented 6 months ago

I really have no way to test this, I am on a desktop, mainly using the keyboard and a little bit of mouse. I am actually glad gestures work at all, but I cannot implement something like that blindly, sorry. Are you sure there is no trick in Hyprland bindings that could help you achieve that? For keyboard bindings there is binde which allows key press repetitions to be sent when keeping a key pressed. For example, I could probably repeat a movefocus dispatch by keeping the directional key pressed if I bound it using binde instead of bind.

Acumane commented 6 months ago

The idea was for scroll to be unfocused and smooth; this imagined dispatcher scroller:scroll would make small (a couple pixel) translations of all the windows in the row/col. This smaller but still discrete command would be repeated by something like fusuma update or binde, yeah.

scroller:movefocus has been suiting me well enough. I'll still look into it

dawsers commented 6 months ago

I think translating windows just a few pixels at a time is cool for animations, but goes against what a tiling window manager is, you are leaving windows in a state where most of the time no window is seen completely. I would understand if you wanted to swipe continuously to "skip" several windows with one swipe, but never leaving the tiles disorganized. For that, I think something like binde would work, but leaving windows scrolled a few pixels is not something I would support. There is window re-organization happening after every dispatch, with the exception of cases when some voluntarily wants to center a certain window for reading etc.