-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 predefined color schemes #94
Comments
I think it would be a good idea to provide some predefined color schemes that people could easily use. I rewrote the title to reflect this. If you (or anyone else) wants to add some predefined color schemes, please feel free to send a PR. This should be a relatively easy change. The predefined color schemes should probably go in the @craigem Added an example of defining a color scheme here: |
I've got some screen shots in this blog post which I'll happily upload to the haddocks if they're good enough. On a related topic, I've been wondering about how to load the Solarized themes and switch between light and dark with a key stroke toggle. At the moment I'm just mentally kicking tyres but if there's any known engineering hurdles to the idea it would be good to know before I expend actual effort and ground myself on them :-) |
@craigem Hmm, I wonder what end users would like to see. I was thinking it would be nice to just get a picture of what each color actually looks like. I was thinking of running a command like this and taking a picture of it: $ echo ; for ((i=0; i<=15; i++)); do tput init; [ "$i" -eq 8 ] && echo; printf "%2d. " "${i}"; tput setaf "${i}"; echo -n "TEST "; done ; echo; echo Here's the default color scheme: Although maybe end users would also like pictures of actually doing stuff like editing files. |
This should be possible, but will require changing a few things. You'll have to send a PR to add a hook that gets called right as Termonad is about to launch. Probably around here: Lines 421 to 422 in db185e3
In your own config, you'll have to override that hook to define a new key binding for each existing terminal. Here's an example of defining a key binding (this code defines the Lines 345 to 346 in db185e3
Your key binding will have to call a function that loops through all the open tabs and sets the colors for the terminal. Here's where that is currently being done: termonad/src/Termonad/Config/Colour.hs Lines 453 to 479 in db185e3
This is only setting colors for a single terminal, so you'll have to change it so it loops through all tabs. Here's a function that loops through all tabs (although this is changing the font size): Lines 192 to 199 in db185e3
If you don't feel like implementing this, could you create an issue requesting this hook be added? Also link to this comment where I describe how to add it. |
Did that via PR #103
I'm happy to add my existing Haskell examples. Should they also be added to the doco or just dumped in /img as well? |
Thanks for #103. I added a comment there but I probably should have added it in this thread: Basically it explains the steps you would take for adding a predefined solarized theme to the
I think they should only be added if you want to link to them from the Haddocks (if you want to add the |
Please include a mechanism for easily enabling Solarized Light and Solarized Dark color schemes (without defining all the colors by hand).
The text was updated successfully, but these errors were encountered: