Following a Unix-like philosophy, espanso uses files to manage its configuration instead of GUIs. This has many advantages, such as the capability to easily sync your configurations between machines using Git or cloud services such as Dropbox or Google Drive.
All espanso configurations reside in a folder called
espanso, whose location varies between Operating Systems:
A quick way to find the path of your configuration folder is by using the following command:
espanso directory will contain the following file structure:
- default.yml - user/
default.yml file contains the main configurations and for a basic usage, this is the only file
you will be working with. You can find a list of all the possible options in the Options section.
user folder is used to store more advanced user configurations, such as Application-specific configs.
Prior to version v0.3.0, espanso located all configurations in the user home directory, into the
This location is now deprecated and, while being still supported for compatibility purposes, you should migrate to the new one with the following steps:
user/directory in the new
espansoconfig folder ( you can find the new config location with the
espanso pathcommand ).
packagesfolder into the new
packagespath ( you can find the new package location with the
espanso pathcommand ).
Introduced in version 0.5.1, espanso now ships with the
edit subcommand, which makes editing configuration files much more convenient. Let’s see how it works:
If you open a terminal and type:
the default system editor (Notepad on Windows and Nano on Unix systems) will be spawned, editing the
Then, after you saved the file and exited the editor, espanso will automatically restart, loading the new changes.
If you want to use another editor, customizing it is super easy, just specify your choice in the
envorionment variables, such as:
If you invoke
espanso edit without further arguments, it will open the
default.yml file. But what if you want to edit
files in the
user/* directory? Luckily, you can simply specify the name as an additional argument (without the extension).
For example, if you want to edit the
user/emails.yml file, you can type:
espanso edit emails
Note that the last command also allows the user to create a new file in the
user/ directory if it doesn’t already exist.
After creating a lot of matches, you may wonder if there’s a way to keep them organized in multiple files instead of creating a long list in the
Luckily, you can split your matches into multiple files by placing them in the
Let’s say you want to create a file for your email signatures. Create the
user/emails.yml file with the following content:
name: emails parent: default matches: - trigger: ":sig" replace: | Best regards, Jon Snow
After restarting espanso (by using the
espanso restart command), you can now use the
:sig trigger as you would have done by inserting it into the
This is made possible by the
parent: default instruction, which tells espanso to merge the current matches into the default configuration.
You can create as many files as you want, and keep all your matches well organized :)
Sometimes you may need to make espanso behave differently with some applications. For example, you may want to have
a different set of Matches for an application, or you may need to change the
backend option for compatibility
For such cases, espanso offers the Application Specific configurations, that is configurations that are valid only for some applications which match specific filters.
Let’s say you want to add some Matches for emojis, but only when using the Telegram desktop app.
You can create a
telegram.yml file in the
espanso/user folder, with the following content:
filter_title: "Telegram" matches: - trigger: ":ok" replace: "👍"
After restarting espanso with
espanso restart, you are ready to test the new configuration.
Navigate to Telegram and type
:ok, you should see your emoji appear. If you then move to another application
and try again, you should not see it!
The key here is the
filter_title option, that basically means: “If the current application contains
in the title, use this configuration instead of the
Note: app-specific configurations don’t support all options, refer to the table below to find out more.
espanso supports various filters, but their support depends on the Operating System used. You can refer to this table:
|Filter||Description||Windows Support||MacOS Support||Linux Support|
||Filter based on the current Window title||Full support||Uses the App identifier instead of the Window title||Full support|
||Filter based on the current application executable path||Full support||Full support||Partial support|
||Filter based on the current Window class||Uses the application executable path instead||Uses the App identifier instead||Full support|
filter_class filters support a full regex as parameter.
To make it easier to find the right filters, espanso offers the
detect subcommand. Open a terminal and type:
Now, while leaving it running, move to the desired application and then come back to the terminal. You should see an output like:
Detected change, current window has properties: ==> Title: 'Telegram (1828)' ==> Class: 'TelegramDesktop' ==> Executable: '/snap/telegram-desktop/953/bin/Telegram'
These are the parameters espanso detected for your target application, so you can now use them to create the perfect filter.
Here’s a list of all options available for the configuration file:
||The typing engine used.
||How many backspace espanso tracks to correct misspelled keywords||int||
||Disable the active mode for the current configuration||
||Disable the passive mode for the current configuration||
||The target for the current configuration file, mainly used in packages||string||
||Windows only. Set the daemon listening port||int||
||Used in app-specific configs, avoid parent matches and global variables||
||Change the key used to toggle espanso active mode||
||Change the key used to trigger passive mode||
||Enable/Disable the Secure Input notification on macOS||
||Show/Hide the icon in the status bar on macOS and Windows||
||Show/Hide the notifications||
Hi! I'm Federico, the creator of espanso. I developed espanso in my (little) spare time and I decided to make it open source because I thought it could be useful to many people.
If you liked the project, please consider making a small donation, it really helps :)Donate with PayPal Become a GitHub Sponsor
Together, we will make espanso the first universal text expander, open to everyone.See the Sponsors