nushell / nushell/nushell

Automatic switching between light and dark theme (CSI 2031)

Open
#15,227 15 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A:configuration category:enhancement
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 14h
Merged PRs (30d)
79

Description

Related problem

Currently, nushell does not have support for switching between dark and light theme - there is always only one color theme configured in $env.config.color_config.

Several terminals (Ghostty, Contour, Kitty) have implemented support for CSI 2031 https://github.com/contour-terminal/contour/blob/f3c3334aa5c861348c5bbe8ffe572c872eef2e08/docs/vt-extensions/color-palette-update-notifications.md which allows terminal applications to receive updates regarding the current system theme, and then automatically switch between light/dark theme.

It would be nice if nushell had support for this.

Describe the solution you'd like
  • Refactor current color theme configuration $env.config.color_config to support light and dark theme, e.g.:
env.config.color_theme = "light"
env.config.color_theme_light = ...
env.config.color_theme_dark = ...
Describe alternatives you've considered

No response

Additional context and details

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the implementation of $env.config.color_config and the terminal input handling relevant to CSI 2031. Done means light and dark theme configuration is supported and Nushell can receive CSI 2031 notifications to switch themes automatically.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.