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

Configurable color/monochrome mode from CLI and config file #187

Open
tobimensch opened this issue Aug 22, 2018 · 11 comments
Open

Configurable color/monochrome mode from CLI and config file #187

tobimensch opened this issue Aug 22, 2018 · 11 comments
Labels
enhancement help wanted tty-mode Relates to the terminal TTY client

Comments

@tobimensch
Copy link
Collaborator

tobimensch commented Aug 22, 2018

This is a job for a junior browsh developer and should be possible to solve for anyone who has the development environment setup.

Currently the monochrome mode can only be activated by pressing ALT+m.

The default should be configurable in the config.

And it should be possible to select the color mode from the command line.

Use cases:

  • For testing purposes I was using ansi-term inside emacs today and unfortunately the key combination ALT+m isn't forwarded correctly to browsh.
  • Prefering monochrome mode to save bandwidth
@tobimensch tobimensch added enhancement help wanted tty-mode Relates to the terminal TTY client labels Aug 22, 2018
@j-rewerts
Copy link
Member

I might be able to take a look at this this weekend.

For the second point, are you thinking a flag --monochrome or something?

@tobimensch
Copy link
Collaborator Author

@j-rewerts
--monochrome might suffice for now. Long term browsh will probably support many color modes, so something like:
--color-mode string, where string can be one of monochrome, ansi (not supported yet), ..., truecolor (default)
might be a solution.

If you implement a --monochrome flag, then you should also implement a --truecolor flag, because someone might want to change the default in the configuration file to monochrome and use true color mode occasionally using the --truecolor flag.

@j-rewerts
Copy link
Member

That seems like a good approach. We do already use --firefox.{insert mode here}. Maybe we could do that?
--colormode.truecolor and --colormode.monochrome

@tobimensch
Copy link
Collaborator Author

tobimensch commented Aug 23, 2018

@j-rewerts
I don't like --colormode.truecolor . That's not how command line arguments are supposed to look. The --firefox.example is different, as those modes aren't mutually exclusive, while the color modes are mutually exclusive. You can better compare it to the --startup-url flag, which takes a string as parameter.

@j-rewerts
Copy link
Member

I hadn't thought about the mutual exclusivity. Good point!

@tobimensch
Copy link
Collaborator Author

@j-rewerts
There's a small cultural issue as well.

@tombh deliberately uses British English, and therefore writes color as colour.

Usually American English is used on the command line. But British spelling is used all throughout this project, so maybe we should stick to it.

Personally I'd prefer color, because it's shorter. Maybe we can be one of few software projects to support both spellings on the command line.

@tombh
Copy link
Member

tombh commented Aug 26, 2018

Haha, I think 'color' is better for user-facing features, but 'colour' has already become the standard in the code base, just because why not :D

So I think the CLI should be --color-mode monochrome/true/... and the config file should be color-mode = monochrome/true/...

@tobimensch
Copy link
Collaborator Author

@tombh
Makes sense.

@j-rewerts
Copy link
Member

@CodyGramlich I know you're interested in taking this one. Feel free to take it over!

@CodyGramlich
Copy link
Contributor

Great. We'll work on it right now!

@tobimensch
Copy link
Collaborator Author

@j-rewerts @CodyGramlich
So glad to see new contributors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted tty-mode Relates to the terminal TTY client
Projects
None yet
Development

No branches or pull requests

4 participants