Espanso: Enable fast_inject also for clipboard backend

Created on 12 Dec 2020  ·  6Comments  ·  Source: federico-terzi/espanso

Hello.

The problem can be seen in this video https://youtu.be/3DHMEyIL8FA. Before that, I had a problem with expanding matches in Telegram Desktop. I’m using Ubuntu 20.04.

Here is my config from file ~/.config/espanso/default.yml

# espanso configuration file

# This is the default configuration file, change it as you like it
# You can refer to the official documentation:
# https://espanso.org/docs/

# Matches are the substitution rules, when you type the "trigger" string
# it gets replaced by the "replace" string.
matches:
  # Simple text replacement
  - trigger: ":espanso"
    replace: "Hi there!"

  - trigger: ":дд"
    replace: "Добрый день.\n\n"

  - trigger: ":ду"
    replace: "Доброе утро.\n\n"

  - trigger: ":дв"
    replace: "Добрый вечер.\n\n"

  - trigger: "Здр"
    replace: "Здравствуйте.\n\n"

  # HTML теги
  - trigger: ":a"
    replace: "<a href='{{clipboard}}'>$|$</a>"
    vars:
      - name: "clipboard"
        type: "clipboard"

  - trigger: ":b"
    replace: "<b>$|$</b>"

  - trigger: ":code"
    replace: "<code>$|$</code>"

  # Dates
  - trigger: ":date"
    replace: "{{mydate}}"
    vars:
      - name: mydate
        type: date
        params:
          format: "%d.%m.%Y"

  # Shell commands
  - trigger: ":shell"
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: "echo Hello from your shell"

Linux enhancement

Most helpful comment

Hey @online,

but there were some delays when expanding matches

I'm sorry about that! Unfortunately, I still haven't ported a Gnome-specific optimization to the Clipboard backend, so those delays are expected at the moment (when using Gnome + clipboard backend)
I'll make sure to add this optimization to the roadmap, so that it will get fixed in the future :)

In the meantime, you could set up an App-specific configuration to only enable the Clipboard backend when using Telegram

Cheers :)

All 6 comments

I solved the above problem using the command espanso restart, but in Telegram Desktop I still see this problem:
Problem in Telegram Desktop

Hey @online,

I'm sorry you experienced this problem! Could you please try adding this line to your default.yml file:

backend: Clipboard

and see if that helps?

Cheers :)

@federico-terzi, hello.

Thanks for your reply. Your recommendations, such as, helped me, but there were some delays when expanding matches. Here is a screencast https://youtu.be/dPOxO57y2zY

Hey @online,

but there were some delays when expanding matches

I'm sorry about that! Unfortunately, I still haven't ported a Gnome-specific optimization to the Clipboard backend, so those delays are expected at the moment (when using Gnome + clipboard backend)
I'll make sure to add this optimization to the roadmap, so that it will get fixed in the future :)

In the meantime, you could set up an App-specific configuration to only enable the Clipboard backend when using Telegram

Cheers :)

@federico-terzi, hello.

Thank you for your answers and recommendations.

บัญชี​หลัก abuya7690​@gmail.com

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hos4m picture hos4m  ·  3Comments

pedrorrivero picture pedrorrivero  ·  6Comments

herrowna picture herrowna  ·  5Comments

psyguy picture psyguy  ·  3Comments

fmaiabatista picture fmaiabatista  ·  5Comments