Advertisement
smeech

OS-independent variable setting

May 3rd, 2024
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.38 KB | None | 0 0
  1. # Set an Espanso global variable for the system "HOME" directory, regardless of OS
  2. # to avoid the need to use `filter_os:`, as Espanso can only use ONE app-specific
  3. # configuration at a time.
  4. # Requires Python
  5.  
  6. global_vars:
  7.   - name: home
  8.     type: script
  9.     params:
  10.       args: [python, -c, print(__import__('os').path.expanduser('~'))]
  11.  
  12.   - trigger: :home
  13.     replace: "{{home}}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement