Last active
December 18, 2015 02:39
-
-
Save drm00/5712443 to your computer and use it in GitHub Desktop.
Patches to set the 16 solarized colors in st (http://st.suckless.org/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment