JanDeDobbeleer / oh-my-posh

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

almalinux icon not working #4347

Closed BPplays closed 1 year ago

BPplays commented 1 year ago

Code of Conduct

What happened?

almalinux icon is not working

-> cat omp.cache
{
    "environment_platform": {
        "value": "almalinux",
        "timestamp": 1697424959,
        "ttl": -1
    },
    "is_wsl": {
        "value": "false",
        "timestamp": 1697424959,
        "ttl": -1
    },
    "prompt_count_cache_43871": {
        "value": "7",
        "timestamp": 1697424986,
        "ttl": 1440
    },
    "prompt_count_cache_44232": {
        "value": "5",
        "timestamp": 1697425523,
        "ttl": 1440
    },
    "upgrade_check": {
        "value": "disabled",
        "timestamp": 1697424990,
        "ttl": -1
    }
}

Theme

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "palette": {
        "os": "#ACB0BE",
        "pink-old": "#f5c2e7",
        "pink": "#cba6f7",
        "lavender": "#b4befe",
        "blue":  "#89b4fa",
        "wight": "#FFFFFF",
        "wight-old": "#cdd6f4",
        "text": "#45475a"
  },
  "blocks": [
    {
      "alignment": "left",
      "segments": [
        {
          "background": "p:blue",
          "foreground": "p:wight",
          "powerline_symbol": "\ue0b4",
          "leading_diamond": "\ue0b6",
          "style": "diamond",
          "template": "{{.Icon}} ",
          "type": "os"
        },
        {
          "background": "p:blue",
          "foreground": "p:text",
          "powerline_symbol": "\ue0b4",
          "style": "diamond",
          "template": "{{ .UserName }}@{{ $truncated_hostname := split \".\" .HostName }}{{ $truncated_hostname._0 }}",
          "type": "session"
        },
        {
          "background": "p:pink",
          "foreground": "p:text",
          "properties": {
            "folder_icon": "..\ue5fe..",
            "home_icon": "~",
            "style": "agnoster_short"
          },
          "powerline_symbol": "\ue0b4",
          "style": "powerline",
          "template": " {{ .Path }}",
          "type": "path"
        },
        {
          "background": "p:lavender",
          "foreground": "p:text",
          "style": "powerline",
          "properties": {
            "branch_icon": "\ue725 ",
            "cherry_pick_icon": "\ue29b ",
            "commit_icon": "\uf417 ",
            "fetch_status": false,
            "fetch_upstream_icon": false,
            "merge_icon": "\ue727 ",
            "no_commits_icon": "\uf594 ",
            "rebase_icon": "\ue728 ",
            "revert_icon": "\uf0e2 ",
            "tag_icon": "\uf412 "
          },
          "powerline_symbol": "\ue0b4",
          "template": " {{ .HEAD }}",
          "type": "git"
        }
      ],
      "type": "prompt"
    }
  ],
  "final_space": true,
  "version": 2
}

What OS are you seeing the problem on?

Linux hostnamectl says AlmaLinux 9.2 (Turquoise Kodkod)

Which shell are you using?

fish

Log output

Version: 18.13.0

Shell: fish (3.6.1)

Prompt:

 censored_irlname@ipa user-cache/..../oh-my-posh

Segments:

ConsoleTitle(false)                       -   0 ms
Os(true)                                  -   0 ms
Session(true)                             -   0 ms
Path(true)                                -   0 ms
Git(false)                                -   0 ms

Run duration: 5.707017ms

Cache path: /user-cache/937400003/.cache/oh-my-posh

Config path: /home/censored_irlname/.config/.poshthemes/theme.omp.json

Logs:

