JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.4k stars 2.38k forks source link

In 19.3.1+ OS Segment powerline not transparent if its the first segment #4594

Closed KiLLeRRaT closed 10 months ago

KiLLeRRaT commented 10 months ago

Code of Conduct

What happened?

In 19.3.1 my OS segment started showing a grey preceding powerline instead of a transparent one. Going back to 19.3.0 it is still working as it should.

How I understand the documentation here: https://ohmyposh.dev/docs/configuration/segment#powerline it shows is it should indeed be transparent if it's the first segment.

19.3.0

image

19.3.1

image

What I've Tried

I've tried to comment out all segments before my OS segment. That didn't work.

If I set my segement background to red, it works as it should (except that I don't want red, I want transparent. image

Full Config

# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json

blocks:
    - alignment: left
      segments:
        - type: exit
          # background: '#f7768e'
          background: '#C61C6F'
          foreground: '#ffffff'
          style: powerline
          template: ' {{ if gt .Code 0 }} {{ .Meaning }}{{ else }}{{ end }} '

        - type: root
          background: '#3b4261'
          foreground: '#A57706'
          powerline_symbol: 
          style: powerline
          template: '  '

        - type: os
          background: "transparent"
          template: " {{ if .WSL }}WSL {{ end }}{{.Icon}} "
          powerline_symbol: 
          style: powerline
          foreground: "#ffffff"

        - type: session
          background: '#c792ea'
          # foreground: '#FFFFFF'
          foreground: '#3b4261'
          powerline_symbol: 
          properties:
            folder_icon: 
            style: full
          style: powerline
          template: ' {{ if .SSHSession }}{{ .UserName }}@{{ .HostName }} {{ end }}'

        # - type: docker
        #   background: "#0B59E7"
        #   foreground: "#000000"
        #   powerline_symbol: 
        #   style: powerline
        #   template: "  {{ .Context }} "

        # - type: path
        #   background: '#c792ea'
        #   foreground: '#3b4261'
        #   powerline_symbol: 
        #   properties:
        #     folder_icon: 
        #     style: full
        #   style: powerline
        #   template: ' {{ .Path }} '

        - type: path
          background: '#c792ea'
          foreground: '#3b4261'
          powerline_symbol: 
          properties:
            folder_icon: 
            style: full
            mapped_locations:
              "~/source": ""
              "~/source-aur": "a"
              "~/source-g": "g"
              "~/source-github": "gh"
              "~/source-local": "l"
          style: powerline
          template: ' {{ .Path }} '

        - type: git
          foreground: '#c792ea'
          foreground_templates:
            - '{{ if or (.Working.Changed) (.Staging.Changed) }}#c792ea{{ end }}'
            - '{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}'
            - '{{ if gt .Ahead 0 }}#ffffff{{ end }}'
            - '{{ if gt .Behind 0 }}#ffffff{{ end }}'

          background: '#3b4261'
          background_templates:
            - '{{ if or (.Working.Changed) (.Staging.Changed) }}#545c7e{{ end }}'
            - '{{ if and (gt .Ahead 0) (gt .Behind 0) }}#C61C6F{{ end }}'
            - '{{ if gt .Ahead 0 }}#C61C6F{{ end }}'
            - '{{ if gt .Behind 0 }}#C61C6F{{ end }}'
          powerline_symbol: 
          properties:
            fetch_stash_count: true
            fetch_status: true
            fetch_upstream_icon: false
          style: powerline
          template: ' {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}  {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}}  {{ .WorktreeCount }}{{ end }} '

        - type: python
          background: '#906cff'
          foreground: '#100e23'
          powerline_symbol: 
          style: powerline
          template: '  {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} '
      type: prompt

    - alignment: right
      segments:

        - type: executiontime
          background: '#3b4261'
          foreground: '#c792ea'
          style: diamond
          leading_diamond: 
          template: ' {{ .FormattedMs }} '

          properties:
            threshold: 500
            style: "austin"
            always_enabled: true
        - type: time
          background: '#c792ea'
          foreground: '#3b4261'
          style: diamond
          trailing_diamond: 
          template: ' {{ .CurrentDate | date .Format }}'
          properties:
            time_format: 15:04
      type: prompt

    # Adds a newline character after my statuslines
    - type: prompt
      alignment: left
      newline: true
      segments:
        - foreground: '#007ACC'
          style: plain
          template: '❯ '
          type: text

console_title_template: '{{if .Root }}Adm:{{end}}{{ .PWD }}'
osc99: true
version: 2

Thanks for your time.

Theme

Please see my full config.

What OS are you seeing the problem on?

Linux

Which shell are you using?

zsh

Log output

   a/oh-my-posh  master ≡  ?16                                                                                                0ms  10:34
❯ oh-my-posh debug --plain

Version: 19.3.1

Shell: zsh (5.9)

Prompt:

   a/oh-my-posh  master ≡  ?16                                                                                                0ms  10:35
❯

Segments:

ConsoleTitle(true)                         -   0 ms
Exit(false)                                -   0 ms
Root(false)                                -   0 ms
Os(true)                                   -   0 ms
Session(false)                             -   1 ms
Path(true)                                 -   0 ms
Git(true)                                  -   1 ms
Python(false)                              -   0 ms
Executiontime(true)                        -   0 ms
Time(true)                                 -   0 ms
Text(true)                                 -   0 ms

Run duration: 6.464302ms

Cache path: /home/albert/.cache/oh-my-posh

Config path: /home/albert/.omp/themes/tokyonight.omp.yaml

Logs:

[DEBUG] 10:35:38.082 shell.go:Getenv:399 → tmux
[TRACE] 10:35:38.082 shell.go:Getenv(TERM_PROGRAM) - 24.93µs
[DEBUG] 10:35:38.082 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.082 shell.go:Getenv(OMP_CACHE_DIR) - 1.85µs
[DEBUG] 10:35:38.082 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.082 shell.go:Getenv(XDG_CACHE_HOME) - 1.37µs
[TRACE] 10:35:38.082 shell_unix.go:CachePath() - 14.38µs
[DEBUG] 10:35:38.083 shell.go:Getenv:399 → /home/albert/.omp/themes/tokyonight.omp.yaml
[TRACE] 10:35:38.083 shell.go:Getenv(POSH_THEME) - 2.72µs
[DEBUG] 10:35:38.083 shell_unix.go:Platform:77 → arch
[TRACE] 10:35:38.083 shell.go:resolveConfigPath() - 10.23µs
[TRACE] 10:35:38.083 shell.go:Init() - 100.67µs
[TRACE] 10:35:38.083 shell.go:Flags() - 30ns
[TRACE] 10:35:38.084 config.go:loadConfig() - 1.62916ms
[TRACE] 10:35:38.084 shell.go:Flags() - 50ns
[DEBUG] 10:35:38.084 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.084 shell.go:Getenv(OMP_CACHE_DISABLED) - 2.46µs
[DEBUG] 10:35:38.084 shell.go:Shell:662 → no shell name provided in flags, trying to detect it
[DEBUG] 10:35:38.085 shell.go:Shell:670 → process name: zsh
[TRACE] 10:35:38.085 shell.go:Shell() - 711.33µs
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → 5.9
[TRACE] 10:35:38.085 shell.go:Getenv(POSH_SHELL_VERSION) - 1.97µs
[DEBUG] 10:35:38.085 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 10:35:38.085 text.go:Render:70 → Rendering template: {{if .Root }}Adm:{{end}}{{ .PWD }}
[TRACE] 10:35:38.085 shell_unix.go:Root() - 280ns
[TRACE] 10:35:38.085 shell.go:Shell() - 60ns
[TRACE] 10:35:38.085 shell.go:StatusCodes() - 40ns
[DEBUG] 10:35:38.085 shell_unix.go:IsWsl:35 → false
[TRACE] 10:35:38.085 shell_unix.go:IsWsl() - 2.49µs
[DEBUG] 10:35:38.085 shell.go:TemplateCache:843 → environment: [ALACRITTY_LOG=/tmp/Alacritty-3022.log ALACRITTY_SOCKET=/run/user/1000/Alacritty-:0-3022.sock ALACRITTY_WINDOW_ID=29360131 COLORTERM=truecolor CONDA_EXE=/usr/bin/conda CONDA_SHLVL=0 CUDA_PATH=/opt/cuda DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEBUGINFOD_URLS=https://debuginfod.archlinux.org  DESKTOP_SESSION=i3 DISPLAY=:0 GDMSESSION=i3 GTK3_MODULES=xapp-gtk3-module GTK_MODULES=canberra-gtk-module HOME=/home/albert I3SOCK=/run/user/1000/i3/ipc-socket.2937 LANG=en_NZ.UTF-8 LOGNAME=albert MAIL=/var/spool/mail/albert MKLROOT=/opt/intel/oneapi/mkl/latest MOTD_SHOWN=pam NVCC_PREPEND_FLAGS=-ccbin /opt/cuda/bin OLDPWD=/home/albert/source-aur PATH=/home/albert/.ebcli-virtual-env/executables:/home/albert/.nvm/versions/node/v18.18.2/bin:/home/albert/.ebcli-virtual-env/executables:/usr/condabin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/albert/.dotnet/tools:/home/albert/.dotnet/tools PWD=/home/albert/source-aur/oh-my-posh SHELL=/bin/zsh SHLVL=1 TERM=screen-256color TERM_PROGRAM=tmux TERM_PROGRAM_VERSION=3.3a TMUX=/tmp/tmux-1000/default,3086,2 TMUX_PANE=%51 TMUX_PLUGIN_MANAGER_PATH=/home/albert/.tmux/plugins/ USER=albert WINDOWID=10485763 XAUTHORITY=/home/albert/.Xauthority XDG_CURRENT_DESKTOP=i3 XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/albert XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=i3 XDG_SESSION_ID=2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 _=/usr/bin/oh-my-posh color_dark=colour232 color_light=white color_status_text=colour245 color_window_off_status_bg=colour238 color_window_off_status_current_bg=colour254 tmux_accent=colour1 tmux_activity_color=colour3 tmux_current_title_fg=colour2 tmux_status_bg=#232433 tmux_status_bg_1=colour8 tmux_status_bg_2=colour4 tmux_status_fg=colour7 tmux_status_fg_1=colour4 tmux_status_fg_2=colour0 wg_is_keys_off=#[fg=white,bg=]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default] HISTFILE=/home/albert/.zsh_history HISTSIZE=100000 SAVEHIST=100000 EDITOR=/usr/bin/nvim VISUAL=/usr/bin/nvim POSH_THEME=/home/albert/.omp/themes/tokyonight.omp.yaml POSH_SHELL_VERSION=5.9 POSH_PID=42232 POWERLINE_COMMAND=oh-my-posh CONDA_PROMPT_MODIFIER=false POSH_PROMPT_COUNT=20 NVM_DIR=/home/albert/.nvm NVM_CD_FLAGS=-q NVM_BIN=/home/albert/.nvm/versions/node/v18.18.2/bin NVM_INC=/home/albert/.nvm/versions/node/v18.18.2/include/node CUDA_HOME=/opt/cuda/]
[TRACE] 10:35:38.085 shell.go:GOOS() - 40ns
[DEBUG] 10:35:38.085 shell.go:Pwd:429 → /home/albert/source-aur/oh-my-posh
[TRACE] 10:35:38.085 shell.go:Pwd() - 9.17µs
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 20ns
[DEBUG] 10:35:38.085 shell.go:User:564 → albert
[TRACE] 10:35:38.085 shell.go:User() - 6.13µs
[DEBUG] 10:35:38.085 shell.go:Host:576 → arch-agouws
[TRACE] 10:35:38.085 shell.go:Host() - 2.57µs
[TRACE] 10:35:38.085 shell.go:GOOS() - 30ns
[DEBUG] 10:35:38.085 shell_unix.go:Platform:77 → arch
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → 1
[TRACE] 10:35:38.085 shell.go:Getenv(SHLVL) - 1.6µs
[TRACE] 10:35:38.085 shell.go:TemplateCache() - 77.26µs
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.085 shell.go:Getenv(POSH_CURSOR_LINE) - 1.57µs
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.085 shell.go:Getenv(POSH_CURSOR_COLUMN) - 2.94µs
[TRACE] 10:35:38.085 shell.go:Flags() - 30ns
[TRACE] 10:35:38.085 shell.go:Flags() - 20ns
[TRACE] 10:35:38.085 shell.go:Shell() - 30ns
[TRACE] 10:35:38.085 shell.go:Shell() - 20ns
[TRACE] 10:35:38.085 shell.go:Flags() - 40ns
[TRACE] 10:35:38.085 shell.go:Flags() - 180ns
[TRACE] 10:35:38.085 shell.go:Flags() - 180ns
[TRACE] 10:35:38.085 shell.go:Pwd() - 110ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 50ns
[DEBUG] 10:35:38.085 properties.go:GetString:28 → environment
[DEBUG] 10:35:38.085 segment.go:SetEnabled:512 → Segment: Os
[TRACE] 10:35:38.085 shell.go:Pwd() - 60ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 30ns
[DEBUG] 10:35:38.085 properties.go:GetString:28 → {{ .Code }}
[DEBUG] 10:35:38.085 segment.go:SetEnabled:512 → Segment: Python
[DEBUG] 10:35:38.085 shell_unix.go:Platform:77 → arch
[TRACE] 10:35:38.085 shell.go:GOOS() - 50ns
[DEBUG] 10:35:38.085 segment.go:SetEnabled:512 → Segment: Exit
[TRACE] 10:35:38.085 shell.go:StatusCodes() - 80ns
[DEBUG] 10:35:38.085 text.go:Render:70 → Rendering template: {{ .Code }}
[DEBUG] 10:35:38.085 properties.go:GetBool:22 → display_distro_name: false
[DEBUG] 10:35:38.085 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 10:35:38.085 properties.go:GetString:28 → 
[DEBUG] 10:35:38.085 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv venv-win pyenv-win]
[DEBUG] 10:35:38.085 properties.go:GetBool:22 → home_enabled: false
[TRACE] 10:35:38.085 shell.go:TemplateCache() - 120ns
[TRACE] 10:35:38.085 shell.go:Pwd() - 40ns
[DEBUG] 10:35:38.085 properties.go:GetBool:22 → fetch_virtual_env: true
[TRACE] 10:35:38.085 shell.go:Flags() - 180ns
[TRACE] 10:35:38.085 shell.go:Flags() - 260ns
[TRACE] 10:35:38.085 shell.go:Flags() - 260ns
[TRACE] 10:35:38.085 shell.go:Pwd() - 130ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 50ns
[TRACE] 10:35:38.085 shell.go:Pwd() - 180ns
[DEBUG] 10:35:38.085 segment.go:SetEnabled:512 → Segment: Session
[TRACE] 10:35:38.085 shell.go:Pwd() - 170ns
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.085 shell.go:GOOS() - 70ns
[TRACE] 10:35:38.085 shell.go:Getenv(SSH_CONNECTION) - 3.04µs
[TRACE] 10:35:38.085 shell.go:GOOS() - 70ns
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → NO DATA
[DEBUG] 10:35:38.085 segment.go:SetEnabled:512 → Segment: Path
[TRACE] 10:35:38.085 shell.go:Getenv(SSH_CLIENT) - 2.13µs
[DEBUG] 10:35:38.085 shell.go:CommandPath:615 → /usr/bin/python
[DEBUG] 10:35:38.085 segment.go:SetEnabled:512 → Segment: Root
[TRACE] 10:35:38.085 shell.go:CommandPath(python) - 31.02µs
[DEBUG] 10:35:38.085 shell_unix.go:Platform:77 → arch
[TRACE] 10:35:38.085 shell.go:Pwd() - 60ns
[TRACE] 10:35:38.085 shell.go:Shell() - 80ns
[DEBUG] 10:35:38.085 shell.go:HasFilesInDir:479 → false
[TRACE] 10:35:38.085 shell.go:HasFilesInDir(pyvenv.cfg) - 10.08µs
[TRACE] 10:35:38.085 shell_unix.go:Root() - 590ns
[TRACE] 10:35:38.085 shell.go:Shell() - 50ns
[TRACE] 10:35:38.085 shell.go:Flags() - 170ns
[DEBUG] 10:35:38.085 shell.go:HasFilesInDir:479 → false
[TRACE] 10:35:38.085 shell.go:HasFilesInDir(pyvenv.cfg) - 3.42µs
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.085 shell.go:Getenv(VIRTUAL_ENV) - 1.52µs
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.085 shell.go:Getenv(CONDA_ENV_PATH) - 1.35µs
[DEBUG] 10:35:38.085 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.085 shell.go:Pwd() - 110ns
[TRACE] 10:35:38.085 shell.go:Getenv(CONDA_DEFAULT_ENV) - 1.28µs
[TRACE] 10:35:38.085 shell.go:GOOS() - 40ns
[DEBUG] 10:35:38.085 segment.go:SetEnabled:512 → Segment: Git
[DEBUG] 10:35:38.085 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 10:35:38.085 shell_unix.go:IsWsl:35 → false
[TRACE] 10:35:38.085 shell_unix.go:IsWsl() - 3.31µs
[DEBUG] 10:35:38.085 properties.go:GetString:28 → 
[TRACE] 10:35:38.085 shell_unix.go:IsWsl2() - 5.96µs
[TRACE] 10:35:38.085 shell.go:GOOS() - 40ns
[DEBUG] 10:35:38.085 properties.go:GetString:28 → 
[TRACE] 10:35:38.085 shell.go:GOOS() - 60ns
[DEBUG] 10:35:38.085 properties.go:GetString:28 → ~
[DEBUG] 10:35:38.085 properties.go:GetKeyValueMap:46 → mapped_locations: map[~/source: ~/source-aur:a ~/source-g:g ~/source-github:gh ~/source-local:l]
[DEBUG] 10:35:38.085 text.go:Render:70 → Rendering template: ~/source-g
[TRACE] 10:35:38.085 shell.go:GOOS() - 70ns
[DEBUG] 10:35:38.085 text.go:Render:70 → Rendering template: ~/source-github
[TRACE] 10:35:38.085 shell.go:GOOS() - 60ns
[DEBUG] 10:35:38.085 text.go:Render:70 → Rendering template: ~/source-local
[TRACE] 10:35:38.085 shell.go:GOOS() - 60ns
[DEBUG] 10:35:38.085 text.go:Render:70 → Rendering template: ~/source
[TRACE] 10:35:38.085 shell.go:GOOS() - 60ns
[DEBUG] 10:35:38.085 text.go:Render:70 → Rendering template: ~/source-aur
[TRACE] 10:35:38.085 shell.go:GOOS() - 60ns
[TRACE] 10:35:38.085 shell.go:PathSeparator() - 80ns
[TRACE] 10:35:38.085 shell.go:GOOS() - 60ns
[DEBUG] 10:35:38.085 shell.go:CommandPath:615 → /usr/bin/git
[TRACE] 10:35:38.086 shell.go:CommandPath(git) - 219.86µs
[TRACE] 10:35:38.086 shell.go:GOOS() - 60ns
[TRACE] 10:35:38.086 shell.go:HasCommand(git) - 223.94µs
[TRACE] 10:35:38.086 shell.go:Pwd() - 70ns
[TRACE] 10:35:38.086 shell.go:HasParentFilePath(.git) - 17.67µs
[DEBUG] 10:35:38.086 properties.go:GetStringArray:52 → exclude_folders: []
[TRACE] 10:35:38.086 shell.go:GOOS() - 60ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 120ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[DEBUG] 10:35:38.086 properties.go:GetBool:22 → fetch_user: false
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 40ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 40ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 20ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 20ns
[DEBUG] 10:35:38.086 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.086 shell.go:Getenv(POSH_GIT_STATUS) - 1.91µs
[DEBUG] 10:35:38.086 properties.go:GetBool:22 → fetch_status: true
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[DEBUG] 10:35:38.086 properties.go:GetStringArray:52 → ignore_status: []
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 80ns
[DEBUG] 10:35:38.086 properties.go:GetKeyValueMap:46 → status_formats: map[]
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 50ns
[DEBUG] 10:35:38.086 properties.go:GetKeyValueMap:46 → untracked_modes: map[]
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[DEBUG] 10:35:38.086 properties.go:GetKeyValueMap:46 → ignore_submodules: map[]
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:TemplateCache() - 200ns
[TRACE] 10:35:38.086 properties.go:GetBool:22 → always_enabled: false
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 40ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 30ns
[TRACE] 10:35:38.086 shell.go:GOOS() - 40ns
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 40ns
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 40ns
[DEBUG] 10:35:38.086 properties.go:GetString:28 → full
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 40ns
[DEBUG] 10:35:38.086 properties.go:GetStringArray:52 → cycle: []
[DEBUG] 10:35:38.086 properties.go:GetString:28 → NO DATA
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 40ns
[DEBUG] 10:35:38.086 properties.go:GetString:28 → /
[DEBUG] 10:35:38.086 properties.go:GetBool:22 → cycle_folder_separator: false
[DEBUG] 10:35:38.086 properties.go:GetString:28 → %s
[DEBUG] 10:35:38.086 properties.go:GetString:28 → %s
[TRACE] 10:35:38.086 shell.go:PathSeparator() - 30ns
[TRACE] 10:35:38.086 shell.go:Pwd() - 80ns
[DEBUG] 10:35:38.086 shell_unix.go:IsWsl:35 → false
[TRACE] 10:35:38.086 shell_unix.go:IsWsl() - 3.02µs
[TRACE] 10:35:38.086 shell.go:StackCount() - 70ns
[TRACE] 10:35:38.086 shell_unix.go:DirIsWritable(/home/albert/source-aur/oh-my-posh) - 3.89µs
[TRACE] 10:35:38.086 shell.go:TemplateCache() - 130ns
[DEBUG] 10:35:38.086 shell.go:RunCommand:594 → NO DATA
[TRACE] 10:35:38.086 shell.go:RunCommand(who am i) - 977.04µs
[TRACE] 10:35:38.086 shell.go:TemplateCache() - 80ns
[DEBUG] 10:35:38.087 shell.go:RunCommand:594 ↓
    # branch.oid 61bdd3114d2e19aa592908613db02eb998cb0a49
    # branch.head master
    # branch.upstream origin/master
    # branch.ab +0 -0
    ? oh-my-posh-18.23.2-1-x86_64.pkg.tar.zst
    ? oh-my-posh-18.23.2.tar.gz
    ? oh-my-posh-18.25.0-1-x86_64.pkg.tar.zst
    ? oh-my-posh-18.25.0.tar.gz
    ? oh-my-posh-18.26.1-1-x86_64.pkg.tar.zst
    ? oh-my-posh-18.26.1.tar.gz
    ? oh-my-posh-19.2.1-1-x86_64.pkg.tar.zst
    ? oh-my-posh-19.2.1.tar.gz
    ? oh-my-posh-19.3.0-1-x86_64.pkg.tar.zst
    ? oh-my-posh-19.3.0.tar.gz
    ? oh-my-posh-19.3.1-1-x86_64.pkg.tar.zst
    ? oh-my-posh-19.3.1.tar.gz
    ? oh-my-posh-19.4.0-1-x86_64.pkg.tar.zst
    ? oh-my-posh-19.4.0.tar.gz
    ? pkg/
    ? src/
[TRACE] 10:35:38.087 shell.go:RunCommand(git -C /home/albert/source-aur/oh-my-posh --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 1.52909ms
[DEBUG] 10:35:38.087 properties.go:GetString:28 → 
[DEBUG] 10:35:38.087 properties.go:GetInt:40 → branch_max_length: 0
[DEBUG] 10:35:38.087 shell.go:HasFolder:508 → false
[TRACE] 10:35:38.087 shell.go:HasFolder(/home/albert/source-aur/oh-my-posh/.git/rebase-merge) - 6.39µs
[DEBUG] 10:35:38.087 shell.go:HasFolder:508 → false
[TRACE] 10:35:38.087 shell.go:HasFolder(/home/albert/source-aur/oh-my-posh/.git/rebase-apply) - 4.12µs
[DEBUG] 10:35:38.087 properties.go:GetString:28 → 
[DEBUG] 10:35:38.087 shell.go:HasFilesInDir:479 → false
[TRACE] 10:35:38.087 shell.go:HasFilesInDir(MERGE_MSG) - 6.07µs
[DEBUG] 10:35:38.087 shell.go:HasFilesInDir:479 → false
[TRACE] 10:35:38.087 shell.go:HasFilesInDir(CHERRY_PICK_HEAD) - 7.74µs
[DEBUG] 10:35:38.087 shell.go:HasFilesInDir:479 → false
[TRACE] 10:35:38.087 shell.go:HasFilesInDir(REVERT_HEAD) - 7.08µs
[DEBUG] 10:35:38.087 shell.go:HasFilesInDir:479 → false
[TRACE] 10:35:38.087 shell.go:HasFilesInDir(sequencer/todo) - 4.96µs
[DEBUG] 10:35:38.087 properties.go:GetString:28 → ≡
[DEBUG] 10:35:38.087 properties.go:GetBool:22 → fetch_upstream_icon: false
[TRACE] 10:35:38.087 shell.go:TemplateCache() - 130ns
[DEBUG] 10:35:38.087 text.go:Render:70 → Rendering template:  {{ if .WSL }}WSL {{ end }}{{.Icon}}
[DEBUG] 10:35:38.087 text.go:Render:70 → Rendering template:  {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}  {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}}  {{ .WorktreeCount }}{{ end }}
[DEBUG] 10:35:38.087 text.go:Render:70 → Rendering template:  {{ .Path }}
[DEBUG] 10:35:38.087 text.go:Render:70 → Rendering template:  {{ if .SSHSession }}{{ .UserName }}@{{ .HostName }} {{ end }}
[TRACE] 10:35:38.087 shell.go:TemplateCache() - 170ns
[TRACE] 10:35:38.088 shell.go:Shell() - 70ns
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 190ns
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 200ns
[TRACE] 10:35:38.088 shell.go:Shell() - 230ns
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 90ns
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 60ns
[TRACE] 10:35:38.088 shell.go:Shell() - 120ns
[ERROR] 10:35:38.088 shell.go:FileContent:534 → open /home/albert/source-aur/oh-my-posh/.git/logs/refs/stash: no such file or directory
[TRACE] 10:35:38.088 shell.go:FileContent(/home/albert/source-aur/oh-my-posh/.git/logs/refs/stash) - 10.02µs
[DEBUG] 10:35:38.088 shell.go:HasFolder:508 → false
[TRACE] 10:35:38.088 shell.go:HasFolder(/home/albert/source-aur/oh-my-posh/.git/worktrees) - 4.63µs
[TRACE] 10:35:38.088 shell.go:Shell() - 60ns
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: {{ if or (.Working.Changed) (.Staging.Changed) }}#545c7e{{ end }}
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 100ns
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: {{ if or (.Working.Changed) (.Staging.Changed) }}#c792ea{{ end }}
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 50ns
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: powerline
[TRACE] 10:35:38.088 shell.go:Shell() - 30ns
[TRACE] 10:35:38.088 shell.go:Shell() - 20ns
[TRACE] 10:35:38.088 shell.go:Shell() - 30ns
[TRACE] 10:35:38.088 shell.go:Shell() - 30ns
[TRACE] 10:35:38.088 shell.go:Flags() - 40ns
[TRACE] 10:35:38.088 shell.go:Pwd() - 70ns
[TRACE] 10:35:38.088 shell.go:Flags() - 50ns
[TRACE] 10:35:38.088 shell.go:GOOS() - 30ns
[DEBUG] 10:35:38.088 segment.go:SetEnabled:512 → Segment: Time
[DEBUG] 10:35:38.088 properties.go:GetString:28 → 15:04
[TRACE] 10:35:38.088 shell.go:Pwd() - 70ns
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 30ns
[TRACE] 10:35:38.088 shell.go:GOOS() - 240ns
[DEBUG] 10:35:38.088 segment.go:SetEnabled:512 → Segment: Executiontime
[DEBUG] 10:35:38.088 properties.go:GetBool:22 → always_enabled: true
[TRACE] 10:35:38.088 shell.go:ExecutionTime() - 70ns
[DEBUG] 10:35:38.088 properties.go:GetFloat64:34 → threshold: 500.000000
[DEBUG] 10:35:38.088 properties.go:GetString:28 → austin
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 80ns
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template:  {{ .FormattedMs }}
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template:  {{ .CurrentDate | date .Format }}
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 60ns
[TRACE] 10:35:38.088 shell.go:Shell() - 60ns
[TRACE] 10:35:38.088 shell.go:TemplateCache() - 110ns
[TRACE] 10:35:38.088 shell.go:Shell() - 90ns
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: diamond
[DEBUG] 10:35:38.088 text.go:Render:70 → Rendering template: diamond
[TRACE] 10:35:38.088 shell.go:Shell() - 40ns
[DEBUG] 10:35:38.089 shell_unix.go:TerminalWidth:70 → terminal width: 147
[TRACE] 10:35:38.089 shell_unix.go:TerminalWidth() - 647.601µs
[TRACE] 10:35:38.089 shell.go:Shell() - 40ns
[TRACE] 10:35:38.089 shell.go:Shell() - 30ns
[TRACE] 10:35:38.089 shell.go:Shell() - 20ns
[TRACE] 10:35:38.089 shell.go:Shell() - 30ns
[TRACE] 10:35:38.089 shell.go:Flags() - 30ns
[TRACE] 10:35:38.089 shell.go:Pwd() - 60ns
[TRACE] 10:35:38.089 shell.go:GOOS() - 40ns
[DEBUG] 10:35:38.089 segment.go:SetEnabled:512 → Segment: Text
[TRACE] 10:35:38.089 shell.go:TemplateCache() - 50ns
[DEBUG] 10:35:38.089 text.go:Render:70 → Rendering template: ❯
[TRACE] 10:35:38.089 shell.go:Shell() - 20ns
[DEBUG] 10:35:38.089 shell.go:Getenv:399 → tmux
[TRACE] 10:35:38.089 shell.go:Getenv(TERM_PROGRAM) - 3.46µs
[DEBUG] 10:35:38.089 text.go:Render:70 → Rendering template: plain
[TRACE] 10:35:38.089 shell.go:Shell() - 30ns
[TRACE] 10:35:38.089 shell.go:Shell() - 30ns
[TRACE] 10:35:38.089 shell.go:Flags() - 20ns
[TRACE] 10:35:38.089 shell.go:Shell() - 30ns
[TRACE] 10:35:38.089 shell.go:Pwd() - 40ns
[TRACE] 10:35:38.089 shell.go:Shell() - 20ns
[TRACE] 10:35:38.089 shell.go:Shell() - 20ns
[TRACE] 10:35:38.089 shell.go:Flags() - 20ns
[DEBUG] 10:35:38.089 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.089 shell.go:Getenv(OMP_CACHE_DIR) - 1.7µs
[DEBUG] 10:35:38.089 shell.go:Getenv:399 → NO DATA
[TRACE] 10:35:38.089 shell.go:Getenv(XDG_CACHE_HOME) - 1.35µs
[TRACE] 10:35:38.089 shell_unix.go:CachePath() - 13.07µs
[TRACE] 10:35:38.089 shell.go:Flags() - 30ns
JanDeDobbeleer commented 10 months ago

@KiLLeRRaT this is impossible to solve. There's no way to print a character with a transparent foreground and background. It will always default to the terminal's built-in default foreground color. You need to use an actual background in powerline, or use a diamond segment without a leading diamond. I'll fix it so it doesn't print the character, but that config (if we follow the correct logic) will always print this.

KiLLeRRaT commented 10 months ago

Hi @JanDeDobbeleer , thanks for getting back to me.

I wonder what the change was that caused this to show up? Was it never printing the char, and now it is printing it?

Thanks :)

JanDeDobbeleer commented 10 months ago

Correct. That's something I missed in that refactoring BTW. So I'll reintroduce that logic.

KiLLeRRaT commented 10 months ago

thanks for that, and many thanks for a great bit of software :)

I will leave this for you to close once you've made the changes.

github-actions[bot] commented 5 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.