JustToThePoint English Website Version
JustToThePoint en español
Skip to main content

Boost Your Productivity with AutoHotkey and Espanso

Amateurs sit and wait for inspiration; the rest of us just get up and go to work, Stephen King.

Give me six hours to chop down a tree, and I will spend the first four sharpening the axe, Abraham Lincoln.

AutoHotkey

AutoHotkey

AutoHotkey is a free, open source macro-creation and automation software utility for Windows that allows users to automate repetitive tasks.

#Requires AutoHotkey v2.0 ; Ensures script runs only under v2.
SendMode "Input" ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory. All relative paths start here.

; ^ = CTRL, # = Win, ! = Alt, + = SHIFT

/* ---------- HOTKEYS ---------- */
^g::Run "chrome" ; This defines a hotkey that triggers when Ctrl+g is pressed and launches Google Chrome browser.

#+d::Shutdown(9) ; Win + Shift + D shuts down and powers off the system

#+q::WinKill "A" ; Win + Shift + q closes the active window

AutoHotkey

Flow Launcher is a quick file search and app launcher for Windows with community-made plugins. Everything helps you locate files and folders by name instantly. Everything can integrate with Flow Launcher.

Espanso

Espanso is an open source, cross-platform text Expander.

You can quickly open the Espanso search bar on macOS by pressing Option + Space (Alt + Space).

Espanso, Productivity

Installation on Windows/macOS.

Let’s install it on Windows. Download and run the installer. You may experience a warning from Windows Smartscreen. Windows protected your PC. Click on More info and then on Run anyway.

# Ubuntu
# 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
# Install Emojis
espanso install actually-all-emojis
# MacOS, brew install espanso
# Configuring Espanso in a dotfile directory and managing via stow
# Structure (stow dir ~/macOS, package Espanso)
~/macOS/
└── Espanso/
    └── Library/
        └── Application Support/
            └── espanso/
                ├── config/
                │   └── default.yml
                └── match/
                    ├── base.yml
                    ├── hugo.yml

                    └── packages/
# Stop the service
espanso stop
# Create Espanso structure
mkdir -p ~/macOS/Espanso/Library/Application\ Support
# Move the existing config into the package 
mv ~/Library/Application\ Support/espanso ~/macOS/Espanso/Library/Application\ Support/espanso

# Stow it
cd ~/macOS
stow --no-folding -t ~ Espanso

# Verify
❯ ls -la ~/Library/Application\ Support/espanso      
lrwxr-xr-x  1 nmaximo7  staff  55  7 Oct 06:35 /Users/nmaximo7/Library/Application Support/espanso -> ../../macOS/Espanso/Library/Application Support/espanso
	:espanso

NixOS

Edit configuration.nix. configuration.nix (system-level) turns espanso on and picks which build of it to install. The Wayland variant matters because GNOME on Wayland needs a different input-injection method than X11 — using the wrong package means triggers silently stop working.

  services.espanso = {
	# It creates and starts the systemd user service that keeps espanso running in the background.
    enable = true;
    # Use the Wayland package variant for GNOME
	# On X11 you'd use plain pkgs.espanso; mixing them up is a common cause of "espanso runs but nothing types" on GNOME/Wayland.
    package = pkgs.espanso-wayland;
  };

Edit home-manager.nix ((user-level) manages your dotfiles):

# It symlink file Y from my dotfiles repo to path X in my home directory.
# The left side, ".config/espanso/match/NAME.yml", is the destination path relative to your home directory
# — so this becomes ~/.config/espanso/match/NAME.yml.
# This is the exact folder espanso watches; every .yml file inside it is auto-loaded, no registration needed elsewhere.
# The right side, .source = "/home/${username}/dotfiles/Espanso/NAME.yml", is the real file
# living in your dotfiles repo (so it's version-controlled and synced across machines).
home.file.".config/espanso/match/base.yml".source      = "/home/${username}/dotfiles/Espanso/base.yml";
home.file.".config/espanso/match/bookmarks.yml".source = "/home/${username}/dotfiles/Espanso/bookmarks.yml";
home.file.".config/espanso/match/hugo.yml".source      = "/home/${username}/dotfiles/Espanso/hugo.yml";
home.file.".config/espanso/match/maths.yml".source     = "/home/${username}/dotfiles/Espanso/maths.yml";
home.file.".config/espanso/match/emojis.yml".source    = "/home/${username}/dotfiles/Espanso/emojis.yml";
home.file.".config/espanso/match/prompts.yml".source   = "/home/${username}/dotfiles/Espanso/prompts.yml";

