Skip to content

Migrating from Easystroke

Daniel Kondor edited this page Oct 29, 2023 · 3 revisions

Importing gestures and actions

If no actions file exists under ~/.config/wstroke, then wstroke-config will attempt to read any actions file from ~/.easystroke. So if you have Easystroke installed, gestures will be automatically imported on the first run and then saved under ~/.config/wstroke. Note that wstroke-config will never attempt to write under ~/.easystroke, so it is safe to have both Easystroke and wstroke installed.

Note that configuration options (stored under ~/.easystroke/preferences) are not imported, since configuration is quite different and is managed by WCM. Also, not all action types are supported; these will be converted to a default action.

If Easystroke is not installed, you can still import actions by copying the actions (or actions-0.5.6 or similar) from a previous installation (stored under ~/.easystroke) and using the "Import" feature of wstroke-config.

New features and changes

Since wstroke runs as a plugin inside the Wayfire compositor, it is possible to carry out some actions directly (e.g. resizing or closing a view) or by activating another plugin. These actions are available as the "Global Action", "WM Action" and "Custom Plugin" types. This can make triggering these actions more reliable than via keyboard shortcuts.

Also, a consequence of this is that gestures are configured by a stand-alone program (wstroke-config). On the other hand, basic settings (e.g. which button to use) are configured with WCM, the general plugin configurator for Wayfire. These general settings are stored among Wayfire's configuration (in ~/.config/wayfire.ini by default), while gestures and actions are stored in ~/.config/wstroke/actions-wstroke).

A notable change is that keybindings ("Key" action) operate on hardware keycodes instead of translated keysyms. This means that the generated keycodes are not affected by the keyboard layout (so e.g. Wayfire keybindings will always work regardless of the keyboard layout, but application keybindings might not work). wstroke-config displays keybindings according to the current keyboard layout. When importing actions from Easystroke, keybindings are translated in this manner; it is recommended to check if this was successful (results could be incorrect if Easystroke was used with a different keyboard layout than the one set in Wayfire).

Scroll actions from Easystroke are converted to "Touchpad Gesture / Scroll" under WStroke, but should work in the same way.

Missing features

Some features are missing. Some of these seem difficult or impossible to implement on the current architecture of Wayfire + wlroots. There are also a lot of features that I've never used and I'm unsure of their proper behavior. Suggestions and PRs for any of these are very welcome :)

  • Independent setting of gesture button and timeout for different pointing devices. This seems difficult, since all pointing devices are handled together in Wayfire when considering plugin bindings. This might be possible if listening to input_event_signals directly instead of using activator bindings. This might allow better handling of touchpads as well.
  • Text actions. These seem possible, but non-trivial. Generating text would require more logic for translating between Unicode characters and hardware keycodes. I've never used this feature in Easystroke, so I'm not very interested in implementing it given the effort required.
  • Advanced gestures (see here); again, this is something that I've never used and I'm unfamiliar with what would be typical use cases. Some of this could be possible using the grab interface or the input event signals provided by Wayfire.
  • Touchscreen support. Currently, wstroke does not support handling touch events. I feel this is not an issue, since the gestures typically used by Easystroke / wstroke are quite different from what are convenient to use by hand, which are likely better handled by Wayfire's built-in support for touch gestures. Adding support for pen / stylus might be good though, so I might revisit this in time.
Clone this wiki locally