-
Notifications
You must be signed in to change notification settings - Fork 28
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
add cmd color themes #495
add cmd color themes #495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea to rename the column without the color, as it could change with the theme. The naming of the theme should be different though.
|
||
func (s *ampManager) setColors() { | ||
theme := s.getTheme() | ||
if theme == "white" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the name of the theme should not be based on one of the color of the theme, but should match the terminal theme on which it displays best.
So here white should be black.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, renamed "dark", PR description updated too
91580a6
to
1c38d73
Compare
if err != nil { | ||
return "" | ||
} | ||
file, err := os.Open(path.Join(homedir, ".amp.yaml")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why manually check the config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you're right, i updated the code to use the regular amp config
dec43ea
to
5ce0386
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
You can also do |
Related to #477
Have amp commands color themes to adapt colors to different terminals L&F.
Default is the "magenta" theme created by Neha, but it doesn't look good on Ubuntu default terminal which are magenta dark by default.
Added one named "dark" to be back to the original colors (white in place of magenta)
to change it, update $HOME/.amp.yaml file adding this line for instance:
cmdTheme: dark
For now only 2 themes (default or dark)
Test:
It's possible to add new theme updating cmd/amp/platform_manager.go