Skip to content

Add color configuration support: --monochrome flag and NO_COLOR env var#230

Merged
kordianbruck merged 3 commits intomasterfrom
copilot/update-color-settings-to-black
Apr 11, 2026
Merged

Add color configuration support: --monochrome flag and NO_COLOR env var#230
kordianbruck merged 3 commits intomasterfrom
copilot/update-color-settings-to-black

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

Motivation and Context

Users had no documented way to disable or customize terminal colors in wego's output. There was no single, unified way to turn off colors across all frontends.

Description

  • frontends/colors.go: Added a package-level monochrome variable registered as a single shared --monochrome flag (via init()), and an isMonochrome() helper that returns true when --monochrome is set or the NO_COLOR env var is present
  • frontends/ascii-art-table.go: Removed the old --aat-monochrome flag; Render() now calls isMonochrome()
  • frontends/emoji.go: Removed the old --emoji-monochrome flag; Render() now calls isMonochrome()
  • README.md: New Color Configuration section documenting both approaches

Two ways to disable colors:

# .wegorc — persisted setting for all frontends
monochrome=true
# one-off override via env var
NO_COLOR=1 wego

Steps for Testing

  1. Run wego normally — colored output unchanged
  2. Run wego --monochrome or wego --frontend emoji --monochrome — ANSI color codes stripped, plain text output
  3. Run NO_COLOR=1 wego and NO_COLOR=1 wego --frontend emoji — same result without flags
  4. Set monochrome=true in ~/.wegorc and confirm it persists across runs for both frontends

Screenshots

…nv var

Agent-Logs-Url: https://github.com/schachmat/wego/sessions/8d215e1f-e852-416f-bf53-4bcb9765851a

Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Copilot AI changed the title [WIP] Change color settings to default to black Add color configuration support: --emoji-monochrome flag and NO_COLOR env var Apr 11, 2026
Copilot AI requested a review from kordianbruck April 11, 2026 22:46
@kordianbruck
Copy link
Copy Markdown
Collaborator

@copilot Please make both frontends just use --monochrome instead of --aat-monochrome and --emoji-monochrome. Also add an option to the wegorc configuration file to set monochrome to be always true.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 11, 2026

@copilot Please make both frontends just use --monochrome instead of --aat-monochrome and --emoji-monochrome. Also add an option to the wegorc configuration file to set monochrome to be always t...

Done in ece35b6. Both frontends now share a single --monochrome flag registered at the package level. It's automatically persisted to .wegorc by ingo, so users can set monochrome=true there to always disable colors. The NO_COLOR env var is still respected as well.

Copilot AI changed the title Add color configuration support: --emoji-monochrome flag and NO_COLOR env var Add color configuration support: --monochrome flag and NO_COLOR env var Apr 11, 2026
@kordianbruck kordianbruck marked this pull request as ready for review April 11, 2026 22:52
@kordianbruck kordianbruck merged commit c8ba05e into master Apr 11, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

Is it possible to change the color settings?

2 participants