Espanso is an open source, cross-platform text Expander.
brew tap espanso/espanso # Espanso is hosted outside the core homebrew repository.
brew install espanso
# Download the "deb" package, https://espanso.org/, Install on Linux
wget ···.deb
# Install the package:
sudo apt install ./espanso-debian-x11-amd64.deb
# Register Espanso as a systemd service:
espanso service register
# Start Espanso
espanso start
:espanso
If you’re using any other Linux distributions, you can use Espanso’s AppImage to get the program up and running on your computer. To install the Espanso’s AppImage, just open a terminal and follow these steps:
You are ready to use espanso. Open any application and type:
:espanso
Espanso uses a file-based configuration approach, type: espanso path to find the path of your configuration folder. Typically: Windows (C:\Users\userName\AppData\Roaming\espanso), macOS (/Users/userName/Library/Preferences/espanso) or Linux (/home/userName/.config/espanso).
There are two folder: config and match. The files contained in the match directory define WHAT Espanso should do (base.yml), i.e., all your snippets and actions. The files contained in the config directory (default.yml) define HOW Espanso should perform its expansions.
matches:
# Personal Information
- trigger: ":name"
replace: "Your Name"
- trigger: ":address"
replace: "Your Address"
- trigger: ":telephone"
replace: "Your Phone"
- trigger: ":email"
replace: "Your Email"
- trigger: ":website"
replace: "https://justtothepoint.com/, Free resources, bilingual e-books and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun."
- trigger: ":social"
replace: "Twitter: @justtothepoint.\nFacebook: https://www.facebook.com/nmaximo7.\nLinkedIn: https://www.linkedin.com/in/justtothepoint"
- trigger: ":signature"
replace: |
'¯\\_(ツ)_/¯'
Your Name.
https://justtothepoint.com/, Free resources, bilingual e-books and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun.
# Date, Time, and Weather
- trigger: ":date"
replace: "{{mydate}}"
vars:
- name: mydate
type: date
params:
format: "%d/%m/%y"
- trigger: :time
replace: "{{time}}"
vars:
- name: time
type: date
params:
format: "%H:%M"
- trigger: ":now"
replace: "It's {{mytime}}"
vars:
- name: mytime
type: date
params:
format: "%H.%M"
- trigger: ":weather"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "curl 'http://wttr.in/?format=3'"
# Inserts common HTML and Markdown elements
- trigger: :hr
replace: '<hr />'
- trigger: :br
replace: '<br />'
- trigger: :div
replace: '<div>$|$</div>'
- trigger: :span
replace: '<span>$|$</span>'
- trigger: :h1
replace: '<h1>$|$</h1>'
- trigger: :h2
replace: '<h2>$|$</h2>'
- trigger: :h3
replace: '<h3>$|$</h3>'
- trigger: :para
replace: '<p>$|$</p>'
- trigger: :sup
replace: '<sup>$|$</sup>'
- trigger: :sub
replace: '<sub>$|$</sub>'
- trigger: :fraction
replace: '<sup>$|$</sup>⁄<sub></sub>'
- trigger: "link"
replace: "[$|$]()"
vars:
- name: "clipboard"
type: "clipboard"
- trigger: ":md-link"
replace: "[$|$]({{clipboard}})"
vars:
- name: "clipboard"
type: "clipboard"
- trigger: ":html-link"
replace: "<a href=\"{{clipboard}}\" />$|$</a>"
vars:
- name: "clipboard"
type: "clipboard"
# Inserts a markdown code block
- trigger: :code
replace: "```\n$|$\n```"
# More shell commands
- trigger: ":ip"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "curl 'https://api.ipify.org'"
- trigger: ":edit"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "gedit ~/.config/espanso/match/base.yml"
- trigger: ":quote"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "fortune"
# Quick search
- trigger: ":duckduckgo"
replace: "https://duckduckgo.com/?q="
- trigger: ":wiki"
replace: "https://en.wikipedia.org/w/?search="
- trigger: ":youtube"
replace: "https://youtube.com/results?q=v"
- trigger: ":google"
replace: "https://google.com/search?q="
Move espanso configuration folder to the Dropbox folder (mv ~/.config/espanso/ ~/Dropbox/).
Create a symbolic link: ln -s ~/Dropbox/espanso ~/.config/espanso/
Synchronization MacOS: rm -rf $HOME/Library/Preferences/espanso/, ln -s “$HOME/Dropbox/espanso” “/$HOME/Library/Preferences/espanso”, espanso restart. We are assuming that $ESPANSO = /$HOME/Library/Preferences/espanso.