I've been modifying to my taste, the theme kali, from oh my posh.
I encountered the following problem.
I have this segment
{
  "type": "prompt",
  "alignment": "left",
  "segments": [
    {
      "type": "command",
      "style": "plain",
      "foreground": "#ffffff",
      "properties": {
        "shell": "cmd",
        "command": "cmd /C D:\\repos\\zsh-pwsh-wt\\windows-pws-posh\\center.bat"
      },
      "template": "{{ .Output }}"
    }
  ]
},
The point of that segment is to print a line as wide as the window above the main prompt. I do it through cmd because of compatibility issues with pwsh.
The file center.bat works perfectly by its own, prints the line as it should.
The problem is that when I call that script file, the line it prints is shorter than the window width.
Here are examples:
Running the script directly:
Adding the segment/block:
Also, this example scenario:
center.bat by itself the width is 172.omp.json, it is 120.Checking again, it always returns 120 when it runs from the template, despite the window size.
> {
  "$schema": ".json",
  "blocks": [
    {
      "type": "prompt",
      "alignment": "right",
      "segments": [
        {
          "type": "command",
          "style": "plain",
          "foreground": "#ffffff",
          "properties": {
            "shell": "cmd",
            "command": "cmd /C D:\\repos\\zsh-pwsh-wt\\windows-pws-posh\\center.bat"
          },
          "template": "{{ .Output }}"
        }
      ]
    },
    
    {
      "alignment": "left",
      "segments": [
        {
          "properties": { "display_host": true },
          "style": "plain",
          "template": "\n<#ffffff>\u250c\u2500\u2500(</#ffffff><#00FF00>{{ .UserName }}</#00FF00>