sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit d6942e19a83bb4f1189b6e72e611f3dc0ee211e6
parent 1f0defb4ce52aaa59b5dbee9084ac11259658f0d
Author: Nils R <ml@hxgn.net>
Date:   Tue, 25 Mar 2014 13:24:09 +0100

Add patches for solarized color scheme, both light and dark.

Diffstat:
Ast.suckless.org/patches/solarized_color_scheme.md | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-no-bold-colors.diff | 12++++++++++++
Ast.suckless.org/patches/st-solarized-dark.diff | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-dark.png | 0
Ast.suckless.org/patches/st-solarized-light.diff | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-light.png | 0
6 files changed, 193 insertions(+), 0 deletions(-)

diff --git a/st.suckless.org/patches/solarized_color_scheme.md b/st.suckless.org/patches/solarized_color_scheme.md @@ -0,0 +1,53 @@ +Solarized color scheme +====================== + +Description +----------- + +[Solarized][1] is a color scheme by Ethan Schoonover and exists in a +dark and a light variant. These patches make the solarized colors +available on st. + + +Notes +----- + +No matter if you choose the light or dark theme, to get the correct +colors, you *always* have to apply the [patch to st.c][3]. Then, +apply one of the patches for either the [light][4] or the [dark][5] +version of solarized. + +These patches apply to the latest git of st, but should apply to older +versions as well. + +Once applied, only the terminal colors are changed. For applications +such as tmux or vim, you may need to adjust the colors there as well. +You find more information in my [thread][2] at the arch linux forums. + + +Example +------- + +[![Screenshot](st-solarized-light.png)](st-solarized-light.png) +[![Screenshot](st-solarized-dark.png)](st-solarized-dark.png) + +The font is [Source Code Pro][6]. + +Download +-------- + + * [st-no-bold-colors.diff][3] + * [st-solarized-light.diff][4] + * [st-solarized-dark.diff][5] + +[1]: http://ethanschoonover.com/solarized +[2]: https://bbs.archlinux.org/viewtopic.php?id=164108 +[3]: st-no-bold-colors.diff +[4]: st-solarized-light.diff +[5]: st-solarized-dark.diff +[6]: http://en.wikipedia.org/wiki/Source_Code_Pro + +Author +------ + + * Nils Reu&szlig;e - nilsreusse @ gmail diff --git a/st.suckless.org/patches/st-no-bold-colors.diff b/st.suckless.org/patches/st-no-bold-colors.diff @@ -0,0 +1,12 @@ +diff --git a/st.c b/st.c +--- a/st.c ++++ b/st.c +@@ -3203,7 +3203,7 @@ + if(base.mode & ATTR_BOLD) { + if(BETWEEN(base.fg, 0, 7)) { + /* basic system colors */ +- fg = &dc.col[base.fg + 8]; ++ fg = &dc.col[base.fg]; + } else if(BETWEEN(base.fg, 16, 195)) { + /* 256 colors */ + fg = &dc.col[base.fg + 36]; diff --git a/st.suckless.org/patches/st-solarized-dark.diff b/st.suckless.org/patches/st-solarized-dark.diff @@ -0,0 +1,64 @@ +diff --git a/config.def.h b/config.def.h +--- a/config.def.h ++++ b/config.def.h +@@ -51,30 +51,23 @@ + + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { +- /* 8 normal colors */ +- "black", +- "red3", +- "green3", +- "yellow3", +- "blue2", +- "magenta3", +- "cyan3", +- "gray90", +- +- /* 8 bright colors */ +- "gray50", +- "red", +- "green", +- "yellow", +- "#5c5cff", +- "magenta", +- "cyan", +- "white", +- +- [255] = 0, +- +- /* more colors can be added after 255 to use with DefaultXX */ +- "#cccccc", ++ /* solarized dark */ ++ "#073642", /* 0: black */ ++ "#dc322f", /* 1: red */ ++ "#859900", /* 2: green */ ++ "#b58900", /* 3: yellow */ ++ "#268bd2", /* 4: blue */ ++ "#d33682", /* 5: magenta */ ++ "#2aa198", /* 6: cyan */ ++ "#eee8d5", /* 7: white */ ++ "#002b36", /* 8: brblack */ ++ "#cb4b16", /* 9: brred */ ++ "#586e75", /* 10: brgreen */ ++ "#657b83", /* 11: bryellow */ ++ "#839496", /* 12: brblue */ ++ "#6c71c4", /* 13: brmagenta*/ ++ "#93a1a1", /* 14: brcyan */ ++ "#fdf6e3", /* 15: brwhite */ + }; + + +@@ -82,9 +75,9 @@ + * Default colors (colorname index) + * foreground, background, cursor + */ +-static unsigned int defaultfg = 7; +-static unsigned int defaultbg = 0; +-static unsigned int defaultcs = 256; ++static unsigned int defaultfg = 12; ++static unsigned int defaultbg = 8; ++static unsigned int defaultcs = 14; + + /* + * Colors used, when the specific fg == defaultfg. So in reverse mode this diff --git a/st.suckless.org/patches/st-solarized-dark.png b/st.suckless.org/patches/st-solarized-dark.png Binary files differ. diff --git a/st.suckless.org/patches/st-solarized-light.diff b/st.suckless.org/patches/st-solarized-light.diff @@ -0,0 +1,64 @@ +diff --git a/config.def.h b/config.def.h +--- a/config.def.h ++++ b/config.def.h +@@ -51,30 +51,23 @@ + + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { +- /* 8 normal colors */ +- "black", +- "red3", +- "green3", +- "yellow3", +- "blue2", +- "magenta3", +- "cyan3", +- "gray90", +- +- /* 8 bright colors */ +- "gray50", +- "red", +- "green", +- "yellow", +- "#5c5cff", +- "magenta", +- "cyan", +- "white", +- +- [255] = 0, +- +- /* more colors can be added after 255 to use with DefaultXX */ +- "#cccccc", ++ /* solarized light */ ++ "#eee8d5", /* 0: black */ ++ "#dc322f", /* 1: red */ ++ "#859900", /* 2: green */ ++ "#b58900", /* 3: yellow */ ++ "#268bd2", /* 4: blue */ ++ "#d33682", /* 5: magenta */ ++ "#2aa198", /* 6: cyan */ ++ "#073642", /* 7: white */ ++ "#fdf6e3", /* 8: brblack */ ++ "#cb4b16", /* 9: brred */ ++ "#93a1a1", /* 10: brgreen */ ++ "#839496", /* 11: bryellow */ ++ "#657b83", /* 12: brblue */ ++ "#6c71c4", /* 13: brmagenta*/ ++ "#586e75", /* 14: brcyan */ ++ "#002b36", /* 15: brwhite */ + }; + + +@@ -82,9 +75,9 @@ + * Default colors (colorname index) + * foreground, background, cursor + */ +-static unsigned int defaultfg = 7; +-static unsigned int defaultbg = 0; +-static unsigned int defaultcs = 256; ++static unsigned int defaultfg = 12; ++static unsigned int defaultbg = 8; ++static unsigned int defaultcs = 14; + + /* + * Colors used, when the specific fg == defaultfg. So in reverse mode this diff --git a/st.suckless.org/patches/st-solarized-light.png b/st.suckless.org/patches/st-solarized-light.png Binary files differ.