Allow pinning the GitHub theme to dark or light
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong app.js bằng cách lần theo cách theme github được phân tích cú pháp và cách bảng màu sáng hoặc tối của nó được chọn. Xác nhận hành vi tự động hiện có của github, sau đó kiểm tra rằng các biến thể github-dark và github-light được chỉ định rõ ràng có thể tiếp tục cố định, trong khi github thuần vẫn theo giao diện được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- cli
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 67/100