libre: Add st-solarized. master
authorRicardo Wurmus <rekado@elephly.net>
Sun, 17 Dec 2017 21:12:33 +0000 (22:12 +0100)
committerRicardo Wurmus <rekado@elephly.net>
Sun, 17 Dec 2017 21:12:33 +0000 (22:12 +0100)
* libre/custom/packages/variants.scm (st-solarized): New variable.
* libre/st-no_bold_colors-0.7.diff,
libre/st-solarized-light-0.7.diff: New files.

libre/custom/packages/variants.scm
libre/st-no_bold_colors-0.7.diff [new file with mode: 0644]
libre/st-solarized-light-0.7.diff [new file with mode: 0644]

index 3f1f5c560b10da010433401287d31557b3ac6b56..9abc39e65b573d5ebf1b4aa81d11b6ceb3b242b4 100644 (file)
@@ -30,6 +30,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages libusb)
+  #:use-module (gnu packages suckless)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages webkit))
        `(("autoconf" ,autoconf)
          ("automake" ,automake)
          ,@(package-native-inputs emacs))))))
+
+(define-public st-solarized
+  (package (inherit st)
+     (name "st-solarized")
+     (source
+      (origin (inherit (package-source st))
+       (patches (search-patches "st-no_bold_colors-0.7.diff"
+                                "st-solarized-light-0.7.diff"))))))
diff --git a/libre/st-no_bold_colors-0.7.diff b/libre/st-no_bold_colors-0.7.diff
new file mode 100644 (file)
index 0000000..c381703
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/st.c b/st.c
+index 2594c65..f6fe717 100644
+--- a/st.c
++++ b/st.c
+@@ -3719,7 +3719,7 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
+       /* Change basic system colors [0-7] to bright system colors [8-15] */
+       if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7))
+-              fg = &dc.col[base.fg + 8];
++              fg = &dc.col[base.fg];
+       if (IS_SET(MODE_REVERSE)) {
+               if (fg == &dc.col[defaultfg]) {
diff --git a/libre/st-solarized-light-0.7.diff b/libre/st-solarized-light-0.7.diff
new file mode 100644 (file)
index 0000000..c58d7d5
--- /dev/null
@@ -0,0 +1,68 @@
+diff --git a/config.def.h b/config.def.h
+index b41747f..5a87570 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -84,31 +84,23 @@ static unsigned int tabspaces = 8;
+ /* 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",
+-      "#555555",
++      /* 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  */
+ };
+@@ -116,10 +108,10 @@ static const char *colorname[] = {
+  * Default colors (colorname index)
+  * foreground, background, cursor, reverse cursor
+  */
+-static unsigned int defaultfg = 7;
+-static unsigned int defaultbg = 0;
+-static unsigned int defaultcs = 256;
+-static unsigned int defaultrcs = 257;
++static unsigned int defaultfg = 12;
++static unsigned int defaultbg = 8;
++static unsigned int defaultcs = 14;
++static unsigned int defaultrcs = 15;
+ /*
+  * Default shape of cursor