Cross-platform Text Expander written in Rust

Overview

espanso

A cross-platform Text Expander written in Rust

GitHub release (latest by date) Language Platforms License Build Status

example

Visit the espanso website.

What is a Text Expander?

A text expander is a program that detects when you type a specific keyword and replaces it with something else. This is useful in many ways:

  • Save a lot of typing, expanding common sentences.
  • Create system-wide code snippets.
  • Execute custom scripts
  • Use emojis like a pro.

Key Features

  • Works on Windows, macOS and Linux
  • Works with almost any program
  • Works with Emojis 😄
  • Works with Images
  • Date expansion support
  • Custom scripts support
  • Shell commands support
  • App-specific configurations
  • Support Forms
  • Expandable with packages
  • Built-in package manager for espanso hub
  • File based configuration

Get Started

Visit the official documentation.

Support

If you need some help to setup espanso, want to ask a question or simply get involved in the community, Join the official Subreddit! :)

Donations

espanso is a free, open source software developed in my (little) spare time. If you liked the project and would like to support further development, please consider making a small donation, it really helps :)

Donate with PayPal

Contributors

Many people helped the project along the way, thanks to all of you. In particular, I want to thank:

Remarks

  • Thanks to libxdo and xclip, used to implement the Linux port.
  • Thanks to the ModifyPath script, used by espanso to improve the Windows installer.

License

espanso was created by Federico Terzi and is licensed under the GPL-3.0 license.