[DEBUG] 20:06:42.807 shell.go:Getenv:392 → NO DATA
[TRACE] 20:06:42.807 shell.go:Getenv(TERM_PROGRAM) - 20.839µs
[DEBUG] 20:06:42.807 shell.go:Getenv:392 → /user-cache/937400003/.cache
[TRACE] 20:06:42.807 shell.go:Getenv(XDG_CACHE_HOME) - 5.749µs
[TRACE] 20:06:42.807 shell_unix.go:CachePath() - 16.259µs
[DEBUG] 20:06:42.807 shell.go:Getenv:392 → /home/censored_irlname/.config/.poshthemes/theme.omp.json
[TRACE] 20:06:42.807 shell.go:Getenv(POSH_THEME) - 3.56µs
[DEBUG] 20:06:42.807 shell_unix.go:Platform:77 → almalinux
[TRACE] 20:06:42.807 shell.go:resolveConfigPath() - 13.08µs
[TRACE] 20:06:42.807 shell.go:Init() - 126.756µs
[TRACE] 20:06:42.807 shell.go:Flags() - 60ns
[TRACE] 20:06:42.808 config.go:loadConfig() - 750.407µs
[TRACE] 20:06:42.808 shell.go:Flags() - 50ns
[DEBUG] 20:06:42.808 shell.go:Getenv:392 → NO DATA
[TRACE] 20:06:42.808 shell.go:Getenv(OMP_CACHE_DISABLED) - 2.42µs
[DEBUG] 20:06:42.808 shell.go:Shell:646 → no shell name provided in flags, trying to detect it
[DEBUG] 20:06:42.810 shell.go:Shell:654 → process name: fish
[TRACE] 20:06:42.810 shell.go:Shell() - 2.01254ms
[DEBUG] 20:06:42.810 shell.go:Getenv:392 → 3.6.1
[TRACE] 20:06:42.810 shell.go:Getenv(POSH_SHELL_VERSION) - 2.21µs
[DEBUG] 20:06:42.810 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 20:06:42.810 text.go:Render:70 → Rendering template:
[DEBUG] 20:06:42.810 shell.go:Getenv:392 → NO DATA
[TRACE] 20:06:42.810 shell.go:Getenv(POSH_CURSOR_LINE) - 2.86µs
[DEBUG] 20:06:42.810 shell.go:Getenv:392 → NO DATA
[TRACE] 20:06:42.810 shell.go:Getenv(POSH_CURSOR_COLUMN) - 1.47µs
[TRACE] 20:06:42.810 shell.go:Flags() - 50ns
[TRACE] 20:06:42.810 shell.go:Flags() - 20ns
[TRACE] 20:06:42.810 shell.go:Shell() - 50ns
[TRACE] 20:06:42.810 shell.go:Shell() - 30ns
[TRACE] 20:06:42.810 shell.go:Flags() - 150ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 40ns
[DEBUG] 20:06:42.810 shell.go:Pwd:422 → /user-cache/937400003/.cache/oh-my-posh
[TRACE] 20:06:42.810 shell.go:Pwd() - 10.56µs
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[DEBUG] 20:06:42.810 segment.go:SetEnabled:497 → Segment: Git
[TRACE] 20:06:42.810 shell.go:Flags() - 190ns
[TRACE] 20:06:42.810 shell.go:Pwd() - 80ns
[DEBUG] 20:06:42.810 shell_unix.go:IsWsl:35 → false
[TRACE] 20:06:42.810 shell_unix.go:IsWsl() - 6.75µs
[TRACE] 20:06:42.810 shell.go:GOOS() - 40ns
[TRACE] 20:06:42.810 shell_unix.go:IsWsl2() - 8.59µs
[DEBUG] 20:06:42.810 segment.go:SetEnabled:497 → Segment: Session
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[DEBUG] 20:06:42.810 shell.go:Getenv:392 → 192.168.1.50 58169 192.168.1.211 22
[TRACE] 20:06:42.810 shell.go:Getenv(SSH_CONNECTION) - 9.02µs
[TRACE] 20:06:42.810 shell_unix.go:Root() - 540ns
[TRACE] 20:06:42.810 shell.go:Shell() - 80ns
[TRACE] 20:06:42.810 shell.go:StatusCodes() - 30ns
[DEBUG] 20:06:42.810 shell_unix.go:IsWsl:35 → false
[TRACE] 20:06:42.810 shell_unix.go:IsWsl() - 2.32µs
[DEBUG] 20:06:42.810 shell.go:CommandPath:608 → /usr/bin/git
[TRACE] 20:06:42.810 shell.go:CommandPath(git) - 45.858µs
[TRACE] 20:06:42.810 shell.go:HasCommand(git) - 47.848µs
[TRACE] 20:06:42.810 shell.go:Pwd() - 70ns
[TRACE] 20:06:42.810 shell.go:Flags() - 190ns
[TRACE] 20:06:42.810 shell.go:Pwd() - 140ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 40ns
[DEBUG] 20:06:42.810 segment.go:SetEnabled:497 → Segment: Path
[TRACE] 20:06:42.810 shell.go:Pwd() - 30ns
[TRACE] 20:06:42.810 shell.go:Shell() - 40ns
[TRACE] 20:06:42.810 shell.go:Shell() - 60ns
[DEBUG] 20:06:42.810 shell.go:TemplateCache:827 → environment: [PWD=/user-cache/937400003/.cache/oh-my-posh XDG_CACHE_HOME=/user-cache/937400003/.cache XDG_DATA_HOME=/home/censored_irlname/.local/share XDG_CONFIG_DIRS=/etc/xdg XDG_DATA_DIRS=/usr/local/share:/usr/share POSH_THEME=/home/censored_irlname/.config/.poshthemes/theme.omp.json XDG_CONFIG_HOME=/home/censored_irlname/.config XDG_SESSION_TYPE=tty SSH_TTY=/dev/pts/0 TERM=xterm-256color LC_MEASUREMENT=ja_JP.UTF-8 USER=censored_irlname PATH=/opt/rust/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games SHELL=/usr/bin/fish SSH_CONNECTION=192.168.1.50 58169 192.168.1.211 22 SHLVL=1 HOME=/home/censored_irlname RUSTUP_HOME=/opt/rust EDITOR=nvim LOGNAME=censored_irlname POSH_SHELL_VERSION=3.6.1 SELINUX_ROLE_REQUESTED= MOTD_SHOWN=pam CARGO_HOME=/opt/rust XDG_RUNTIME_DIR=/run/user/937400003 SELINUX_USE_CURRENT_RANGE= LC_MONETARY=ja_JP.UTF-8 SSH_CLIENT=192.168.1.50 58169 22 XDG_SESSION_CLASS=user DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/937400003/bus XDG_SESSION_ID=37 omp_last_status_generation=5 SELINUX_LEVEL_REQUESTED= LANG=en_US.UTF-8 omp_lastcommand=cat omp.cache  LC_TIME=ja_JP.UTF-8]
[TRACE] 20:06:42.810 shell.go:Pwd() - 150ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.810 shell.go:Flags() - 170ns
[TRACE] 20:06:42.810 shell.go:GOOS() - 30ns
[DEBUG] 20:06:42.810 shell.go:User:557 → censored_irlname
[TRACE] 20:06:42.810 shell.go:User() - 1.85µs
[TRACE] 20:06:42.810 shell.go:Pwd() - 70ns
[DEBUG] 20:06:42.810 shell.go:Host:569 → ipa.censored_irlname.org
[TRACE] 20:06:42.811 shell.go:Host() - 28.769µs
[TRACE] 20:06:42.811 shell.go:GOOS() - 30ns
[DEBUG] 20:06:42.811 shell_unix.go:Platform:77 → almalinux
[DEBUG] 20:06:42.811 shell.go:Getenv:392 → 1
[TRACE] 20:06:42.811 shell.go:Getenv(SHLVL) - 1.79µs
[TRACE] 20:06:42.811 shell.go:TemplateCache() - 400.519µs
[DEBUG] 20:06:42.811 properties.go:GetString:28 → NO DATA
[DEBUG] 20:06:42.811 properties.go:GetString:28 → 
[TRACE] 20:06:42.811 shell.go:TemplateCache() - 200ns
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 70ns
[TRACE] 20:06:42.811 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.811 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.811 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.811 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 30ns
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 20ns
[ERROR] 20:06:42.811 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.811 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 30ns
[TRACE] 20:06:42.811 shell.go:HasParentFilePath(.git) - 409.332µs
[TRACE] 20:06:42.811 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.811 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 20ns
[DEBUG] 20:06:42.811 properties.go:GetBool:22 → fetch_bare_info: false
[TRACE] 20:06:42.811 shell.go:GOOS() - 30ns
[TRACE] 20:06:42.811 shell.go:GOOS() - 20ns
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 30ns
[DEBUG] 20:06:42.811 properties.go:GetString:28 → agnoster_short
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 20ns
[DEBUG] 20:06:42.811 properties.go:GetInt:40 → max_depth: 1
[DEBUG] 20:06:42.811 properties.go:GetString:28 → ....
[DEBUG] 20:06:42.811 properties.go:GetBool:22 → hide_root_location: false
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 30ns
[DEBUG] 20:06:42.811 properties.go:GetStringArray:52 → cycle: []
[DEBUG] 20:06:42.811 properties.go:GetString:28 → NO DATA
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 20ns
[DEBUG] 20:06:42.811 properties.go:GetString:28 → /
[DEBUG] 20:06:42.811 properties.go:GetBool:22 → cycle_folder_separator: false
[DEBUG] 20:06:42.811 properties.go:GetString:28 → %s
[DEBUG] 20:06:42.811 properties.go:GetString:28 → %s
[TRACE] 20:06:42.811 shell.go:PathSeparator() - 20ns
[TRACE] 20:06:42.811 shell.go:Pwd() - 50ns
[DEBUG] 20:06:42.811 shell_unix.go:IsWsl:35 → false
[TRACE] 20:06:42.811 shell_unix.go:IsWsl() - 2.17µs
[TRACE] 20:06:42.811 shell.go:StackCount() - 50ns
[TRACE] 20:06:42.811 shell_unix.go:DirIsWritable(/user-cache/937400003/.cache/oh-my-posh) - 6.41µs
[TRACE] 20:06:42.811 shell.go:TemplateCache() - 110ns
[DEBUG] 20:06:42.811 text.go:Render:70 → Rendering template:  {{ .Path }}
[DEBUG] 20:06:42.811 text.go:Render:70 → Rendering template: {{ .UserName }}@{{ $truncated_hostname := split "." .HostName }}{{ $truncated_hostname._0 }}
[DEBUG] 20:06:42.811 text.go:Render:70 → Rendering template: {{.Icon}}
[TRACE] 20:06:42.812 shell.go:TemplateCache() - 280ns
[TRACE] 20:06:42.812 shell.go:Shell() - 70ns
[TRACE] 20:06:42.812 shell.go:TemplateCache() - 260ns
[TRACE] 20:06:42.812 shell.go:Shell() - 80ns
[TRACE] 20:06:42.813 shell.go:TemplateCache() - 280ns
[TRACE] 20:06:42.813 shell.go:Shell() - 70ns
[DEBUG] 20:06:42.813 text.go:Render:70 → Rendering template: diamond
[DEBUG] 20:06:42.813 text.go:Render:70 → Rendering template: diamond
[DEBUG] 20:06:42.813 text.go:Render:70 → Rendering template: powerline
[DEBUG] 20:06:42.813 text.go:Render:70 → Rendering template: powerline
[TRACE] 20:06:42.813 shell.go:Shell() - 100ns
[TRACE] 20:06:42.813 shell.go:Shell() - 100ns
[TRACE] 20:06:42.813 shell.go:Shell() - 20ns
[TRACE] 20:06:42.813 shell.go:Shell() - 30ns
[DEBUG] 20:06:42.813 shell.go:Getenv:392 → /user-cache/937400003/.cache
[TRACE] 20:06:42.813 shell.go:Getenv(XDG_CACHE_HOME) - 2.82µs
[TRACE] 20:06:42.813 shell_unix.go:CachePath() - 11.06µs
[TRACE] 20:06:42.813 shell.go:Flags() - 30ns
lnu commented 1 year ago

The icon exists in nerd fonts: image

So it's probably an issue with the font you use(meslo?) and not with oh-my-posh.

BPplays commented 1 year ago

it's just rendering as a generic linux icon so i dont think thats it.

i would guess by the fact that this commit added 'almalinux9' with a corresponding icon and my omp.cache says '"environment_platform": { "value": "almalinux",' maybe adding 'almalinux' to that map would fix it but im not sure

lnu commented 1 year ago

seems you're right: image

BPplays commented 1 year ago

i made a pull request for it

github-actions[bot] commented 6 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.