Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong expansions when using Alacritty on Linux #787

Closed
YakBarber opened this issue Oct 12, 2021 · 6 comments
Closed

Wrong expansions when using Alacritty on Linux #787

YakBarber opened this issue Oct 12, 2021 · 6 comments
Labels
bug Something isn't working Linux Related to the Linux operating system

Comments

@YakBarber
Copy link

YakBarber commented Oct 12, 2021

OS: Ubuntu 20.04
Version: snap package, 0.7.3

When matching in my terminal (alacritty, with both zsh and bash), once in a while the replace text output comes in the wrong order. Examples I've seen:

:espanso -> Hi t!here
:espanso -> !eHi ther
:espanso -> Hi thereespanso detectHi there there (Note, espanso detect was the most recent command, so there was a scroll up in my shell history)

I am not able to reproduce the issue outside of the terminal (eg, in this text box in my browser it works right 100%).

@federico-terzi
Copy link
Collaborator

federico-terzi commented Oct 12, 2021

Hey @YakBarber,

I'm sorry you experienced this problem!
I've seen this happening when multiple processes are running at the same time. Could you please try running killall espanso && espanso start and see if that helps?

Keep in mind that 2 processes are expected in version 0.7.3, so don't worry if you see two processes running :)
(for future readers, the new v2 uses 3 processes by default)

Edit: I've just realised that this is unlikely to be the cause if it's happening only in the terminal, perhaps there is some interference with alacritty. Does that happen also with other terminals?

Cheers :)

@federico-terzi federico-terzi added bug Something isn't working Linux Related to the Linux operating system labels Oct 12, 2021
@YakBarber
Copy link
Author

YakBarber commented Oct 13, 2021

I tried the same test in another terminal (Kitty) and got a different behavior. In Kitty it reliably acts as though the "shift key" wasn't added, meaning the output is: hi there1

EDIT: I also tried your struck comment about processes, and as you expected the problem persists.

@federico-terzi
Copy link
Collaborator

@YakBarber Interesting, thank you for trying! I'll investigate :)

@YakBarber
Copy link
Author

No Problem. I'm familiar with Rust and its toolchain, so if my testing anything deeper would be helpful, just let me know. If I can find some time to go spelunking I will, but it's unlikely.

@federico-terzi
Copy link
Collaborator

Sounds good! Although It's likely we'll have to fiddle with Espanso parameters rather than Rust code :)

The way we'll probably handle it is by creating a specific patch for it and bundle it into Espanso itself

@federico-terzi federico-terzi changed the title Text being written in wrong order, extra keys when matching in terminal Wrong expansions when using Alacritty on Linux Oct 22, 2021
@federico-terzi
Copy link
Collaborator

Hey @YakBarber,

I was able to reproduce the issue, and a fix will be included in the next alpha version (v2.0.4-alpha).
In the meantime, you should be able to get it working on Alacritty by adding a file $CONFIG/user/alacritty.yml with this content:

filter_class: "Alacritty"

backend: Clipboard

Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Linux Related to the Linux operating system
Projects
None yet
Development

No branches or pull requests

2 participants