Issues
  • Add debug mode to ShellExtension

    Add debug mode to ShellExtension

    Sometimes when writing a match that uses the shell plugin, there will be a problem that interferes with proper replacement, but the nature of the problem is difficult to ascertain. The yaml syntax can be valid, the match can be triggered, but the replacement is missing.

    Adding -vvv (up to how many makes a difference?) to the espanso worker command doesn't reveal if any error happened during the command run, or what the output/error was, if any.

    I encountered this debugging difficulty as I tried to add a trigger for local IP address, 2 ways:

      - trigger: :local
        replace: "{{address}}"
        vars:
          - name: address
            type: shell
            params:
              cmd: 'nmcli device show wlan0 | pcre2grep -M -O ''$1'' ''^IP4.ADDRESS\[1\]: *(.*)/.*'''
              # cmd: 'ip addr | pcre2grep -M -O ''$2'' ''^\d: wlan0: (.*\n[^\d])*.* inet ((\d+\.){3}\d+)/'''
    

    Neither of the two cmd values above produced a replacement. There are a lot of symbols, and maybe the command being run isn't what I think it is, and it would help if I could find out if it is, and anything else about the commands being run.

    Feature RFNR 
    opened by AndydeCleyre 38
  • Espanso stops expanding after waking from sleep

    Espanso stops expanding after waking from sleep

    Using espanso on macOS 10.14 or 10.15 (seems more noticeable though) seems to die after waking from a sleep. Sometimes using restart to restart the daemon fixes it, but not reliably. I have to usually perform a full restart to get it to start using expansions again.

    bug MacOS 
    opened by WardsParadox 27
  • Windows passive mode is broken

    Windows passive mode is broken

    Good morning,

    Just for tell which bug i found : On linux, if we reload the config, few instances of espanso could be started, i need to restart it.

    When i use passive keys, text is not deleted.

    bug Windows RFNR 
    opened by Gadgetroch 26
  • pipe in shell extension fails silently

    pipe in shell extension fails silently

    The output of this command curl -s 'https://api.chucknorris.io/jokes/random' | jq '.value' in a bash shell returns the value value of the json, as expected.

    Putting the same in the cmd field of an espanso rule triggers the rule but replaces the trigger word with nothing. eg.:

     - trigger: ":tst"
        replace: "{{output}}"
        vars:
           - name: output
              type: shell
              params:
                     cmd: "curl -s 'https://api.chucknorris.io/jokes/random' | jq '.value'"       
    
    bug documentation MacOS RFNR 
    opened by NeoTeo 25
  • Allow the user to import configuration files from different locations

    Allow the user to import configuration files from different locations

    Is it possible to change the location of this file? The reason I ask is that some of my snippets have confidential info.

    Feature 
    opened by DutchPete 23
  • How to insert tomorow and yesterday dates?

    How to insert tomorow and yesterday dates?

    Feature RFNR 
    opened by jrcacd 21
  • Espanso issue with Visual Studio Code

    Espanso issue with Visual Studio Code

    Replacements do not seem to work well with Visual Studio Code.

    2020-12-15_15-47-24

    Config:

      - trigger: ":regards"
        replace: "Regards,
    
    Ramon Smits
    
    Solution Architect at Particular Software"
    
    bug 
    opened by ramonsmits 19
  • Espanso Freezes the entire desktop when expanding a match

    Espanso Freezes the entire desktop when expanding a match

    Every time espanso finds a matching expansion I cannot interact with the desktop for 5-10 seconds, but the mouse cursor still moves. Most of the time this happens the trigger text is not completely erased. Espanso's own logs and journalctl were of not much use debugging this. Tried using clipboard, auto and inject for the backend; same result.

    Info: pt-br keyboard layout

    sb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 18.04.4 LTS
    Release:	18.04
    Codename:	bionic
    
    gnome-shell --version
    GNOME Shell 3.28.4
    
    echo $XDG_SESSION_TYPE 
    x11
    
    

    espanso dump config.txt

    bug Linux 
    opened by Luctins 18
  • Strange inconsistencies with Google Chrome on Ubuntu

    Strange inconsistencies with Google Chrome on Ubuntu

    Hello and thank you for your great project.

    Things were going really well, but i'm now getting inconsistent output across different locations. It started in Google Docs with an extra crazy output, ie seems to copy paste the entire previous paragraph but not output the trigger replacement.

    • Typing into this text box, for example: the trigger works, but it backspaces 2 spaces into the previous word each time. This happens in some other apps too inc Googel docs (when it's not being extra crazy).
    • But other apps are fine, eg Typora, Atom. Libre Office, Only Office, Bluefish
    • The google chrome address bar has been outputting 3x the replacement text (previously would do things like eg put end letter at beginning)

    Restart Daemon doesn't seem to help

    Don't know what to do, should i document more detail, try and research exactly what's happening?

    (Linux Mint 19)

    bug Linux 
    opened by mickleberry 17
  • [macOS] Packages fail to install

    [macOS] Packages fail to install

    I have followed the shruggie package installation instructions after following the espanso package installation instructions for macOS and experienced the following behavior:

    ➜  ~ espanso install shruggie
    Updating package index...
    Index updated!
    authentication required but no callback set; class=Ssh (23)
    ➜  ~ espanso restart
    Daemon started correctly!
    ➜  ~ espanso package list
    ➜  ~
    

    I figured this authentication issue was related to SSH. So, I figured maybe I needed an SSH key loaded (my SSH keys are password-protected). But, ssh-add -l confirmed that my keys were already loaded by the agent. Also, the espanso hub only provides publicly-accessible code, so this shouldn't be an issue, it seems.

    Note that I have repeated this for other packages, also. It's common across all packages that I tried.

    bug MacOS 
    opened by johnrichardrinehart 17
  • Install *.desktop configuration

    Install *.desktop configuration

    When I'm using espanso on elementary OS, its notifications are categorized as "Other" and it does show a generic icon:

    Screenshot from 2021-09-13 21-12-10

    To fix this on Linux, it would be great if espanso installs a corresponding desktop file in /usr/share/applications/espanso.desktop, along with a corresponding icon in /usr/share/icons/...

    Something like this:

    [Desktop Entry]
    Name=espanso
    Comment=A Privacy-first, Cross-platform Text Expander
    Exec=espanso
    Icon=espanso
    Type=Application
    StartupNotify=false
    Categories=Utility;
    
    Linux Feature 
    opened by marbetschar 1
  • Package installer not working correctly

    Package installer not working correctly "espanso install obsidian-in-colour --external"

    Preliminary Information: Obsidian version: 0.12.15 Espanso version: 0.7.3

    Copied verbatim from my reddit post: https://www.reddit.com/r/espanso/comments/pkc5ke/obsidian_in_colour_woes_package_installer_not/

    As the title hints at, when I installed obsidian-in-colour using the command line the script never executes. After looking in the logs and then the yml file I found:

    YML "%CONFIG%/scripts/obsidian_colour.py"

    LOG 14:29:48 [ WARN] Script command reported error: C:\Users\name\AppData\Local\Programs\Python\Python39\python.exe: can't open file 'C:\Users\name\AppData\Roaming\espanso\scripts\obsidian_colour.py': [Errno 2] No such file or directory

    When I hard code the YML to point to the correct location everything works correctly.

    Modified YML

    "C:/Users/name/AppData/Local/espanso/packages/obsidian-in-colour/scripts/obsidian_colour.py"

    The %CONFIG% variable is looking for the Scripts folder just under the espanso folder, while the installer puts it into the packages\PACKAGENAME\scripts folder. Is this an ESPANSO issue, or the package?

    My work around has been, on Windows 10, to use mklink and junction link the /apps/remote and the /apps/local/ Espanso folders to use only the /apps/local location. Don't hate on this solution, I know it is not the ideal way to deal with it :)

    bug 
    opened by LtanHonor 1
  • Espanso enables/disables itself automatically many times

    Espanso enables/disables itself automatically many times

    Hi, I've noticed that espanso enable/disable itself automatically many times. I'm not pressing double tab by mistake. What's the matter ?

    20:57:25 [ INFO] espanso version 0.7.3 20:57:25 [ INFO] using config path: /home/user/.config/espanso 20:57:25 [ INFO] using package path: /home/ser/.local/share/espanso/packages 20:57:25 [ INFO] spawning worker process... 20:57:25 [ INFO] Binded to IPC unix socket: /home/user/.local/share/espanso/espanso.sock 20:57:25 [ INFO] initializing worker process... 20:57:25 [ INFO] Binded to IPC unix socket: /home/user/.local/share/espanso/worker.sock 20:57:26 [ INFO] watching for changes in path: /home/user/.config/espanso 20:57:26 [ INFO] Using modulo at "/usr/bin/modulo" 20:57:26 [ INFO] worker is running! 22:35:06 [ INFO] Toggled: espanso disabled 22:35:19 [ INFO] Toggled: espanso enabled 23:14:59 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:15:23 [ INFO] Toggled: espanso disabled 23:15:23 [ INFO] Toggled: espanso enabled 23:16:31 [ INFO] Toggled: espanso disabled 23:16:31 [ INFO] Toggled: espanso enabled 23:19:33 [ INFO] Toggled: espanso disabled 23:19:33 [ INFO] Toggled: espanso enabled 23:19:33 [ INFO] Toggled: espanso disabled 23:19:33 [ INFO] Toggled: espanso enabled 23:19:33 [ INFO] Toggled: espanso disabled 23:19:33 [ INFO] Toggled: espanso enabled 23:22:31 [ INFO] Toggled: espanso disabled

    opened by molitona 5
  • Missing/possibly double characters in certain text/search fields

    Missing/possibly double characters in certain text/search fields

    Hey there, I have been having an issue with certain text fields, namely, the github search field. I used to use the app 'Albert' to do my expansion, but I use github search so much that it's issues caused me to look for a new solution simply to help with that.

    I am not sure what it was about AutoHotKey on Windows, but I almost never had an issue with it when using it's 'hotstrings', so I am not sure if it's timing or what it is. I really like espanso, so I am hoping that maybe there is something I can tweak to help with this. I tried my best to capture an "in action" example in the clip below.

    I don't really know what all can be done about it, I am guessing it is mostly due to the delay in the search box, but it is annoying enough when it happens, and it happens often enough, that I usually just end up typing it all out anyway, because I have to backtrack to fix it half the time. I know for sure it's not espanso's fault, and probably not its job to account for delays in the application you are trying to type to.

    I appreciate any suggestions anyone might have. I do try to mitigate it by going to a separate bookmark I have to a dedicated search page, but I only remember to do that every so often.

    (Seen here, it doesn't happen all the time, but sometimes there will be multiple first characters, and occasionally something missing from the middle area) missing

    Example expansions:

      - trigger: "la:sh"
        replace: "language:shell"
      - trigger: "la:cs"
        replace: "language:csharp"
      - trigger: "la:da"
        replace: "language:dart"
      - trigger: "la:ps"
        replace: "language:powershell"
      - trigger: "la:py"
        replace: "language:python"
      - trigger: "pu:20"
        replace: "pushed:>2020-01-01"
      - trigger: "cr:20"
        replace: "created:>2020-01-01"
      - trigger: "pu:21"
        replace: "pushed:>2021-01-01"
      - trigger: "cr:21"
        replace: "created:>2021-01-01"
    
    opened by MostHated 4
  • Support multi-input cursor hints

    Support multi-input cursor hints

    Hi there,

    I am curious, is there a way to expand on:

      - trigger: ":pl"
        replace: 'println!("$|$");'
    

    to support multiple inputs?

    I suspect not, as once it is expanded, the tool has no context. But I just thought I would ask.

    The only way I could think of is if you could have a single trigger for multiple replace statements (with a user-configurable delay for the first input).

    🤔

    Feature 
    opened by bashfulrobot 2
  • Force clipboard replaces the trigger with `v`

    Force clipboard replaces the trigger with `v`

    For example, having this:

    matches:
      - trigger: "@bug"
        replace: |-
          first
          second
        force_clipboard: true
    

    causes @bug to be replaced with v, and the cursor to the left of it on macOS 11.5.2 (20G95).

    bug MacOS 
    opened by revolter 2
  • Add option to lower or disable the Windows keyboard layout cache invalidation interval

    Add option to lower or disable the Windows keyboard layout cache invalidation interval

    Tested on several machines - same behaviour/ When I switch to any input field triggers doesn't work right away, I have to type some random characters first and delete them, only then trigger words expands normally.

    Any advice how to diagnose/fix this ? I use your extension in my work, with several colleagues and it's very important. Thanks a lot for your work !

    Windows Feature 
    opened by grenudi 6
  • password downshift problem

    password downshift problem

    Hi,

    I am using Espanso on Linux and created the following to enter complex passwords from the clipboard when remotely accessing Windows computers:

      - trigger: "c2k"
        replace: "{{clipboard}}"
        vars:
          - name: "clipboard"
            type: "clipboard"
    

    Windows will not allow the pasting of passwords from the clipboard into the login box, but this Espanso match can enter them. The problem is that any uppercase characters in the clipboard are downshifted to lower case. So, for example, a password of "[email protected]" is entered into the Windows password box as "aabbcc12". This problem only occurs for text inserted into password fields. Anywhere else is fine. I connect to these remote machines many times during the day. Getting this to work would be very helpful.

    bug Linux 
    opened by McThump 5
  • Output is usually empty

    Output is usually empty

      - trigger: ":nif"
        replace: "{{output}}"
        vars:
          - name: output
            type: shell
            params:
              cmd: "grep NIF $HOME/documents | cut -d ':' -f2 | tee >(xclip)"
    
    

    I have this in my config and whenever I triggered it , it's supposed to replace the trigger by a number and copy to my clipboard as well. The clipboard seems to be working but replacing the text usually doesn't.

    investigate 
    opened by matildeopbravo 3
  • `crates.io` ?

    `crates.io` ?

    Any reason why this is not on crates.io ?

    Would allow cargo install espanso

    Feature 
    opened by midnightexigent 1
Releases(v0.7.3)
  • v0.7.3(Dec 3, 2020)

    Version 0.7.3 is here, bringing a couple of bug fixes and support for rich text matches!

    Rich Text matches

    Note: this feature is still experimental, so expect a few rough edges. If you encounter any problem, please open an issue :)

    You can now specify Rich text matches on espanso! This allows you to include styled text, images and basically everything that supports HTML clipboard pasting.

    96773832-69e53680-13e5-11eb-9e0b-47b7bc3b287e

    This can be obtained with the following configuration:

      - trigger: ":rich"
        markdown: "This *text* is **very rich**!"
      
      - trigger: ":ric2"
        html: '<p>But <span style="color: #ce181e;"><span style="font-size: x-large;">this</span></span> one is <span style="color: #81d41a;"><span style="font-family: Arial, sans-serif;">even richer</span></span>!</p>'
    

    You can use both markdown and html to define your rich text (under the hoods, espanso converts the markdown field to HTML at startup).

    This feature should work in all applications that support HTML pasting, but expect some rough edges given that it's still experimental!

    If you notice any problem, please open an issue :)

    Other changes

    • Fix a bug that caused white space to appear in the macOS status icon. #480 #474
    • Extensions are now able to stop the expansion process. For example, if you open a form and then exit without submitting, the expansion will not take place. See #475
    • Add option to wait for modifier release before injection. See #470
    • Add support for escaped brackets in form fields. Fix #503
    • Disable argument rendering for matches unless args are present. Fix #465
    • Improve buffer handling when interfacing with the native layer. Fix #431
    • Fix test failing on Linux with Rust 1.48. Thanks to @Scrumplex!
    • Add support for the Mingw64 gcc compiler. Thanks to @mattn!
    • Improve a bug that caused a couple of problems with modulo forms on macOS
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.93 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.88 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.96 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(5.03 MB)
  • v0.7.2(Sep 24, 2020)

    Version 0.7.2 is here!

    • Improve modulo support on macOS, which should now focus the form automatically without requiring the user to click it. Fix #430
    • Improve modulo support on Windows, fix a bug that prevented the injection on Chrome and other apps. Fix #440
    • Add support for proxies when installing packages. Fix #408
    • Change the status icon on macOS when espanso is disabled #432. Thanks to @pedrorrivero)
    • Some general improvements to modulo itself, mainly a better support for UTF8: https://github.com/federico-terzi/modulo/releases/tag/v0.1.1
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.90 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.73 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.70 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(4.67 MB)
  • v0.7.0(Aug 22, 2020)

    Version 0.7.0 is here, and brings a few very powerful features!

    Forms

    Note: this feature is still experimental, so expect a few rough edges. If you encounter any problem, please open an issue :)

    One of the most requested features is finally here: forms!

    macform

    This opens up a world of possibilities, such as creating matches with multiple parameters and scripts with arguments.

    Installation

    To avoid bloating espanso with unnecessary dependencies, this feature is extracted as a separate component, modulo.

    Windows and macOS users

    If you are a Windows or macOS user, the latest version of espanso automatically ships with modulo, so you don't have to install anything.

    Linux users

    Due to the great fragmentation in the linux world, I decided to package modulo as an AppImage. In order to use it from espanso, you'll have to complete these steps:

    1. Download the AppImage from the modulo's Releases page.
    2. Copy it in a reasonable directory, such as $HOME/opt
    3. Make it executable with chmod u+x modulo*.AppImage
    4. In order to make it usable from espanso, modulo has to be visible in the PATH as modulo. The easiest way to achieve it is creating a link with:
    sudo ln -s $HOME/opt/modulo*.AppImage /usr/bin/modulo
    

    Simple example

    To try out the new feature, create a new match as follows:

      - trigger: ":form"
        form: "Hey {{name}}, how are you?"
    

    Reload the changes and type ":form". If you did everything correctly, you should see a form appear!

    form

    To submit the value you have 2 alternatives, you can either:

    • Press the CTRL+Enter shortcut
    • Click the "Submit" button

    Explanation

    As you can see from the example, instead of using the usual replace clause, we used form. This is just syntactic sugar to make it easier to use forms, but in the following sections you will learn the complete syntax, necessary if you want to use forms with scripts.

    The only important thing to notice is that where we wanted to put a field in the form, we used the double brakets syntax {{field_name}}.

    Controls

    In the example we've just seen, only a simple text field was used, but modulo supports other controls, such as multiline text fields, choice boxes and list boxes (with more to come in future versions).

    To specify the control type, you have to specify the form_fields param. An example would be:

      - trigger: ":form"
        form: |
          Hey {{name}},
          {{text}}
          {{greet}}
        form_fields:
          text:
            multiline: true
          greet:
            type: choice
            values:
              - First choice
              - Second choice
    

    Which produces this result:

    exampleform

    Some of you might be confused with the | char. That is used to specify a multiline string in YAML

    In this example we can see:

    • The text field is now a multiline text field
    • The greet field is a Choice box

    Improvements in the variable system

    Before diving into the next section, it might be useful to explain some of the variable system improvements that were introduced to support forms in the first place.

    Starting from version 0.7.0, most variables can now use the value of other (previously declared) variables in their body.

    Not all variable types support variable injection, but notably Shell and Script extensions do through the use of ad-hoc environment variables. Take the following example:

    Let's say we want to reverse the string produced by the Date Extension:

    - trigger: ":reversed"
      replace: "Reversed {{myshell}}"
      vars:
        - name: mytime
          type: date
          params:
            format: "%H:%M"
        - name: myshell
          type: shell
          params:
            cmd: "echo $ESPANSO_MYTIME | rev"
    

    This match produces the result we expected. If the current time was 11:54, it produces:

    Reversed 45:11
    

    Let's analyze it step by step:

    1. Variable mytime is evaluated first (as it's the first declared in the vars list).
    2. It's output is injected in the myshell shell command, in particular through the $ESPANSO_MYTIME env variable.
    3. The result is piped through the unix rev command
    4. Finally the output is included in the replace text and expanded.

    As you might have already guessed, the previous variables are injected in the Shell variable (and the Script extension works in the same way) with the naming ESPANSO_UPPERCASE-VAR-NAME.

    Make sure to avoid spaces in the variable names, as they can become problematic in this situation

    If you are using global variables, you have to be careful in this case, as they are implicitly evaluated before the local ones.

    If you need to evaluate a global variable after a local one (which might be necessary if you want to inject another variable value inside it), you can do so as follows:

    # Considering the following global variable
    global_vars:
      - name: "reversed"
        type: shell
        params:
          cmd: "echo $ESPANSO_VARNAME | rev"
    
    matches:
      - trigger: ":rev"
        replace: "{{reversed}}"
        vars:
          - name: "varname"
            type: echo
            params:
              echo: "hello"
          - name: "reversed"
            type: "global"
    

    The key element here is the global type, which tells espanso to evaluate variable reversed only at that point, and not before varname.

    Using forms with the Script and Shell extension

    Hopefully, you now understand how variable values are injected between one another. Turns out, forms are variables as well!

    In fact, our first example:

      - trigger: ":form"
        form: "Hey {{name}}, how are you?"
    

    is a shorthand for the following match:

      - trigger: ":form"
        replace: "Hey {{form1.name}}, how are you?"
        vars:
          - name: "form1"
            type: form
            params:
              layout: "Hey {{name}}, how are you?"
    

    What this does is simply generating a form with the given layout, and then injecting the resulting fields (form1.name) into the replacement text.

    All right, but how can we use forms with the shell extension?

    Let's say that we want to create a match that prompts for user input, and then expands to the reverse of what the user inserted. That could be implemented with:

      - trigger: ":rev"
        replace: "{{reversed}}"
        vars:
        - name: form1
          type: form
          params:
            layout: |
              Reverse {{name}}
        - name: reversed
          type: shell
          params:
           cmd: "echo $ESPANSO_FORM1_NAME | rev"
    

    The key aspect here is that the value of the form field is injected in the shell variable as ESPANSO_FORM1_NAME. The naming is pretty straightforward, as the form variable is called form1 and the field is called name.

    macOS remarks

    For the expansion to take place on macOS, you have to release the submit keys (CTRL+Enter) after submitting the form.

    Backspace Undo

    Another highly requested feature was backspace-to-undo:

    If you press backspace immediately after an expansion takes place, the expansion is reversed:

    backspace

    If for some reason you need to backspace without reverting the expansion, press SHIFT+BACKSPACE instead.

    You can disable it with:

    undo_backspace: false
    

    Please note that this feature is experimental, so if you notice any problem please open an issue!

    Other changes

    • Avoid showing the Console/Powershell window on Windows when using the Shell extension. Fix #249
    • Add offset parameter to Date extension to express dates before/after the current one. See #311
    • The Windows icon now turns red when espanso is disabled. #293
    • Added a debug option to shell commands to understand what is going on under the hoods. Thanks to @deckarep #355
    • General improvements to the Passive Mode. Thanks to @AndydeCleyre See #372
    • Avoid reloading configuration if triggered by hidden files. Fix #393
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.90 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.74 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.67 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(4.68 MB)
  • v0.6.3(Jun 29, 2020)

    Version 0.6.3 is here, and brings a series of bug fixes and a new feature!

    New CLI options

    You can now list all the registered matches with the command:

    espanso match list
    

    And trigger an expansion from the CLI with the command:

    espanso match exec <trigger>
    

    This is particularly useful when integrating with tools like Rofi. See example

    Note: there are still a few rough edges in this feature, so if you notice any bug please open an issue!

    Bug Fixes

    • Add CI pipeline check to verify the presence of all required DLLs on Windows. Fix #336
    • Change WSL shell on Windows to call bash instead of wsl command.
    • Remove trailing .git suffix when installing packages from custom repositories. Fix #326
    • Prevent espanso from crashing when X11 exception occurs. Fix #312
    • Add alternative paste shortcut (Ctrl+Shift+V) on Windows. Fix #333
    • Refactor modifier handling on Windows to respond to keyup events instead of keydown. Fix #328
    • Use named pipes instead of localhost socket on Windows for IPC communication with the daemon. Fix #340
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.87 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.73 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.63 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.44 MB)
  • v0.6.2(Jun 10, 2020)

    Version 0.6.2 is here! Nothing too special, just some bug fixes ¯\(ツ)/¯

    Turn on auto_restart by default

    In this version, the auto-restart on config changes is turned on by default. If you don't like this approach, you can disable it by adding this line to your default.yml file:

    auto_restart: false
    

    Minor changes

    • Fix #306 that prevented ALT key from working correctly on Windows.
    • Add trim option to ScriptExtension #295 (which is turned on by default).
    • Propagate termination signals from daemon to worker. Fix #302
    • Fix secure-input app name extraction process on macOS. Fix #291
    • Inject user PATH on macOS plist when user register espanso. Fix #233
    • Release Shift key if pressed when an expansion occurs. Fix #279
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.86 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.66 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.53 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.03 MB)
  • v0.6.1(May 29, 2020)

    Version 0.6.1 is here, bringing mostly bug fixes and minor features:

    • Fixed a bug #284 that prevented espanso from starting correctly on Linux.
    • Now user matches have an higher priority than packages, so that you can redefine a trigger defined in a package. #273
    • trim option in Shell Extension is now set to true by default. #272
    • Now both the Script Extension and Shell Extension inject a CONFIG env variable to the spawned process with the path of the config directory, making it easier to write cross-machine scripts. #277
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.85 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.64 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.46 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.41 MB)
  • v0.6.0(May 10, 2020)

    Version 0.6.0 is here, bringing a couple of new features and a many improvements!

    Config Auto-reload

    This feature, requested many times before, allows espanso to "listen" for changes in the configuration files and automatically restart itself when needed, making frequent changes much more convenient!

    To try this new feature, enable it in your default.yml file with:

    auto_restart: true
    

    And then restart espanso!

    There are times in which a full restart is still beneficial, such as after installing a package, to make sure espanso picks up all new changes.

    If you notice any strange behavior or bug, don't hesitate to open an issue.

    Install packages from repositories outside the Hub

    Requested by many users in #55, espanso now allows to install packages from GitHub repositories outside the espanso hub.

    The command to use has the following format:

    espanso install <package_name> <repo_url> --external
    

    Those repositories must comply with the format specified in the package-example.

    Add support for Powershell and WSL on Windows

    The Shell Extension now allows the user to select the preferred shell, which is particularly beneficial on Windows. In particular, this new version also allows to execute a shell command on WSL, harnessing the full power of Linux shell on Windows!

    Example of usage:

      - trigger: ":shell"
        replace: "{{output}}"
        vars:
          - name: output
            type: shell
            params:
              cmd: "echo hello from linux!"
              shell: "wsl"
    

    The shell parameter can be either: cmd, powershell or wsl on Windows.

    Note: now the default shell on Windows is Powershell.

    Minor changes

    • Mitigate bug related to word matches. See #252
    • Default shell on Windows changed to Powershell (instead of CMD).
    • Add option to slow down backspacing and injection on Windows and Linux, which is beneficial for some applications (such as Firefox). See #248 #246
    • Fast inject is now enabled by default on Linux.
    • Fix a bug that caused global variables to being evaluated even though they where not needed. #270
    • Improved the espanso edit subcommand to accept EDITOR with parameters. Fix #245
    • Improve the Script Extension to automatically expand %HOME% to the user home directory in paths, making it possibile to define cross-platform script paths. Fix #265
    • Improve case propagation to work also with prefix symbols. Fix #244
    • Formatted the whole project using rustfmt, conforming to Rust best practices. Fix #137
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.85 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.63 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.45 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.41 MB)
  • v0.5.5(Apr 18, 2020)

    Version 0.5.5 is here, and brings massive improvements on Linux.

    Fast Inject on Linux

    NOTE: This feature is still experimental, so it must be enabled manually.

    In the last few days I've been working hard to improve the expansion speed on Linux. This version brings an improved text injection mechanism that relies on XSendEvent rather than XTestFakeKeyEvent, which is much faster.

    I've tested it on various distros and applications, and it always worked pretty well. That said, I don't exclude the possibility of some compatibility problems. If you experience any of them, please open an issue.

    This improvement should be particularly noticeable on Gnome distros (such as stock Ubuntu).

    Enabling Fast Injection

    To enable fast injection, just add the following line on your default.yml config:

    fast_inject: true
    

    NOTE: make sure you didn't specify backend: Clipboard, otherwise this setting won't have any effect.

    Acknowledgements

    A special thanks to AutoKey, a great open-source text expander for Linux, from which I took some inspiration for this feature.

    Option to Hide Icon and Notifications

    Originally proposed by @timorunge in #95, now espanso gives the possibility to hide the status icon on Windows and macOS, as well as disabling notifications.

    In particular, you can add the following to your default.yml config:

    show_icon: false            # Disable the status icon
    show_notifications: false   # Disable the notifications
    

    Minor changes

    • The Auto backend is now the default one on Linux.
    • Add the SECURITY.md overview. Fix #182
    • Ignore hidden files when loading configs and make error more explicit. Fix #234
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.78 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.50 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.22 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.39 MB)
  • v0.5.4(Apr 3, 2020)

    Version 0.5.4 is here! Let's see the changes:

    Improved Security for Packages

    To add a layer of security, now most Hub packages have been moved to the core repository. The end user shouldn't experience any difference from the previous version, with the only exception being:

    Some packages (namely the bigger ones that would make the core repository too large) are now considered external, and espanso will block the installation by default, prompting the user to verify the source of the package (the repository).

    In case the user wants to proceed with the installation, a the --external flag could be used:

    espanso install <package> --external
    

    macOS Notification for SecureInput

    On macOS there is a security feature known as SecureInput, which blocks text expanders from detecting input when entering text in sensitive areas, such as password fields (but also other apps, even the Terminal if configured).

    As a result, espanso will not work in those situations, and many users didn't understand this apparently strange behavior.

    To better inform the user, now espanso will trigger a notification (as well as logging it) to warn the user if an app triggers SecureInput.

    If you want to disable the notification, just add the following line in your config file:

    secure_input_notification: false
    

    Removed the Git dependency

    Espanso has removed its git2 dependency, which means macOS users won't have to install openssl anymore, making it much easier to install without Homebrew.

    For more information, see: #218.

    Minor changes

    • Change the context menu entry to display "Exit espanso". Fix #209
    • Remove git2 dependency. Fix #218
    • Add option to force clipboard use on a per-match basis. Fix #217
    • Improve robustness of passive mode with empty selections. Fix #213
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(1.78 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.50 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.23 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.32 MB)
  • v0.5.3(Mar 17, 2020)

    Version 0.5.3 brings a couple of bugfixes and general improvements:

    • Fix Windows installer missing required vcruntime140_1.dll. Fix #203
    • Add an alternative package provider to install packages, as a small fraction of macOS users had a problem related to GIT. See #164
    • Fix a bug that prevented the espanso context menu from working correctly on Windows.
    • Disable conflict_check by default, as it yield a lot of false positives while not providing much value.
    • Now espanso automatically updates Systemd service file if espanso changes path (such as when updating through snap).
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(2.18 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.97 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.07 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.74 MB)
  • v0.5.2(Mar 10, 2020)

    Version 0.5.2 is here! It ships various improvements and optimizations, let's see them:

    New Auto backend on Linux

    This feature is still experimental, and thus must be enabled manually. Check the section below for more information

    On Linux systems there was a long standing issue with text injection, which prevented certain apps from correctly handling special characters (such as emojis or accented letters) when injected (for example on Firefox).

    For this reason, espanso initially defaulted on the Clipboard backend on Linux, as it was the most reliable (working in 99% of cases), even though it was less efficient and with a few inconveniences (for example, the previous clipboard content being overwritten).

    Espanso now ships with the Auto backend, which tries to take it a step further, by automatically determining when an injection is possible (only ascii characters in the replacement), and falling back to the Clipboard backend otherwise.

    This new approach should offer substantial benefits to Linux users.

    Enabling the Auto backend

    Add the following line to your default.yml configuration to enable the backend:

    backend: Auto
    

    and restart espanso.

    Please let me know if you experience any problem with this new mode :)

    More specific key options

    Originally proposed by @lkrms in #117, you can now specify a more specific toggle_key option (and the same goes for passive_key). The new options are:

    • LEFT_CTRL
    • RIGHT_CTRL
    • LEFT_ALT
    • RIGHT_ALT
    • LEFT_META
    • RIGHT_META
    • LEFT_SHIFT
    • RIGHT_SHIFT

    All the other options are still valid, for example specifying CTRL is equivalent to accepting both LEFT_CTRL and RIGHT_CTRL.

    Minor changes and bug fixes

    • General improvements to word matches, which up to know were known to be a bit unstable. Fix #127
    • Add support to kitty terminal. Thanks to @miterion for the help! :)
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(2.16 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.92 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.03 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.71 MB)
  • v0.5.1(Mar 4, 2020)

    Version 0.5.1 is finally here and brings a few interesting features! Let's see them:

    Edit subcommand

    Originally proposed by @GJKrupa in #171 , 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:

    espanso edit
    

    the default system editor (Notepad on Windows and Nano on Unix systems) will be spawned, editing the default.yml. Then, after you saved the file and exited the editor, espanso will automatically restart, loading the new changes.

    Customizing the editor

    But wait! Nano? Are you serious?

    I thought about it for a while, and eventually I opted for a newby-friendly approach (what if one of our fellows expanders gets trapped into VIM? :)

    Jokes aside, customizing the editor is super easy, just specify your choice in the EDITOR (or VISUAL) envorionment variables, such as:

    EDITOR=/usr/bin/vim
    

    Editing files in the user directory

    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/email.yml file, you can type:

    espanso edit email
    

    ClipboardExtension

    Espanso now allows to include the current clipboard content in a match, which can be useful in many situations.

    For example, let's imagine you want to create the ultimate HTML link shortcut:

      - trigger: ":a"
        replace: "<a href='{{clipboard}}' />$|$</a>"
        vars:
          - name: "clipboard"
            type: "clipboard"
    

    If you now copy a link in the clipboard (for example by selecting and then CTRL+C) and then type :a, you'll see the following replacement appear:

    <a href='YOUR_COPIED_LINK'></a>
    

    Too see the reasons behind this feature, see #192.

    Multi-trigger matches

    Originally proposed by @muhlinux in #144, now espanso allows matches to have multiple triggers, by using the triggers keyword and specifying a list of valid triggers:

      - triggers: [":lol", ":xd"]
        replace: ":laughing:"
    

    Case-propagating matches

    Originally proposed by @muhlinux in #152, espanso now support matches that propagate the casing of the trigger. Just add the propagate_case: true option in a match, such as:

      - trigger: foo
        replace: bar
        propagate_case: true
        word: true
    

    Based on the case style you use in the trigger, espanso will trigger the replacement as:

    foo => bar
    Foo => Bar
    FOO => BAR
    

    Minor changes and bug fixes

    • Now the preserve_clipboard option is enabled by default.
    • Add the possibility to escape double brackets in replacements. Fix #187
    • Change the urxvt terminal paste shortcut. Fix #166
    • Change the Windows installer to avoid VC++ Redist installation (which required Admin rights) by switching to local deployment of DLLs. Fix #189
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(2.15 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.92 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.09 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(3.74 MB)
  • v0.5.0(Feb 2, 2020)

    Hey expanders! After a long wait, espanso 0.5.0 has finally been released and brings many new features! Note: it could take me a few days to update the docs.

    New features

    Passive mode

    NOTE: this feature is still in the experimental stage, and must be switched on manually

    Originally proposed by @telmotrooper in #62, passive mode has finally been implemented. This alterative mode allows the user to expand matches after typing them, instead of in realtime.

    The feature works as follows:

    • Type a message containing any number of matches (passive mode matches are more limited, see the Limitations paragraph below)
    • Select the text you want to process (conveniently done with the CTRL+A shortcut)
    • Double press the CTRL key (you can customize this key).

    As a result, espanso will copy the text, process it expanding all the matches, and then paste it back in the field.

    passive

    Why should this be useful though? Many things! Let's see them:

    Arguments

    One of the most requested features has always been match arguments. Due to the realtime nature of espanso, this problem was very difficult to solve in a solid way. The solution is to use passive mode, so that espanso can analyze whole sentences and execute a more complex elaboration.

    argument

    Which can be obtained with the following:

    - trigger: ":greet"
      replace: "Hey $0$, how are you?\nIt's been a while!"
      passive_only: true
    

    The $0$ keyword indicates where the argument should be placed, and you can also pass multiple arguments, so that they becomes $1$, $2$, ecc.

    Notice the passive_only keyword, which makes espanso ignore the match when typing it (otherwise, espanso would expand it right away).

    The really powerful thing is that you can pass these arguments to the shell or custom scripts as well:

    Integration with Shell

    argumentshell

    This can be done by including $0, $1 in the cmd parameter:

    - trigger: ":rev"
      replace: "{{output}}"
      passive_only: true
      vars:
        - name: output
          type: shell
          params:
            cmd: "echo $0 | rev"
            trim: true
    

    For Windows users: instead of $0, you must use %0.

    Integration with Scripts

    Using the inject_args parameter, arguments will be appended to the given list when launching a program. For example:

    - trigger: ":pyscript"
      replace: "{{output}}"
      vars:
        - name: output
          type: script
          params:
            inject_args: true
            args:
              - python
              - /path/to/your/script.py
    

    At this point, if you expand :pyscript/hello/, your script will receive "hello" as the first argument.

    Limitations

    • Passive mode does not work in terminals. Unfortunately, because this feature heavily uses selections and copy/pasting to work, I still haven't figured out a way to reliably make them work in terminals.

    • Matches have to start with a specific character. The default character is :, but that can be customized by changing the passive_match_regex parameter. This constraint has been added to improve the analysis efficiency.

    • Passive matches do not support images.

    Enabling passive mode

    Passive mode is still in its experimental stage, so it must be enabled manually. Add the following lines in the default.yml file:

    enable_passive: true
    passive_key: CTRL
    

    Currently, the passive_key parameter accept the following alternatives: CTRL, ALT, SHIFT and META (Win key on Windows and Linux, CMD on macOS). If you'd like other possibilities, please open an issue.

    More information can be found in the documentation (could take a few days to update).

    Nested matches

    Originally proposed by @timorunge in #110, nested matches allow you to include the output of a match inside another one. For example:

    - trigger: ":one"
      replace: "nested"
    
    - trigger: ":nested"
      replace: "This is a {{output}} match"
      vars:
        - name: output
          type: match
          params:
            trigger: ":one"
    

    At this point, if you type :nested you'll see This is a nested match appear.

    Global variables

    Originally proposed by @simon-wolf in #162, global matches allow the definition of global variables that can be used in all matches. In your default.yml file, you can add:

    global_vars:
      - name: "global1"
        type: "shell"
        params:
          cmd: "echo global var"
      - name: "greet"
        type: "dummy"
        params:
          echo: "Hey"
    

    At this point, you can use global1 and greet in all your matches:

    - trigger: ":hello"
      replace: "{{greet}} Jon"
    

    And typing :hello will result in Hey Jon.

    For Ubuntu/Debian users

    Espanso now ships with a experimental deb package! If you want to try it out, here's how you can migrate:

    Before removing the espanso binary, unregister it from Systemd.

    espanso unregister
    

    Then remove the old binary (if you followed the instructions it is located in /usr/local/bin/espanso).

    At this point, download espanso-debian-amd64.deb and type the following command (making sure you are in the same directory as the deb file):

    sudo apt install ./espanso-debian-amd64.deb
    

    This new approach offers a number of benefits, such as the automatic dependency management and ease of upgrade.

    Conflicting triggers warning

    Suggested by @tiktuk in #135, espanso now warn the user in case there are conflicting triggers, such as :abcd and :ab.

    Bug fixes

    • Added support for Yakuake terminal. Fix #153
    • Added support for Tilix terminal. Fix #143
    • Added delay to fix possibile race condition when using preserve_clipboard. Fix #148
    • Fix bug that prevented certain applications, such as Photoshop, from working correctly with espanso on macOS. Fix #159
    Source code(tar.gz)
    Source code(zip)
    espanso-debian-amd64-sha256.txt(91 bytes)
    espanso-debian-amd64.deb(2.14 MB)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.91 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.00 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.04 MB)
  • v0.4.1(Dec 16, 2019)

    Hello fellow expanders! Version 0.4.1 brings some interesting new features, as well as many bug fixes.

    New features

    Experimental: preserve clipboard

    Espanso now supports a way to partially preserve your previous clipboard when expanding a match instead of overwriting it. At the moment, it only preserve text-based clipboards, so if you had pasted an image, espanso will overwrite it even with this option enabled.

    Because this is still experimental, you will need to enable it manually by adding the following line in your default.yml config:

    preserve_clipboard: true
    

    In the next release, unless any problems arise, the feature will be turned on by default.

    A great thank you to @matt-h, who laid the foundations of this new feature.

    Random Extension

    You how have the possibility to write non-deterministic replacement texts. Said in other words, you can now specify a set of possible expansions for a match, useful to avoid repetitions.

    This feature works as any other extension. You declare a variable of type random and then pass a number of choices as a parameter:

      - trigger: ":quote"
        replace: "{{output}}"
        vars:
          - name: output
            type: random
            params:
              choices:
                - "Every moment is a fresh beginning."
                - "Everything you can imagine is real."
                - "Whatever you do, do it well."
    

    In this case, typing :quote will expand randomly to one of the tree quotes.

    Minor changes

    • You can now specify the trim: true parameter in a shell extension to trim the output from any space/newline character. For example:
      - trigger: ":shell"
        replace: "{{output}}"
        vars:
          - name: output
            type: shell
            params:
              cmd: "echo Hello from your shell"
              trim: true
    
    • Added a warning if Systemd is not available on Linux and switching automatically to unmanaged mode. Fix #139 #134
    • Improved support for Simple Terminal. Fix #112
    • Improved support for Emacs editor. Fix #122
    Source code(tar.gz)
    Source code(zip)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.96 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.99 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.04 MB)
  • v0.4.0(Nov 30, 2019)

    Version 0.4.0 is here!

    Before we start, a quick announcement: we now have an official espanso subreddit! Join the community if you want to stay updated with the latest news, tips and tricks :)

    Image Matches

    Initially proposed in issue #96, you can now use espanso to expand matches into images!

    imagematches

    They are pretty easy to use, just use the following match syntax:

      - trigger: ":cat"
        image_path: "/path/to/image"
    

    For more information, check out the documentation.

    Other changes

    • Add the possibility to disable the toggle key #126, thanks to @NickSeagull :)
    • Allow the user to change the Paste Shortcut (also on a per-application basis), useful when a program uses something different from CTRL+V. Currently implemented only on Linux.
    Source code(tar.gz)
    Source code(zip)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.97 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.98 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.06 MB)
  • v0.3.5(Nov 16, 2019)

  • v0.3.4(Nov 8, 2019)

    Minor changes

    • Add the espanso path default command line option to print the configuration file path. This is useful to quickly edit the configuration file (for example, by using vim $(espanso path default)). Other options are available, you can check them out with espanso path help.

    • Fix bug #112 that prevented Simple terminal from working correctly on Linux with Clipboard backend.

    • Make the ZIP crate dependency macOS specific, to reduce binary size on other platforms.

    Source code(tar.gz)
    Source code(zip)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.97 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(7.96 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.06 MB)
  • v0.3.3(Nov 2, 2019)

    I've been quite busy this week, so I only managed to fix a couple of bugs. But as my grandmother always says: something is better than nothing :)

    Bug fixes

    • Fix bug #109 that prevented matches ending with non-alphanumeric chars from being expanded correctly.
    • Fix bug that prevented multiple word matches from being expanded correctly on Linux.
    Source code(tar.gz)
    Source code(zip)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.92 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.01 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.06 MB)
  • v0.3.2(Oct 26, 2019)

    Major changes

    This week I introduced a couple of great features proposed by the community:

    Please note that at this point you should consider both of these features as experimental and be prepared for some changes. I highly suggest you to open an issue if you encounter any problem or have suggestions on ways to improve them.

    Cursor Hints

    Originally proposed by @cambid in #92, espanso now supports cursor hints in matches to move the cursor on the given position after the expansion.

    You just need to add $|$ in the replace clause where you want the cursor to be positioned afterwards. For example:

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

    If you now type :div, espanso will expand the match and put the cursor between the tags.

    Documentation: https://espanso.org/docs/matches/#cursor-hints

    Word Triggers

    Originally proposed by @timorunge in #82, espanso now supports word matches, a way to define matches that are expanded only when surrounded by word separators, such as spaces or commas.

    This makes possible to use espanso as an autocorrection tool for typos. For example:

    Let's say you occasionally type ther instead of there. Before this release, you could have used espanso like this:

      - trigger: "ther"
        replace: "there"
    

    This would correctly replace ther with there, but it also has the problem of expanding other into othere, making it unusable.

    With word triggers you can now add the word: true property to a match, telling espanso to only trigger that match if surrounded by word separators. So in this case it becomes:

      - trigger: "ther"
        replace: "there"
        word: true
    

    At this point, espanso will only expand ther into there when used as a standalone word.

    Documentation: https://espanso.org/docs/matches/#word-triggers

    Minor changes

    • Fix bug that prevented the user to type accents correctly on some keyboard layouts #86.
    • Fix espanso detect on macOS #91.
    • Fix low resolution icon on macOS status bar thanks to @timorunge #98.
    • Add support for Terminator on Linux with Clipboard backend #102.
    Source code(tar.gz)
    Source code(zip)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.97 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.02 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.06 MB)
  • v0.3.1(Oct 19, 2019)

    Nothing too interesting this week, mostly bug fixing. I've been very busy with some upcoming exams, but next week I plan to release a couple of great features proposed by the community. Stay tuned :)

    Bug fixes

    • Add support for Clipboard backend on Termite, XTerm, UXTerm and Konsole. Fix #90
    • Fix bug that caused the deprecation warning message to be printed multiple times. Fix #85
    • Fix wrong path subcommand output. Fix #89
    • Include support for $HOME/.config/espanso directory location. Fix #88
    • Improve systemd integration. Fix #84
    Source code(tar.gz)
    Source code(zip)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.96 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.00 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.05 MB)
  • v0.3.0(Oct 12, 2019)

    Major changes

    • Moved .espanso config directory to new locations to better integrate with the OS. Fixed #73. More info here: https://espanso.org/docs/configuration/
    • Add support for Unicode matches #78
    • Changed default backend engine on Linux to use Clipboard instead of Inject.
    • Systemd integration on Linux

    Minor changes

    • Fixed bug on linux that prevented espanso from correctly detecting Keyboard layout changes #72
    • Add portable mode to read configuration from the same directory
    Source code(tar.gz)
    Source code(zip)
    espanso-linux-sha256.txt(65 bytes)
    espanso-linux.tar.gz(3.95 MB)
    espanso-mac-sha256.txt(64 bytes)
    espanso-mac.tar.gz(8.00 MB)
    espanso-win-installer-sha256.txt(64 bytes)
    espanso-win-installer.exe(16.05 MB)
Owner
Federico Terzi
Engineering Student and Developer. Creator of espanso
Federico Terzi
🛳 Continuous deployment agent

Subilo ?? Deployment automation agent Subilo is a tool to setup continuous deployments for applications running on machines with no external integrati

null 37 Aug 12, 2021
kubesql, Experimental tool to query K8s API using plain SQL

kubesql, an experimental tool for querying your Kubernetes API Server using simple and smallest SQL syntax.

Furkan Türkal 137 Sep 4, 2021