Open emilyyyylime opened 1 year ago
https://github.com/bulletmark/libinput-gestures
You can use libinput-gestures for that functionality.
It can also be combined with swaymsg
.
~/.config/libinput-gestures.conf
gesture swipe up volumectl +1%
gesture swipe down volumectl -1%
gesture swipe left swaymsg workspace prev
gesture swipe right swaymsg workspace next
@clushie I can't see how libinput-gestures does anything different than bindgesture here.
I propose two new touchpad gesture types: tap and scroll
Tap
Tap would operate similarly to hold, however, it would recognise short taps, rather than long presses on the touchpad. Even better could be adding parameters for hold that allow controlling the range of milliseconds the hold will need to be to be successfully recognised — this opens up the question of how to specify such a range, two options I think could be accessible are exposing a specific set of periods such as
short
,medium
,long
and specifying a range of milliseconds (either justmin
ormin-max
); these options are, of course, not mutually exclusive. Another question is where would you put such an argument; I can think of putting it in place of the direction setting, seeing ashold
can't take a direction either way, or as a command-like parameter--period
— which then further opens up the question of what it does when combined with the other gesture types. For that reason I believe the former is preferable.Even if implemented using input ranges, I think
tap
should be available as an alias for a shorthold
(0-500ms?)An example use case is play/pause control with a 4-finger tap as
bindgesture tap:4 exec playerctl play-pause
orbindgesture hold:4:very-short exec playerctl play-pause
Scroll
Scroll would operate similarly to swipe, however, rather than being discrete in its triggering, it would allow continuous triggering of the action, similarly to how scrolling with the touchpad continuously (rapidly) moves the screen.
This should probably come with a scroll factor of its own, which will be combined with the device-specific scroll factor. This again could either be yet another colon-separated value, or a cli-like argument
--factor
. I don't know which is preferable here.An example use case is volume control with 3-finger vertical scorlling: