libinput-gestures.conf 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. # Configuration file for libinput-gestures.
  2. #
  3. # The default configuration file exists at /etc/libinput-gestures.conf
  4. # but a user can create a personal custom configuration file at
  5. # ~/.config/libinput-gestures.conf.
  6. #
  7. # Lines starting with '#' and blank lines are ignored. Currently
  8. # "gesture" and "device" configuration keywords are supported as
  9. # described below. The keyword can optionally be appended with a ":" (to
  10. # maintain compatibility with original format configuration files).
  11. #
  12. # Each gesture line has 3 [or 4] arguments separated by whitespace:
  13. #
  14. # action motion [finger_count] command
  15. #
  16. # where action and motion is either:
  17. # swipe up
  18. # swipe down
  19. # swipe left
  20. # swipe right
  21. # pinch in
  22. # pinch out
  23. #
  24. # command is the remainder of the line and is any valid shell command +
  25. # arguments.
  26. #
  27. # finger_count is a single numeric digit and is optional (and is
  28. # typically 3 or 4). If specified then the command is executed when
  29. # exactly that number of fingers is used in the gesture. If not
  30. # specified then the command is executed when that gesture is executed
  31. # with any number of fingers. Gesture lines specified with finger_count
  32. # have priority over the same gesture specified without any
  33. # finger_count.
  34. #
  35. # Typically command will be xdotool, or wmctrl. See "man xdotool" for
  36. # the many things you can action with that tool. Note that unfortunately
  37. # xdotool does not work with native Wayland clients.
  38. ###############################################################################
  39. # SWIPE GESTURES:
  40. ###############################################################################
  41. # Note the default is an "internal" command that uses wmctrl to switch
  42. # workspaces and, unlike xdotool, works on both Xorg and Wayland (via
  43. # XWayland). It also can be configured for vertical and horizontal
  44. # switching over tabular workspaces, as per the example below. You can
  45. # also add "-w" to the internal command to allow wrapping workspaces.
  46. # Move to next workspace (works for GNOME/KDE/etc on Wayland and Xorg)
  47. #gesture swipe up _internal ws_up
  48. # NOTE ABOUT FINGER COUNT:
  49. # The above command will configure this command for all fingers (i.e. 3
  50. # for 4) but to configure it for 3 fingers only, change it to:
  51. # gesture swipe up 3 _internal ws_up
  52. # Then you can configure something else for 4 fingers or leave 4 fingers
  53. # unconfigured. You can configure an explicit finger count like this for
  54. # all example commands in this configuration file.
  55. #
  56. # gesture swipe up xdotool key super+Page_Down
  57. # Move to prev workspace (works for GNOME/KDE/etc on Wayland and Xorg)
  58. #gesture swipe down _internal ws_down
  59. # gesture swipe down xdotool key super+Page_Up
  60. # Browser go forward (works only for Xorg, and Xwayland clients)
  61. gesture swipe left 4 xdotool key control+alt+Up
  62. # Browser go back (works only for Xorg, and Xwayland clients)
  63. gesture swipe right 4 xdotool key control+alt+Down
  64. # NOTE: If you don't use "natural" scrolling direction for your touchpad
  65. # then you may want to swap the above default left/right and up/down
  66. # configurations.
  67. # Optional extended swipe gestures, e.g. for browser tab navigation:
  68. #
  69. # Jump to next open browser tab
  70. # gesture swipe right_up xdotool key control+Tab
  71. #
  72. # Jump to previous open browser tab
  73. # gesture swipe left_up xdotool key control+shift+Tab
  74. #
  75. # Close current browser tab
  76. # gesture swipe left_down xdotool key control+w
  77. #
  78. # Reopen and jump to last closed browser tab
  79. # gesture swipe right_down xdotool key control+shift+t
  80. # Example of 8 static workspaces, e.g. using KDE virtual-desktops,
  81. # arranged in 2 rows of 4 across using swipe up/down/left/right to
  82. # navigate in fixed planes. Must match how you have configured your
  83. # virtual desktops.
  84. # gesture swipe up _internal --col=2 ws_up
  85. # gesture swipe down _internal --col=2 ws_down
  86. # gesture swipe left _internal --row=4 ws_up
  87. # gesture swipe right _internal --row=4 ws_down
  88. # Example virtual desktop switching for Ubuntu Unity/Compiz. The
  89. # _internal command does not work for Compiz but you can explicitly
  90. # configure the swipe commands to work for a Compiz virtual 2
  91. # dimensional desktop as follows:
  92. # gesture swipe up xdotool key ctrl+alt+Up
  93. # gesture swipe down xdotool key ctrl+alt+Down
  94. # gesture swipe left xdotool key ctrl+alt+Left
  95. # gesture swipe right xdotool key ctrl+alt+Right
  96. # Example to change audio volume:
  97. # Note this only works on an Xorg desktop (not Wayland).
  98. # gesture swipe up xdotool key XF86AudioRaiseVolume
  99. # gesture swipe down xdotool key XF86AudioLowerVolume
  100. ###############################################################################
  101. # PINCH GESTURES:
  102. ###############################################################################
  103. # GNOME SHELL open/close overview (works for GNOME on Xorg only)
  104. gesture pinch in xdotool key super+s
  105. gesture pinch out xdotool key super+s
  106. # KDE Plasma open/close overview
  107. # gesture pinch in xdotool key ctrl+F9
  108. # gesture pinch out xdotool key ctrl+F9
  109. # GNOME SHELL open/close overview (works for GNOME on Wayland and Xorg)
  110. # Note since GNOME 3.24 on Wayland this is implemented natively so no
  111. # real point configuring for Wayland.
  112. # gesture pinch in dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'
  113. # gesture pinch out dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'
  114. # Optional extended pinch gestures:
  115. # gesture pinch clockwise <whatever command>
  116. # gesture pinch anticlockwise <whatever command>
  117. ###############################################################################
  118. # This application normally determines your touchpad device
  119. # automatically. Some users may have multiple touchpads but by default
  120. # we use only the first one found. However, you can choose to specify
  121. # the explicit device name to use. Run "libinput list-devices" to work
  122. # out the name of your device (from the "Device:" field). Then add a
  123. # device line specifying that name, e.g:
  124. #
  125. # device DLL0665:01 06CB:76AD Touchpad
  126. #
  127. # If the device name starts with a '/' then it is instead considered as
  128. # the explicit device path although since device paths can change
  129. # through reboots this is best to be a symlink. E.g. instead of specifying
  130. # /dev/input/event12, use the corresponding full path link under
  131. # /dev/input/by-path/*.
  132. #
  133. # You can choose to use ALL touchpad devices by setting the device name
  134. # to "all". E.g. Do this if you have multiple touchpads which you want
  135. # to use in parallel. This reduces performance slightly so only set this
  136. # if you have to.
  137. #
  138. # device all
  139. ###############################################################################
  140. # You can set a minimum travel distance threshold before swipe gestures
  141. # are actioned using the swipe_threshold configuration command.
  142. # Specify this value in dots. The default is 0.
  143. # E.g. set it to 100 dots with "swipe_threshold 100".
  144. # swipe_threshold 0