Fun with espanso

Thank you @chopivy!

I like this article.

Question from a non-coder:

I’m assuming you need Espanso installed on your machine (I have MacOS 12.5.1) in order for the code at the top of this thread to work?

Once it is installed, is it as simple as copying the code and putting it at the top of my Daily Notes template?

Thanks in advance for your help!

Yes

No. That code needs to be put in Espanso’s file where all the triggers are housed.

BTW, the syntax in the OP for so-called breadcrumbs. Breadcrumbs are now a core feature of Obsidian.

Hi Klass,

Thanks so much for the helpful reply.

A few follow up questions:

  • when you say that the code “needs to be put in Espanso’s file where all the triggers are housed”: how does Obsidian know where to find the triggers?
  • what is ‘OP’?
  • when you say breadcrumbs are now a core feature of Obsidian, do you mean a core plugin? If so, not seeing it. I do see a ‘Breadcrumbs’ community plugin though. Is that it?

Sorry for what I know are very basic questions. Again, non-coder. :no_mouth:

Thanks again for your help…

Obsidian does not know, and does not need to know. If Espanso is running (needs to be done via the terminal), then whenever you type the trigger anywhere (inside and outside Obs), Espanso will replace the trigger with what you have set the full text as.

Original Post

Settings > Appearance > Advanced: Show tab title bar ➙ needs to be enabled/toggled on.

Ah - I see. Yes - thank you!

I think the arrow options of ‘show tab title bar’ provide what I need. Really appreciate your help, Klaus!

Anybody working in Obsidian and Windows11 with Espanso? On my Windows10 machine it works, but not on my Windows11 machine. Same Espanso version (2.1.8), same base.yml.

I’m still using Espanso daily on Win10, Win11, and occasionally Manjaro. Never had an issue with any of them.

A little late to this topic, but I just wanted to say thank you!
I’ve been using espanso for a long time for autocorrect and minimal text expansion (e.g. emails and common commands), but this, this is something else.

I’ve created the below for Windows (PowerShell) and they work amazing. My Daily Notes are dd-MMMM-yyyy format, so this works great for me.

   # Next week
  - trigger: ":nextweek"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(7) | Get-Date -Format dd-MMMM-yyyy)]]")

   # Tomorrow
  - trigger: ":tomorrow"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(1) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # yesterday
  - trigger: ":yesterday"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(-1) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # next Monday
  - trigger: ":>mo"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(8-((Get-Date).DayOfWeek.value__)) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # next Tuesday
  - trigger: ":>tu"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(9-((Get-Date).DayOfWeek.value__)) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # next Wednesday
  - trigger: ":>we"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(10-((Get-Date).DayOfWeek.value__)) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # next Thursday
  - trigger: ":>th"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(11-((Get-Date).DayOfWeek.value__)) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # next Friday
  - trigger: ":>fr"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(12-((Get-Date).DayOfWeek.value__)) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # next Saturday
  - trigger: ":>sa"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(13-((Get-Date).DayOfWeek.value__)) | Get-Date -Format dd-MMMM-yyyy)]]")
          
   # next Sunday
  - trigger: ":>su"
    word: true
    replace: "{{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: (echo "[[$((Get-Date).AddDays(14-((Get-Date).DayOfWeek.value__)) | Get-Date -Format dd-MMMM-yyyy)]]")