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

🐛 Light/Dark Theme detection doesn't work in lazygit #1968

Open
dwt opened this issue Mar 4, 2025 · 3 comments
Open

🐛 Light/Dark Theme detection doesn't work in lazygit #1968

dwt opened this issue Mar 4, 2025 · 3 comments

Comments

@dwt
Copy link

dwt commented Mar 4, 2025

When working with lazygit I have it configured to use delta like this:

~/Library/Application Support/lazygit
❯ cat config.yml -p
git:
  paging:
    colorArg: always
    pager: delta --paging=never --detect-dark-light always
    # pager: delta --paging=never --dark
    # pager: delta --paging=never --light
    # useConfig: true

This however always uses the dark theme

Image

Even when the light mode is on

Image

I currently work around this by constantly switching the pager declaration in the config file, but I would much rather delta could auto switch based on the output of defaults read -g AppleInterfaceStyle.

Is there a way to do so? If not, I would be glad to provide a shell script to ask for the mode as a config parameter.

@dwt
Copy link
Author

dwt commented Mar 4, 2025

Forgot to say, this is on

❯ delta --version
delta 0.18.2

@dwt
Copy link
Author

dwt commented Mar 4, 2025

there is #447, which might be related, but there seems to have been a consensus there that this can be detected. I think that there should be an escape hatch to provide this information by a specialized tool that the user can control.

@Dom324
Copy link

Dom324 commented Mar 11, 2025

To consider - implement automatic theme detection from terminal with CSI 996/2031, which should be more robust https://github.com/contour-terminal/contour/blob/master/docs/vt-extensions/color-palette-update-notifications.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants