Giter Club home page Giter Club logo

Comments (7)

JanDeDobbeleer avatar JanDeDobbeleer commented on May 11, 2024 1

Yup. I would just use fmt.Sprintf to return the string and default to "WSL" rather than an icon.

from oh-my-posh.

nwykes avatar nwykes commented on May 11, 2024

Do you think adding some kind of indicator or the WSL Distro Name to the os segment would be a solution to this? Or should it be it's own segment?

from oh-my-posh.

JanDeDobbeleer avatar JanDeDobbeleer commented on May 11, 2024

@nwykes yes, that's actually a good idea. What I'd do in that could something along these lines (peudo).

switch os {
    case wsl:
        return WSLIcon + distroname
    case unix:
        return UnixIcon // (map to DistroIcon?)
    case windows:
        return WindowIcon
    case darwin:
        return MacOSIcon
}

I would always give the default value a string value, as in for WindowsIcon return "Windows" of not set etc...
That way it always works regardless of the font that was being used at the time of development (unless we make it a requirement to always use Meslo).

from oh-my-posh.

nwykes avatar nwykes commented on May 11, 2024

Is there a standard "WSL" icon? I'm not seeing one in nerdfonts.

from oh-my-posh.

JanDeDobbeleer avatar JanDeDobbeleer commented on May 11, 2024

Not really, we could default to a Windows icon maybe.

from oh-my-posh.

nwykes avatar nwykes commented on May 11, 2024

Sounds good. "Windows Icon - Distro Name" or "Windows Icon - Distro Icon" when we have that support in the os segment.

from oh-my-posh.

nwykes avatar nwykes commented on May 11, 2024

let me know if this concept works for this. still need to work on the distro specific icons.

image

probably more props like wsl_separator could be added

from oh-my-posh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.