Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dynamically configure color scheme? #1009

Closed
bartekpacia opened this issue Mar 13, 2024 · 3 comments
Closed

How to dynamically configure color scheme? #1009

bartekpacia opened this issue Mar 13, 2024 · 3 comments
Labels
kind/question Asking how to use lsd or may not using correctly

Comments

@bartekpacia
Copy link

On my MacBook, I use light theme in my terminal during the day and dark theme during the night. By default, lsd looks great on black background, but on white it's barely legible:
Screenshot 2024-03-13 at 17 36 39

Similar problems arise in many CLI tools (e.g. micro editor), but I solved it like this:

if command -v micro >/dev/null 2>&1; then
    if [ "$(uname)" = Darwin ]; then
        # automatically set light/dark theme on macOS
        alias micro="micro -colorscheme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo monokai || echo bubblegum)"
    fi
fi

I'd like to do the same with lsd, but unfortunately it looks like it only accepts following values:

$ lsd --color <TAB COMPLETION>
always  auto    never

How can I dynamically select the theme like I showed in the first snippet above?

@j-lakeman
Copy link

See #208

@zwpaper
Copy link
Member

zwpaper commented Mar 17, 2024

hi the lsd theme can only be configured by configuration file or read from the theme file, please have a look at the configuration part in README

@zwpaper zwpaper added the kind/question Asking how to use lsd or may not using correctly label Mar 17, 2024
@zwpaper zwpaper closed this as completed Mar 17, 2024
@haohanyuzmx
Copy link

i know it can config by color.yaml, but is it can use dynamic color

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Asking how to use lsd or may not using correctly
Projects
None yet
Development

No branches or pull requests

4 participants