iberianpig / fusuma-plugin-appmatcher

Fusuma plugin configure app-specific gestures
MIT License
8 stars 2 forks source link
fusuma gesture gnome gnome-shell ubuntu wayland x11

Fusuma::Plugin::Appmatcher Gem Version Build Status

Fusuma plugin configure app-specific gestures

Installation

Run the following code in your terminal.

Install fusuma-plugin-appmatcher

$ sudo gem install fusuma-plugin-appmatcher

Install Appmatcher GNOME Shell Extensions on Wayland

Gnome Wayland version 41 and later does not allow to access information about window or application like focused app. So fusuma-plugin-appmatcher solves this problem via Appmatcher gnome-extension.

$ fusuma-appmatcher --install-gnome-extension

Restart your session(logout/login), then activate Appmatcher on gnome-extensions-app

List Running Application names

$ fusuma-appmatcher -l prints Running Application names.

$ fusuma-appmatcher -l
Slack
Google-chrome
Alacritty

You can use these application name to under application: context in config.yml

Add appmatcher properties and application names to config.yml

  1. Add the --- symbol to separate the context in config.yml.

  2. Add context: property in ~/.config/fusuma/config.yml.

  3. Under the context: property, you can set the application: APP_NAME as a value.

    • In this context, you can configure mappings to application-specific gestures.
    • For example, you can set :Google-chrome, :Alacritty, Org.gnome.Nautilus, and so on.
    • You can find property name's hint, with $ fusuma-appmatcher -l

NOTE: The first context separated by --- is the default context

Example

In the following example of config.yml

# this is default context
swipe:
  4:
    up:
      sendkey: 'LEFTCTRL+LEFTALT+DOWN'
      keypress:
        LEFTSHIFT:
          sendkey: 'LEFTSHIFT+LEFTCTRL+LEFTALT+DOWN'
    down:
      sendkey: 'LEFTCTRL+LEFTALT+UP'
      LEFTSHIFT:
        sendkey: 'LEFTSHIFT+LEFTCTRL+LEFTALT+UP'
---
context:
  application:  Google-chrome
swipe:
  3:
    left:
      sendkey: 'LEFTALT+RIGHT'
    right:
      sendkey: 'LEFTALT+LEFT'
    up:
      sendkey: 'LEFTCTRL+T'
    down:
      sendkey: 'LEFTCTRL+W'
---
context:
  application:  Gnome-terminal
swipe:
  3: 
    up:
      sendkey: 'LEFTSHIFT+LEFTCTRL+T'
    down:
      sendkey: 'LEFTSHIFT+LEFTCTRL+W'

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/iberianpig/fusuma-plugin-appmatcher. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Fusuma::Plugin::Appmatcher project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.