Comments (8)
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.
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.
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 🙂
from gum.
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.
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.
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.
@AnishDe12020 Yes, you can do <options> | gum choose --selected.foreground 1
from gum.
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)
- gum write completion (intended?)
- gum choose wrapping (intended?) HOT 1
- cursor foreground color
- gum confirm no longer lets you disable negative message HOT 1
- gum confirm does not work on powershell HOT 1
- "Esc" does not exit "gum input" anymore
- gum choose prints "user aborted" when you ctrl-c HOT 1
- Gum spin only accepts a hard-coded command
- gum choose v0.14.0: timeout no longer working HOT 1
- gum choose does not center Yes and No in a centered manner like the previous gum versions
- Can't extract with `tar -x` HOT 2
- gum v0.14.0 confirm: no longer able to answer with Y/N keys HOT 1
- Gum write can no longer add new lines HOT 3
- Unhandled trailing newline from stdin in `gum input`
- `gum log -l fatal` no longer returns error status code HOT 2
- `choose` crashes when in filter mode and you press `spacebar` twice
- Gum choose "undefined: max" error
- gum input header flags can output an incorrect render
- `--cursor.foreground` not respected for `gum input` or `gum write`
- `choose` pagination has no indicators or prev/next since 0.14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gum.