Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Espanso inserting images (and text) - various methods
- # 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('~'))
- matches:
- - trigger: :image1
- markdown: |
- some text
- ![](file:///{{home}}/path/to/picture.jpg)
- some more text
- - trigger: :image2
- html: |
- some text
- <img src="file:///{{home}}/path/to/picture.jpg">
- some more text
- # image_path: expansions won't work with variables except $CONFIG (the Espanso
- # directory) so need absolute path specified
- - trigger: :image3
- image_path: $CONFIG/../../path/to/picture.jpg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement