Skip to content

Basic settings

Daniel Kondor edited this page Mar 11, 2024 · 4 revisions

Configuration in WCM

Basic aspects of wstroke's behavior can be configures with WCM, on the page "Mouse gestures".

General settings

General settings that control the behavior of the plugin include the following:

  • "Activate" sets the mouse button used for gestures. Typically, the middle or right mouse button is a good choice. It it even possible to set it to the left button, but this will likely interfere with dragging things. Also, it is possible to add a keyboard modifier that should be pressed in combination with the button, but I find it best to use only a mouse button. When setting a button, it is safe to ignore the warning shown (e.g. "Attempting to bind BTN_RIGHT without modifier"); wstroke will forward any mouse clicks that are not interpreted as gestures (so the button can be still used for normal clicks).
  • "Line color" controls the color used to show gestures while they are drawn. You can set it to transparent to disable this completely.
  • "Target the view under the mouse" -- if this option is set, the view under the pointer when the gesture starts is activated and is set as the "target" of the action performed (e.g. maximize or close or the keypress that is generated). If not set, the currently active view is targeted. It is recommended to change Wayfire's focus behavior for this to work properly (see below).
  • "Focus the view under the mouse" -- this controls whether the view under the pointer when the gesture starts is kept focused after the gesture is finished. "Never" means that the originally active view always stays focused; "Only on click" means that the view under the mouse is focused only if the click is not interpreted as a gesture (if the mouse does not move or the movement was too small to interpret as a gesture); "Only on gesture" means that focus changes only when a click is interpreted as a gesture. "Always" means that the clicked view is always focused after the gesture.
  • "Start timeout" and "End timeout" -- these settings allow starting a gesture after a click (i.e. after the mouse button was released). Start timeout gives how long wstroke listens for mouse movement after clicks, while end timeout determines how long the mouse needs to be still for the gesture to end in this case. These options are mainly intended for touchpads: with libinput versions before 1.70, it is not possible to use the tap-to-click and tap-and-drag feature with multiple fingers to trigger gestures. In this case, setting a timeout can be used to emulate this.

Action settings

The second tab contains settings relevant for specific actions:

  • "Resize corner" specifies the direction in which resizing a view will be started for "WM Actions / Resize".
  • "Touchpad scroll sensitivity" adjusts the speed of scrolling for "Touchpad Gestures / Scroll".
  • "Touchpad pinch sensitivity" adjusts the speed of zooming for "Touchpad Gestures / Pinch".

Focus behavior

By default, Wayfire will always focus the view under the pointer when a mouse button is clicked, regardless if the click is interpreted by a plugin. This behavior can interfere with wstroke managing the focus of the view targeted by the gestures. It is recommended to change this setting, so that mouse clicks with the gesture button are not interpreted by Wayfire's core focus mechanism. This can be achieved in the "Core" section of WCM:

The setting "Mouse button to focus views" needs to be changed to NOT include the button used for mouse gestures. In the above example, I use the right button for gestures, so I removed it from this setting, leaving only BTN_LEFT|BTN_MIDDLE. This is best done by editing the setting directly with the edit button circled in the above screenshot. Note that the default setting includes all mouse buttons (BTN_LEFT|BTN_MIDDLE|BTN_RIGHT).

Clone this wiki locally