Giter Club home page Giter Club logo

Comments (8)

maaslalani avatar maaslalani commented on May 24, 2024 2

Hey! You can use the base 16 colors as a color to any style flag for gum (this will use the shell theme):

For example, a prompt and cursor with your terminal's red color:

gum input --prompt.foreground 1 --cursor.foreground 1

from gum.

maaslalani avatar maaslalani commented on May 24, 2024 2

Yes! I will definitely make it light theme useable by default and make an easy way to change the theme (something like GUM_DEFAULT_COLOR)

from gum.

maaslalani avatar maaslalani commented on May 24, 2024 1

FYI, I improved some of the gum choose and commands on light mode (on latest @main) and adding ENV_VARS to customize by default further so you can make your own gum themes 🙂

#92

from gum.

mkpaz avatar mkpaz commented on May 24, 2024

Thanks, that helped. But is there any reason not to use system defaults? Could you, please, at least make it usable with light themes by default as well?

from gum.

beauwilliams avatar beauwilliams commented on May 24, 2024

Excellent, perhaps with env vars we can do something like so to get the prompt to auto update on system theme change. Short example excerpted from my zsh config, reads MacOS theme setting and updates theme vars on per prompt basis using precmd()

refresh-theme() (
if [ "$(defaults read -g AppleInterfaceStyle 2>/dev/null)" = "Dark" ];
  then echo 'dark'
  else echo 'light'
fi;
)
export EXAMPLE_GUM_THEME_SETTING=$(refresh-theme)
precmd() { export EXAMPLE_GUM_THEME_SETTING=$(refresh-theme) }

from gum.

AnishDe12020 avatar AnishDe12020 commented on May 24, 2024

Was just looking for this lol, btw, any way to pass in colors (specifically for choose) as flags? I want to change the pink to default ANSI red

from gum.

maaslalani avatar maaslalani commented on May 24, 2024

@AnishDe12020 Yes, you can do <options> | gum choose --selected.foreground 1

from gum.

maaslalani avatar maaslalani commented on May 24, 2024

Fixed by #92 which is available in the latest v0.4.0 release!

You can set up default colours by setting environment variables.

from gum.

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.