Making shortcuts easy to remember

I’d suggest to use one consistent prefix per file, so the trigger itself tells you which “device” made it and your muscle memory only has to learn one pattern per category:

# bookmark.yml
matches:
  - trigger: ";bsite"
    replace: "https://justtothepoint.com/"
  - trigger: ";bsitefull"
    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: ";blocal"
    replace: "http://localhost:1313/"
  - trigger: ";bgemini"
    replace: "https://gemini.google.com/app"
	[...]
# base.yml
# Personal information (Fake Name Generator)
matches:
  - trigger: ":name"
    replace: "Cameron S. Phillips"
  - trigger: ":dni"
    replace: "31661375N"
  - trigger: ":phone"
    replace: "688 254 376"
[...]
# hugo.yml, markdown/HTML snippets
  - trigger: ";hpara"
    replace: '<p>$|$</p>'
  - trigger: ";himage"
    replace: '![image info](/maths/image.png)'
[...]
# math.yml, Greek letters + set theory/logic symbol
# LaTeX snippets: fractions, integrals, limits, matrices
- trigger: ";mforall"
    replace: '∀ $\forall$'
  - trigger: ";mint"
    replace: '\int $|$(x)dx'
  - trigger: ";mintdef"
    replace: '\int_{a}^{b} $|$(x)dx'
[...]
# emojis.yml: reactions, kaomoji, love notes...
matches:
  - trigger: ";egm"
    replace: "Good morning. I hope your morning is as bright and gorgeous as your smile."
  - trigger: ";ehappy"
    replace: "(✿´‿`)"
  - trigger: ";eha"
    replace: "Just sayin'… :-)"
[...]
# prompts.yml: your AI prompt templates, expanded with a few more useful ones if you want.
matches:
  # --- Writing & editing ---
  - trigger: ";pclarify"
    replace: "Could you please clarify, proofread, explain, and expand the explanation as much as possible to make it more comprehensive and accessible. Please be precise, verbose, avoid hallucinations, and do not worry about time, but precision. Thank you very much for your aid and support, I do appreciate it."

  - trigger: ";pexplain"
    replace: "Please explain the following concept as simply as possible, as if to someone with no background in the topic, then add a second, more technical explanation for someone with intermediate knowledge: $|$"

  - trigger: ";psummarize"
    replace: "Please summarize the following text into its key points, using short bullet points, without losing any critical detail: $|$"
[...]

Arch & other distributions

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:

  1. Create the $HOME/opt destination folder: mkdir -p ~/opt Install fuse2: sudo pacman -Syu fuse2
  2. Download the AppImage inside this folder: wget -O ~/opt/Espanso.AppImage ‘URL_GITHUB.COM/Espanso.AppImage’
  3. Make the AppImage executable: chmod u+x ~/opt/Espanso.AppImage
  4. Create the “espanso” command alias: sudo ~/opt/Espanso.AppImage env-path register
  5. Register espanso as a systemd service (systemd is a “system and service manager”): espanso service register
  6. Start espanso: espanso start

You are ready to use espanso. Open any application and type:

	:espanso

Configuration

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.

  1. Move espanso configuration folder to the Dropbox folder (mv ~/.config/espanso/ ~/Dropbox/).

  2. Create a symbolic link: ln -s ~/Dropbox/espanso ~/.config/espanso/

  3. 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.

  1. Alicia’s Notes, Using Espanso to boost Efficiency.
  2. Espanso
Bitcoin donation
Children reading and learning

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. About us., Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.