Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining Windows Terminal and Oh my Posh leads to black rendered triangles #15491

Closed
mu88 opened this issue Jun 1, 2023 · 5 comments
Closed
Labels
Area-AtlasEngine Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@mu88
Copy link

mu88 commented Jun 1, 2023

Windows Terminal version

1.16.10261.0

Windows build number

10.0.19045.0

Other Software

oh-my-posh 16.4.2

Steps to reproduce

  1. Set background opacity to 50%
  2. Install Oh my Posh
  3. Configure Oh my Posh like this:
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
  {
    "alignment": "left",
    "horizontal_offset": 0,
    "vertical_offset": 0,
    "segments": [
      {
        "background": "#c17e1a",
        "foreground": "#ffffff",
        "powerline_symbol": "",
        "invert_powerline": false,
        "properties": {
            "prefix": "",
            "style": "folder"
        },
        "style": "diamond",
        "leading_diamond": "",
        "trailing_diamond": "",
        "template": " \uea83  {{ .Path }} ",
        "type": "path"
      },
      {
        "background": "#fffb38",
        "background_templates": [
          "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
          "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
          "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
          "{{ if gt .Behind 0 }}#B388FF{{ end }}"
        ],
        "foreground": "#193549",
        "powerline_symbol": "",
        "invert_powerline": false,
        "properties": {
          "branch_max_length": 25,
          "fetch_status": true,
          "fetch_upstream_icon": true
        },
        "style": "powerline",
        "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
        "leading_diamond": "",
        "trailing_diamond": "",
        "type": "git"
      },
      {
        "type": "dotnet",
        "style": "powerline",
        "powerline_symbol": "",
        "invert_powerline": false,
        "foreground": "#ffffff",
        "background": "#6CA35E",
        "template": "  {{ .Full }} "
      },
      {
        "type": "root",
        "style": "powerline",
        "powerline_symbol": "",
        "invert_powerline": false,
        "foreground": "#ffffff",
        "background": "#ffff66",
        "leading_diamond": "",
        "trailing_diamond": "",
        "properties": null
      },
      {
        "background": "#6CA35E",
        "foreground": "#ffffff",
        "powerline_symbol": "\ue0b0",
        "properties": {
          "fetch_version": true
        },
        "style": "powerline",
        "template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
        "type": "node"
      },
      {
        "background": "#8ED1F7",
        "foreground": "#111111",
        "powerline_symbol": "\ue0b0",
        "properties": {
          "fetch_version": true
        },
        "style": "powerline",
        "template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
        "type": "go"
      },
      {
        "background": "#4063D8",
        "foreground": "#111111",
        "powerline_symbol": "\ue0b0",
        "properties": {
          "fetch_version": true
        },
        "style": "powerline",
        "template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
        "type": "julia"
      },
      {
        "background": "#FFDE57",
        "foreground": "#111111",
        "powerline_symbol": "\ue0b0",
        "properties": {
          "display_mode": "files",
          "fetch_virtual_env": false
        },
        "style": "powerline",
        "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
        "type": "python"
      },
      {
        "background": "#AE1401",
        "foreground": "#ffffff",
        "powerline_symbol": "\ue0b0",
        "properties": {
          "display_mode": "files",
          "fetch_version": true
        },
        "style": "powerline",
        "template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
        "type": "ruby"
      },
      {
        "background": "#FEAC19",
        "foreground": "#ffffff",
        "powerline_symbol": "\ue0b0",
        "properties": {
          "display_mode": "files",
          "fetch_version": false
        },
        "style": "powerline",
        "template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
        "type": "azfunc"
      },
      {
        "background_templates": [
          "{{if contains \"default\" .Profile}}#FFA400{{end}}",
          "{{if contains \"jan\" .Profile}}#f1184c{{end}}"
        ],
        "foreground": "#ffffff",
        "powerline_symbol": "\ue0b0",
        "properties": {
          "display_default": false
        },
        "style": "powerline",
        "template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
        "type": "aws"
      },
      {
        "background": "#ffff66",
        "foreground": "#111111",
        "powerline_symbol": "\ue0b0",
        "style": "powerline",
        "template": " \uf0ad ",
        "type": "root"
      },
      {
        "background": "#83769c",
        "foreground": "#ffffff",
        "properties": {
          "always_enabled": true
        },
        "style": "plain",
        "template": "<transparent>\ue0b0</> \ueba2{{ .FormattedMs }}\u2800",
        "type": "executiontime"
      },
      {
        "background": "#00897b",
        "background_templates": [
          "{{ if gt .Code 0 }}#e91e63{{ end }}"
        ],
        "foreground": "#ffffff",
        "properties": {
          "always_enabled": true
        },
        "style": "diamond",
        "template": "<parentBackground>\ue0b0</> \ue23a ",
        "trailing_diamond": "\ue0b4",
        "type": "exit"
      }
    ],
    "type": "prompt"
  },
  {
    "segments": [
      {
        "background": "#0077c2",
        "foreground": "#ffffff",
        "style": "plain",
        "template": "<#0077c2,transparent>\ue0b6</> \uf489 {{ .Name }} <transparent,#0077c2>\ue0b2</>",
        "type": "shell"
      },
      {
        "background": "#1BD760",
        "foreground": "#111111",
        "invert_powerline": true,
        "powerline_symbol": "\ue0b2",
        "properties": {
          "paused_icon": "\uf04c ",
          "playing_icon": "\uf04b "
        },
        "style": "powerline",
        "template": " \uf167 {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} ",
        "type": "ytm"
      },
      {
        "background": "#2e9599",
        "foreground": "#111111",
        "invert_powerline": true,
        "leading_diamond": "\ue0b2",
        "style": "diamond",
        "template": " {{ .CurrentDate | date .Format }} ",
        "trailing_diamond": "\ue0b4",
        "type": "time"
      }
    ],
    "type": "rprompt"
  }
],
"console_title_style": "folder",
"final_space": true,
"version": 2
}

This is what it looks like with my current config:
image

Please notice the tiny little black parts between source and 0ms resp. pwsh and the current time. I created this issue, but the Oh my Posh owner mentioned here that it actually is a WT issue.

I also tried enabling the Atlas rendering engine, but without any visual change.

Expected Behavior

The tiny black triangles are rendered transparently.

Actual Behavior

The tiny triangles are rendered black.

@mu88 mu88 added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 1, 2023
@lhecker
Copy link
Member

lhecker commented Jun 1, 2023

Thanks for the report! I've edited your comment to say that background opacity has to be enabled for this to happen (which is required to trigger the issue).

@lhecker lhecker added Product-Terminal The new Windows Terminal. Area-AtlasEngine labels Jun 1, 2023
@j4james
Copy link
Collaborator

j4james commented Jun 1, 2023

I may be misunderstanding what was said in the oh-my-posh issue, but if they're using a reverse rendition attribute to achieve a transparent foreground color, then this is likely a duplicate of #7014.

@carpet92
Copy link

carpet92 commented Jun 2, 2023

Isn't the new AtlasEngine supposed to solve this problem?

@DHowett
Copy link
Member

DHowett commented Jun 2, 2023

The new rendering engine was not intended to solve the problem of having transparent foreground characters! 😄

It might help us to do so, however.

@DHowett
Copy link
Member

DHowett commented Jun 2, 2023

This does look like a /duplicate of #7014, however. Thanks for finding it, James!

@microsoft-github-policy-service microsoft-github-policy-service bot added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AtlasEngine Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

5 participants