NyanKiyoshi / dotfiles

0 stars 1 forks source link

Migrate to libinput and add gestures #1

Open NyanKiyoshi opened 5 years ago

NyanKiyoshi commented 5 years ago

With the following i3 config:

# change focus
...

# move workspace
bindsym $mod+Shift+j workspace prev
bindsym $mod+Shift+semicolon workspace next

# move focused window
...

Into ~/.config/libinput-gestures.conf we can have something like this:

gesture: swipe up 3 xdotool key super+f
gesture: swipe down 3   xdotool key super+e
gesture: swipe up 4 xdotool key super+Up
gesture: swipe down 4   xdotool key super+Down

gesture: swipe right 3  xdotool key ctrl+Tab
gesture: swipe left 3   xdotool key ctrl+shift+Tab

gesture: swipe right 4  xdotool key super+Right
gesture: swipe left 4   xdotool key super+Left

gesture: pinch in 3 xdotool key super+w
gesture: pinch out 3    xdotool key super+a

gesture: pinch in 4     xdotool key super+w
gesture: pinch out 4    xdotool key super+a

gesture: pinch in 5     xdotool key super+w
gesture: pinch out 5    xdotool key super+a

gesture: pinch out 2     xdotool key ctrl+KP_Add
gesture: pinch in 2    xdotool key ctrl+KP_Subtract

This would allow MacOS like gestures in i3.

NyanKiyoshi commented 5 years ago

Wontfix for now as my trackpad only support two fingers, the hardware being incompatible from having such gestures.