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 Html and Markdown examples, including the injection of images: | |
| # Define a variable containing the location of the home directory | |
| global_vars: | |
| - name: home | |
| type: script | |
| params: | |
| args: | |
| - python | |
| - -c | |
| - print(__import__('os').path.expanduser('~')) |
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 check-boxes | |
| matches: | |
| - trigger: :test | |
| replace: "{{form1.flag}}" | |
| vars: | |
| - name: form1 | |
| type: form | |
| params: | |
| layout: "Option A: [[flag]]" | |
| fields: |
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 clipboard manipulation, new version to select relevant script | |
| # line using the choice extension id: parameters. | |
| # To use, copy the text in question and type ":case". | |
| - trigger: :case | |
| label: Modify and paste copied text | |
| replace: '{{Output}}' | |
| vars: | |
| - name: Clipb |
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
| # From https://github.com/espanso/espanso/discussions/1908 | |
| matches: | |
| - trigger: :test | |
| replace: "{{output}}" | |
| vars: | |
| - 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
| # Python script to add Espanso trigger:/replace: pairs | |
| # Usage: python espanso_add.py <trigger> <replace> [filename] | |
| import subprocess | |
| import sys | |
| import os | |
| def append_to_file(trigger, replace, filename): | |
| # Set default filename if not provided | |
| if not filename: |
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
| matches: | |
| - trigger: :testclip | |
| replace: something | |
| force_mode: clipboard | |
| # If this one works, you'll probably need an app-specific configuration | |
| # for the filter_class:, _exec: or _title: (in that order of preference) | |
| # specifying "backend: clipboard" | |
| - trigger: :testinject |
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
| # Set an Espanso global variable for the system "HOME" directory, regardless of OS | |
| # to avoid the need to use `filter_os:`, as Espanso can only use ONE app-specific | |
| # configuration at a time. | |
| # Requires Python | |
| global_vars: | |
| - name: home | |
| type: script | |
| params: | |
| args: [python, -c, print(__import__('os').path.expanduser('~'))] |
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 snippets to return offset date from today | |
| # It was pointed out that my v1 didn't allow for different length months and years. | |
| # Thanks to @StewCam on Discord https://discord.com/channels/884163483409731584/1013914627886817372/1251704970080944189 | |
| # Here are five updated versions which do. | |
| # Pick one and type e.g.: +2w, -3m etc. | |
| # Bash version for Linux. For macOS Bash or Zsh see the discussion below | |
| - regex: (?P<Offset>[+-]\d+)(?P<Unit>[dwmy]) | |
| replace: "{{Output}}" | |
| label: Bash Offset date |
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
| # yaml-language-server: https://github.com/espanso/espanso/blob/dev/schemas/match.schema.json | |
| # OASIS-IS ChatGPT framework Form. OASIS-IS stands for : O-bjective, A-rchtype, -S-etting, I-llustrations, S-tyle, - , I-nterpretation, S-pecification. | |
| # After those steps are Evalute - How good was the response, give your chatbot feedback, and then Banter - Continue the conversation. | |
| # Paid ChatGPT users can use the current list of models avaialble while unpaid can use the default model. | |
| # The frameworks spreadsheet can be found here: http://3dmkf.com/pace-oasis | |
| # This first one, is meant to generate a prompt. Run :oasis from a URL in a web browser, fill out the form and submit it, then press enter. It wiss pass the prompt to ChatGPT. | |
| global_vars: |
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 output time and date in another timezone | |
| # Requires Python and its pytz library | |
| matches: | |
| - trigger: :tzdate | |
| replace: '{{output}}' | |
| vars: | |
| - name: zones | |
| type: script | |
| params: |