public
Last active

Patches to set the 16 solarized colors in st (http://st.suckless.org/)

  • Download Gist
config-h-inconsolata.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
diff --git a/config.h b/config.h
index 8cb8804..b1be9e2 100644
--- a/config.h
+++ b/config.h
@@ -5,8 +5,8 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false";
-static int borderpx = 2;
+static char font[] = "Inconsolata:pixelsize=18:antialias=true:autohint=true";
+static int borderpx = 0;
static char shell[] = "/bin/sh";
/* Kerning / character bounding-box mutlipliers */
config-h-solarized_dark.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
diff --git a/config.h b/config.h
index 8cb8804..3f667bf 100644
--- a/config.h
+++ b/config.h
@@ -45,30 +45,26 @@ static unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
+ /* solarized dark */
/* 8 normal colors */
- "black",
- "red3",
- "green3",
- "yellow3",
- "blue2",
- "magenta3",
- "cyan3",
- "gray90",
+ "#073642", /* 0: black */
+ "#dc322f", /* 1: red */
+ "#859900", /* 2: green */
+ "#b58900", /* 3: yellow */
+ "#268bd2", /* 4: blue */
+ "#d33682", /* 5: magenta */
+ "#2aa198", /* 6: cyan */
+ "#eee8d5", /* 7: white */
/* 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",
+ "#002b36", /* 8: brblack */
+ "#cb4b16", /* 9: brred */
+ "#586e75", /* 10: brgreen */
+ "#657b83", /* 11: bryellow */
+ "#839496", /* 12: brblue */
+ "#6c71c4", /* 13: brmagenta */
+ "#93a1a1", /* 14: brcyan */
+ "#fdf6e3", /* 15: brwhite */
};
@@ -76,9 +72,9 @@ static const char *colorname[] = {
* 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
config-h-solarized_light.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
diff --git a/config.h b/config.h
index 8cb8804..78d2843 100644
--- a/config.h
+++ b/config.h
@@ -45,30 +45,26 @@ static unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
+ /* solarized light */
/* 8 normal colors */
- "black",
- "red3",
- "green3",
- "yellow3",
- "blue2",
- "magenta3",
- "cyan3",
- "gray90",
+ "#eee8d5", /* 0: black */
+ "#dc322f", /* 1: red */
+ "#859900", /* 2: green */
+ "#b58900", /* 3: yellow */
+ "#268bd2", /* 4: blue */
+ "#d33682", /* 5: magenta */
+ "#2aa198", /* 6: cyan */
+ "#073642", /* 7: white */
/* 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",
+ "#fdf6e3", /* 8: brblack */
+ "#cb4b16", /* 9: brred */
+ "#93a1a1", /* 10: brgreen */
+ "#839496", /* 11: bryellow */
+ "#657b83", /* 12: brblue */
+ "#6c71c4", /* 13: brmagenta */
+ "#586e75", /* 14: brcyan */
+ "#002b36", /* 15: brwhite */
};
@@ -76,9 +72,9 @@ static const char *colorname[] = {
* 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
st-c-no_bold_colors.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14
diff --git a/st.c b/st.c
index 9733a9b..3c7a22b 100644
--- a/st.c
+++ b/st.c
@@ -3004,7 +3004,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
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];
im

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.