Comments (13)
So if you use clipboard
it works fine?
from espanso.
Yes.
If I use backend: Clipboard, it works consistently.
If I use Auto
, it works 1/n times, getting worse depending on how many times espanso has been restarted.
CleanShot.2024-05-13.at.12.54.10.mp4
from espanso.
05/13/2024 05/13/2024 05/13/2024 05/13/2024 05/13/2024 05/13/2024 05/13/2024 05/13/2024 05/13/2024 05/13/2024
CleanShot.2024-05-13.at.13.00.24.mp4
from espanso.
Clipboard works okay but sometimes outputs a v
. It's a bit janky.
from espanso.
backend: Auto
uses Inject for short replacements and switches over to Clipboard for expansions longer than the clipboard_threshold
(default 100).
However, I (Linux Mint Xfce) find Clipboard works most widely (so I have backend: clipboard
in my default.yml
), except for terminal instances, for which I have an app-specific config which specifies backend: auto
.
I'm afraid I'm getting lost with regard to which mechanism you are using, and to drill down further I'd need to see your trigger code, and the outputs of #acfg#
and #detect#
. It may be necessary to tweak some of the slightly more obscure settings.
Are you using Xorg or Wayland?
from espanso.
# espanso configuration file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the global configuration options for espanso.
# These are the parameters that will be used by default on every application,
# but you can also override them on a per-application basis.
# To make customization easier, this file contains some of the commonly used
# parameters. Feel free to uncomment and tune them to fit your needs!
# --- Toggle key
# Customize the key used to disable and enable espanso (when double tapped)
# Available options: CTRL, SHIFT, ALT, CMD, OFF
# You can also specify the key variant, such as LEFT_CTRL, RIGHT_SHIFT, etc...
# toggle_key: ALT
# You can also disable the toggle key completely with
# toggle_key: OFF
# --- Injection backend
#
# Espanso supports multiple ways of injecting text into applications. Each of
# them has its quirks, therefore you may want to change it if you are having problems.
# By default, espanso uses the "Auto" backend which should work well in most cases,
# but you may want to try the "Clipboard" or "Inject" backend in case of issues.
backend: Clipboard
# --- Auto-restart
# Enable/disable the config auto-reload after a file change is detected.
auto_restart: true
# --- Clipboard threshold
# Because injecting long texts char-by-char is a slow operation, espanso automatically
# uses the clipboard if the text is longer than 'clipboard_threshold' characters.
# clipboard_threshold: 100
# For a list of all the available options, visit the official docs at: https://espanso.org/docs/
# espanso match file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the base matches (aka snippets)
# that will be available in every application when using espanso.
# Matches are 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: ":shrug"
replace: "¯\\_(ツ)_/¯"
# NOTE: espanso uses YAML to define matches, so pay attention to the indentation!
# But matches can also be dynamic:
# Print the current date
- trigger: ":date"
replace: "{{mydate}}"
vars:
- name: mydate
type: date
params:
format: "%m/%d/%Y"
# Print the output of a shell command
- trigger: ":shell"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo 'Hello from your shell'"
# And much more! For more information, visit the docs: https://espanso.org/docs/
Auto/Inject
fails most of the time, as per videos.
Clipboard
outputs a random v
character occasionally, but otherwise works, albeit it slowly.
from espanso.
Are you using Xorg or Wayland?
No, macos, as per the bug report template that I was asked to fill out.
from espanso.
[espanso config: "/Users/luke.barton/Library/Application Support/espanso/config/default.yml"]
backend: Auto
enable: true
paste_shortcut: None
inject_delay: None
key_delay: None
apply_patch: true
word_separators: [" ", ",", ".", "?", "!", "\r", "\n", "\u{16}"]
preserve_clipboard: true
clipboard_threshold: 100
disable_x11_fast_inject: false
pre_paste_delay: 100
paste_shortcut_event_delay: 10
toggle_key: None
auto_restart: true
restore_clipboard_delay: 300
post_form_delay: 200
post_search_delay: 200
backspace_limit: 5
search_trigger: None
search_shortcut: Some("ALT+SPACE")
keyboard_layout: None
show_icon: true
show_notifications: true
secure_input_notification: true
x11_use_xclip_backend: false
x11_use_xdotool_backend: false
win32_exclude_orphan_events: true
win32_keyboard_layout_cache_interval: 2000
match_paths: [
"/Users/luke.barton/co/dotfiles/home/espanso/match/base.yml",
]
from espanso.
title: 'Replacement only works some of the time · Issue #1958 · espanso/espanso'
exec: '/Applications/Arc.app'
class: 'company.thebrowser.Browser'
app is largely irrelevant, it happens everywhere.
from espanso.
Are you using Xorg or Wayland?
No, macos, as per the bug report template that I was asked to fill out.
Oops! My apologies - I read the "Ubuntu" (example) part!
from espanso.
Just puzzling how your default.yml
sets backend: Clipboard
, but the #acfg#
output shows backend: Auto
!
That probably needs resolving first, as it appears you're not using the backend you expect.
Is it possible you have more than one default.yml
file? Are you editing the correct one?
If you're still having problems after sorting that out, it may be worth trying some of the X11 options, especially toggling disable_x11_fast_inject: false
to true
.
from espanso.
I probably copied the acfg after changing the config. I wouldn’t read into that.
from espanso.
I want to use auto. When I first installed/used espanso, auto worked fine. Then it got worse. It’s a bit of a shame that auto just seems broken.
I’ll try your suggestion and report back.
from espanso.
Related Issues (20)
- can't exclude espanso in specific apps HOT 2
- Using trigger with regex conditioned replacement text HOT 6
- Python throws an error when the clipboard contains newline. HOT 3
- Animated gifs paste incorrectly in certain apps HOT 1
- link to config file/match folder in the taskbar right click menu HOT 3
- espanso periodically stops triggering HOT 1
- The candidate input method is being replaced while typing, not after typing. HOT 4
- Espanso tray Icon is difficult to see with Light color mode (Windows) HOT 2
- Reactive input for filtering files HOT 1
- null
- emoji representation in search bar HOT 4
- Search shortcut: `CMD+F4` key combination not working HOT 3
- Portable Espanso on Windows does not override installed copy HOT 5
- Switching Layouts restarts SyncTool and takes focus HOT 10
- replace multi clipboards HOT 2
- Espanso not triggering on Windows 11 HOT 6
- Cannot cat files without producing some output prior (wayland only) HOT 2
- Espanso not working with Cisco Packet tracer Cli HOT 1
- Getting mixed up output on Windows using 'portet' app HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espanso.