Allow pinning the GitHub theme to dark or light
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the feature or problem you'd like to solve
The github color mode follows the reported OS or terminal appearance, and there's no way to pin it. I want the GitHub palette in dark, permanently, while macOS stays in Light during the day. That combination isn't reachable today.
Proposed solution
Requested change: accept an explicit variant, such as /theme github-dark and /theme github-light , with plain github keeping today's automatic behavior. A separate "follow OS appearance" toggle would work equally well.
Example prompts or workflows
No response
Additional context
What happens now: my terminal profile is black, but macOS switches to Light on its daytime schedule. Every running CLI session flips to a white background at once, usually noticed on wake from sleep. Restarting fixes it, because startup derives colors from the terminal's actual palette instead.
The relevant behavior, from app.js in 1.0.81-9:
if (n() === "github") {
let c = l === "light" ? { bg: cse, fg: Pq } // #ffffff
: { bg: lse, fg: Rq }; // #0D1117
t(d => d && { ...d, ...c }); return
}
github is the only mode that hard-follows the light/dark signal. Every other mode re-queries the terminal's real colors, so those stay dark. That makes the palette choice and the follow-the-OS behavior one setting when they're really two.
Worth noting the workaround isn't obvious. Setting a fixed theme in the terminal emulator can work, since the terminal's DECSET 996/997 reply takes priority over macOS appearance, but that changes the emulator's own window chrome as a side effect. There's no fix available from within the CLI.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
app.js から、github テーマがどのように解析され、明るいパレットまたは暗いパレットがどのように選択されるかを追跡して確認します。既存の github の自動動作を確認し、そのうえで、明示的な github-dark と github-light のバリアントは固定したままにでき、通常の github は引き続き報告された表示に従うことを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- cli
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 67/100