summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrafa_99 <rafa99@protonmail.com>2021-04-13 14:28:11 +0100
committerrafa_99 <rafa99@protonmail.com>2021-04-13 14:28:11 +0100
commit3c43d7d6e9a48b49741c2668620009a32abb24e5 (patch)
tree455955b3d308deeb24ee441f61f840362ed7ee6e
parent9173ca670390a01e03c0db96265035315f80bea9 (diff)
Modularized Colors
-rw-r--r--colors.h39
-rw-r--r--config.def.h39
2 files changed, 40 insertions, 38 deletions
diff --git a/colors.h b/colors.h
new file mode 100644
index 0000000..4c7c806
--- /dev/null
+++ b/colors.h
@@ -0,0 +1,39 @@
+/* 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",
+ "black",
+};
+
+
+/*
+ * Default colors (colorname index)
+ * foreground, background, cursor, reverse cursor
+ */
+unsigned int defaultfg = 7;
+unsigned int defaultbg = 0;
+static unsigned int defaultcs = 256;
+static unsigned int defaultrcs = 257;
diff --git a/config.def.h b/config.def.h
index 3ce2026..e49dd7b 100644
--- a/config.def.h
+++ b/config.def.h
@@ -111,44 +111,7 @@ char *termname = "st-256color";
*/
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",
-};
-
-
-/*
- * Default colors (colorname index)
- * foreground, background, cursor, reverse cursor
- */
-unsigned int defaultfg = 7;
-unsigned int defaultbg = 0;
-static unsigned int defaultcs = 256;
-static unsigned int defaultrcs = 257;
+#include "colors.h"
/*
* Default shape of cursor