This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Routines to follow the Espanso log for problems, without having to | |
# type `espanso log` every time something goes wrong. | |
# Filters out routine messages. | |
# Linux | |
tail -F ~/.cache/espanso/espanso.log | grep -v "INFO" | |
# Windows | |
Get-Content "$env:LOCALAPPDATA\espanso\espanso.log" -Wait | Where-Object { $_ -notmatch "INFO" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Espanso minimised variables used in a list Form | |
# https://onlineyamltools.com/minify-yaml is helpful | |
- trigger: :td1 | |
replace: "{{Output.Date}}" | |
vars: | |
- {name: Day, type: date, params: {format: '%d'}} | |
- {name: Month, type: date, params: {format: '%m'}} | |
- {name: Year2, type: date, params: {format: '%y'}} | |
- {name: Year4, type: date, params: {format: '%Y'}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- trigger: :test | |
replace: '{{Clipb}} {{Output}}' | |
vars: | |
- name: Clipb | |
type: clipboard | |
- name: Output | |
type: script | |
params: | |
args: | |
- python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A slightly more efficient version of espanso_move.sh which utilises xwininfo. | |
# Espanso doesn't facilitate repositioning of its Search or Choice etc. windows. | |
# If the following script is running in the background, it will await the opening | |
# of the window, and move it to the top left of the screen. | |
# Adjust the middle two coordinates (,0,0,) for a different position, and reduce | |
# the lower sleep value (included to reduce CPU load) if it's too slow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Espanso doesn't support replacements which include delays | |
# A solution is to ignore Espanso's own replace and use another tool to inject characters | |
# Similar methods are available for Windows PowerShell using e.g.: | |
# (New-Object -ComObject wscript.shell).SendKeys | |
# Snippet to inject text using xdotool | |
- trigger: ":xd" | |
replace: "{{output}}" # Redundant placeholder | |
vars: | |
- name: output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Espanso trigger to be used in conjunction with the script test_pynput.py | |
# Uses the Python pynput library to inject text, instead of Espanso. Enables the | |
# addition of pauses (sleep) and <Tab> etc. keys and can include Espanso {{variables}} | |
# See https://pynput.readthedocs.io/en/latest/keyboard.html#controlling-the-keyboard | |
# Supports type, tap, press, release, and sleep | |
# Whilst you can add to the replace:, anything there will be injected AFTER the script's | |
# output | |
- trigger: :delay | |
replace: '{{output}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# espanso configuration file | |
# yaml-language-server: $schema=https://raw.githubusercontent.com/espanso/espanso/dev/schemas/config.schema.json | |
# 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Script to convert Markdown to Plain text, using an Espanso trigger: | |
#!/usr/bin/env pwsh | |
param ( | |
[string]$markdownText | |
) | |
# Function to convert Markdown to plain text | |
function Convert-MarkdownToText { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A case-insensitive trigger expansion with word: true functionality. | |
# Triggered by "example ????", "EXAMPLE ?????", "exaMPLe ????" etc.: | |
- regex: (?i)\bexample(?P<w>\W) | |
replace: Something{{w}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Espanso draft form and output for Bswizzles | |
- trigger: /mse | |
replace: > | |
Client presented as age {{form1.age}} and was {{form1.alert}}. | |
Client was {{form1.calm}} and {{form1.attended}} to the interview. | |
Client was dressed in {{form1.clothing}} clothing appropriate for the | |
setting with {{form1.hygiene}} as though {{form1.not1}} regularly | |
attending to ADLs. | |
Eye contact was {{form1.wnl}}. Speech was {{form1.rtv}}. | |
Client reported mood as {{form1.mood}}. |